GitHub user agoodm opened a pull request:
https://github.com/apache/climate/pull/453
CLIMATE-925 - CORDEX Config File Template
@huikyole The final script will come in just a bit (CLIMATE-926). However
you can test these changes yourself by rendering the config file. Try running
this script in the `climate/RCMES/CORDEX` directory. (You'll need jinja2,
`conda install jinja2`):
```python
import jinja2
workdir = '/home/goodman/data_processing/CORDEX/analysis' # CHANGEME
from metadata_extractor import CORDEXMetadataExtractor,
obs4MIPSMetadataExtractor
obs_extractor = obs4MIPSMetadataExtractor('/proj3/data/obs4mips')
models_extractor = CORDEXMetadataExtractor('/proj3/data/CORDEX/NAM-44/*')
groups = obs_extractor.group(models_extractor, 'variable')
obs_info, models_info = groups[0]
env = jinja2.Environment(loader=jinja2.FileSystemLoader('./templates'),
trim_blocks=True, lstrip_blocks=True)
t = env.get_template('CORDEX.yaml.template')
with open('test.yaml', 'w') as configfile:
configfile.write(t.render(obs_info=obs_info, models_info=models_info,
season='annual', output_dir=workdir))
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/agoodm/climate CLIMATE-925
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/climate/pull/453.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #453
----
commit d868be10eb3862798f456e45e5ae2d3687dd401c
Author: Alex <[email protected]>
Date: 2017-09-26T23:03:09Z
Allow acronyms for CORDEX domains
commit 3e66d94fce1935aac2a8cc88025d50858d78f3ba
Author: Alex <[email protected]>
Date: 2017-09-26T23:10:44Z
Default vales for subplot grid in RCMES script
commit eacee1f5a2569a191d4961621d37281ccdf06017
Author: Alex <[email protected]>
Date: 2017-09-26T23:19:39Z
Allow acronyms for CORDEX domains
commit 8168d2042390712f9d58051633d93c267a002756
Author: Alex <[email protected]>
Date: 2017-09-26T23:21:09Z
Default values for filename_pattern in split file loader
commit 368e6969ca992e29b7bf49906449c4c92a913d2f
Author: Alex <[email protected]>
Date: 2017-09-26T23:33:14Z
Ignore start and end times when maximum_overlap is True
commit 3539aa2be6408140e33d82fb413089c62fcec70f
Author: Alex <[email protected]>
Date: 2017-09-26T23:41:06Z
CLIMATE-925 - CORDEX Config File Template
----
---