-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMEC Driver support #743
CMEC Driver support #743
Conversation
@gleckler1 @lee1043 Here's what I have so far for the PMP CMEC driver support. All the metrics are set up to run using the demo data out-of-the-box. |
…etrics into 742_ao_cmec_driver
@gleckler1 @lee1043 I've updated this branch and it is ready to merge once CircleCi finishes. I see under the "Merge pull request" button (down arrow on right) that there is an option to "Squash and Merge" - since I have a pretty messy commit history, can we use this option? |
@acordonez I never knew about the "Squash and Merge" option for merging, so it's good to learn about it -- thanks! I have no prob with using that option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is indeed a very nice and important accomplishment. Thank you, @acordonez, for your hard work!
These changes add support to run PMP metrics via cmec-driver. By default, this set-up will use the PMP demo data to run the metrics out-of-the-box. To run with different data, make changes in cmec-driver/config/cmec.json.
Along with the settings JSONs and driver scripts required by cmec-driver (in the "cmec" folder), I made small changes to a few other scripts. In pcmdi_metrics/pcmdi/scripts/pcmdi_compute_climatologies.py there is a fix for the case where the start and end years are not provided. In the Base write_cmec function I removed the "indices" key from under "statistics" since this convention was copied from ILAMB, which generates indices as metrics, but doesn't apply to PMP. In Monsoon (Sperber) I added support for generating a CMEC-compliant results JSON.
Instructions for testing:
PCMDI Metrics
conda env create --file cmec/cmec_pcmdi_metrics.yml
Cmec-driver
Setup:
mkdir output
`python cmec-driver.py setup -conda_source -env_root
python cmec-driver.py register <path_to_pcmdi_metrics>
python cmec-driver.py list -all
Test Run
Generic command:
python cmec-driver.py run -obs <obs_dir> <model_dir> <output_dir> Module/configuration
Example:
python cmec-driver.py run -obs demo_data/ demo_data/ output/ PMP/monsoon_wang
(demo data path is provided twice - once for obs, and once for model).Results for this run are located in output/PMP/monsoon_sperber.
Note for mean_climate: When using the demo data, include the PCMDIobs2_clims folder name in your obs directory.
Metrics Names (Configurations)
mean_climate
diurnal_cycle
monsoon_wang
monsoon_sperber
variability_modes
mjo
Future improvements
As noted in Issue 742, there are a few remaining changes for CMEC compliance and ease of use that are not included in this PR.