Skip to content

Commit 7f9f4b5

Browse files
Readme and postprocessing updates.
1 parent 6eb4d3e commit 7f9f4b5

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11

2-
3-
[![DOI](https://zenodo.org/badge/189257871.svg)](https://zenodo.org/badge/latestdoi/189257871)
4-
5-
62
# ATTRICI - counterfactual climate for impact attribution
73

8-
Code implementing the methods discussed in Mengel et al. (submitted) [https://doi.org/10.5194/gmd-2020-145].
4+
Code implementing the methods discussed in Mengel et al. (submitted) [https://doi.org/10.5194/gmd-2020-145]. The code is archived at [ZENODO](https://doi.org/10.5281/zenodo.3828914).
95

106

117
## Project Structure
@@ -17,8 +13,7 @@ Code implementing the methods discussed in Mengel et al. (submitted) [https://do
1713

1814
## Install
1915

20-
We use the jobarray feature of slurm to run many jobs in parallel.
21-
The configuration is very much tailored to the PIK supercomputer at the moment. Please do
16+
Please do
2217

2318
`conda config --add channels conda-forge`
2419

@@ -36,7 +31,7 @@ You may optionally
3631

3732
## Usage
3833

39-
This code is currently taylored to run on the supercomputer at the Potsdam Institute for Climate Impact Research. Generalizing it into a package is ongoing work. We use the GNU compiler as the many parallel compile jobs through jobarrays and JIT compilation conflict with the few Intel licenses.
34+
The parallelization part to run large datasets is currently taylored to the supercomputer at the Potsdam Institute for Climate Impact Research using the [slurm scheduler](https://slurm.schedmd.com/documentation.html). Generalizing it into a package is ongoing work. We use the GNU compiler as the many parallel compile jobs through jobarrays and JIT compilation conflict with the few Intel licenses.
4035

4136
`module purge`
4237

@@ -48,8 +43,6 @@ In the root package directory.
4843

4944
`pip install -e .`
5045

51-
Copy the `settings.py`, `run_estimation.py`, `merge_cfact.py` and `submit.sh` to a separate directory,
52-
for example `myrunscripts`. Adjust `settings.py` and `submit.sh`, in particular the output directoy, and continue as in Usage.
5346

5447
Override the conda setting with: `export CXX=g++`
5548

@@ -79,6 +72,11 @@ For merging the single timeseries files to netcdf datasets
7972

8073
`python merge_cfact.py`
8174

75+
### Handle several runs with different settings
76+
77+
Copy the `settings.py`, `run_estimation.py`, `merge_cfact.py` and `submit.sh` to a separate directory,
78+
for example `myrunscripts`. Adjust `settings.py` and `submit.sh`, in particular the output directoy, and continue as in Usage.
79+
8280
## Preprocessing
8381

8482
Example for GSWP3-W5E5 dataset, which is first priority in ISIMIP3a.
@@ -115,7 +113,6 @@ Smaller datasets through subsetting were created using CDO.
115113
For tasmin and tasmax, we do not estimate counterfactual time series individually to avoid large relative errors in the daily temperature range as pointed out by (Piani et al. 2010). Following (Piani et al. 2010), we estimate counterfactuals of the daily temperature range tasrange = tasmax - tasmin and the skewness of the daily temperature tasskew = (tas - tasmin) / tasrange. Use [create_tasmin_tasmax.py](postprocessing/create_tasmin_tasmax.py)
116114
with adjusted paths for the _tas_, _tasrange_ and _tasskew_ counterfactuals.
117115

118-
119116
A counterfactual huss is derived from the counterfacual tas, ps and hurs using the equations of Buck (1981) as described in Weedon et al. (2010). Use [derive_huss.sh](postprocessing/derive_huss.sh)
120117
with adjusted file names and the required time range.
121118

@@ -124,7 +121,7 @@ with adjusted file names and the required time range.
124121

125122
We rely on the [pymc3](https://github.com/pymc-devs/pymc3) package for probabilistic programming (Salvatier et al. 2016).
126123

127-
The code on Bayesian estimation of parameters in timeseries with periodicity in PyMC3 is inspired and adopted from [Ritchie Vink's](https://www.ritchievink.com) [post](https://www.ritchievink.com/blog/2018/10/09/build-facebooks-prophet-in-pymc3-bayesian-time-series-analyis-with-generalized-additive-models/) on Bayesian timeseries analysis with additive models.
124+
An early version of the code on Bayesian estimation of parameters in timeseries with periodicity in PyMC3 was inspired by [Ritchie Vink's](https://www.ritchievink.com) [post](https://www.ritchievink.com/blog/2018/10/09/build-facebooks-prophet-in-pymc3-bayesian-time-series-analyis-with-generalized-additive-models/) on Bayesian timeseries analysis with additive models.
128125

129126
## License
130127

postprocessing/set_global_metadata.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/bash
22

3-
data_dir=../decadal_data
3+
data_dir=/p/tmp/mengel/isimip/attrici/collected_output/20210527_gswp3v109-w5e5/decadal_data
4+
data_dir=/p/tmp/buechner/temp/attrici
45

5-
for input_file in ${data_dir}/*.nc
6-
do
6+
for input_file in ${data_dir}/*.nc;do
7+
echo $input_file
78
ncatted -h \
89
-a history,global,d,, \
910
-a source,global,d,, \
@@ -18,8 +19,7 @@ do
1819
-a institution,global,o,c,"Potsdam Institute for Climate Impact Research (PIK)" \
1920
-a project,global,o,c,"Inter-Sectoral Impact Model Intercomparison Project phase 3a (ISIMIP3a)" \
2021
-a contact,global,o,c,"ISIMIP cross-sectoral science team <info@isimip.org> <https://www.isimip.org>" \
21-
-a summary,global,o,c,"Counterfactual climate generated by de-trending GSWP3-W5E5 data using global mean temperature as independent variable. Created with ATTRICI v1.1.0, see <https://github.com/ISI-MIP/attrici/releases/tag/v1.1.0>" \
22-
-a version,global,o,c,"This version of the counterfactual GSWP3-W5E5 climate is based on the improved ATTRICI version v1.1.0." \
22+
-a summary,global,o,c,"A counterfactual climate for impact attribution derived from GSWP3-W5E5. Created with ATTRICI v1.1.0, see <https://github.com/ISI-MIP/attrici/releases/tag/v1.1.0>" \
23+
-a version,global,o,c,"This version of the counterfactual GSWP3-W5E5 climate is based on the ATTRICI version v1.1.0. GSWP3 v1.09 and W5E5 v2.0 have been used to compile GSWP3-W5E5" \
2324
${input_file}
24-
echo ${input_file}
2525
done

0 commit comments

Comments
 (0)