ESMValGroup / ESMValTool

ESMValTool: A community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP
https://www.esmvaltool.org
Apache License 2.0
217 stars 127 forks source link

Limiting the number of plots/ computations for CVDP #1367

Open glad94 opened 4 years ago

glad94 commented 4 years ago

Not sure if this is the right question for ESMValTool or a sensible one anyway, but is it possible to modify the cvdp_wrapper.py or recipes_cvdp.yml recipe to only select certain statistics and modes of variability to compute and plot? At the moment the recipe generates over 900 files in the work directory.

I've tried commenting out lines containing the modes in the _get_mode(filename) function from ~/anaconda3/envs/esmvaltool/python 3.7/site-packages/esmvaltool/diag_scripts/cvdp/cvdp_wrapper.py but no avail.

cvdp

So just want to know if its possible to do this with esmvaltool. Thanks!

bjoernbroetz commented 4 years ago

Not sure if this is the right question for ESMValTool or a sensible one anyway

Yes, it is!

bjoernbroetz commented 4 years ago

So, the CVDP-package offers a way to specify a selected number of statistics to be computed: https://github.com/ESMValGroup/ESMValTool/blob/b5b887901b5f3e344da88e4ca3a21a7263717aaa/esmvaltool/diag_scripts/cvdp/cvdp/driver.ncl#L58-L59

The ESMValTool currently doesn't make use of this feature of the CVDP package and uses the default "run all". But the implementation would be very strait forward.

@glad94 would this solve your problem if ESMValTool adds this feature?

glad94 commented 4 years ago

Hi @bjoernbroetz, just to clarify, setting modular = "True" in driver.ncl would allow me to select statistics by specifying the CVDP scripts I want in modular_list? I wouldn't have to change anything in cvdp_wrapper.py then?

I suppose it would be more user-friendly if one could handle the selection of desired statistics purely within the ESMValTool recipe script so its a feature worth adding imo. Thanks!

bjoernbroetz commented 4 years ago

... just to clarify, setting modular = "True" in driver.ncl would allow me to select statistics by specifying the CVDP scripts I want in modular_list? I wouldn't have to change anything in cvdp_wrapper.py then?

Yes.

I suppose it would be more user-friendly if one could handle the selection of desired statistics purely within the ESMValTool recipe script so its a feature worth adding imo.

I think so too. @glad94 do you want to give it a try to add this feature?

glad94 commented 4 years ago

Hi @bjoernbroetz , my apologies, I only read the "Yes" from your earlier reply in my email notification and only just saw the rest of it! If this hasn't been introduced in the latest update yet, I'll be happy to help and try messing around and understand what's going on between the recipe, diag_script and driver.ncl.