Closed hahsan1 closed 3 years ago
try recipes/recipe_validation_CMIP6.yml
- that one runs a standard experiment vs control diagnostic (well, a number of them, pick and choose). You can set the experiment to be your model and the control to be the perturbed one, or vice versa :beer:
Thanks @valeriupredoi this is very helpful!
It works great when I compare two different models! But how do I compare a reference case and perturbation of the same model. The dataset is the same (GISS-nudge) so the only way to specify is using the 'exp'. But when I put in the exp for control_model
and exper_model
in the recipe, it doesn't work.
The error is:
UnboundLocalError: local variable 'control' referenced before assignment
Perhaps I have to change something in the script (validation.py) so that it identifies the dataset by exp?
Taking a look at the documentation I found here, it says:
Also note that currently it is not allowed to use the same dataset (with varying parameters like experiment or ensemble) for both CONTROL and EXPERIMENT (the use case for comparison between different experiments or ensembles for the same model will be implemented in a future release).
I wonder if there are plans to implement this feature soon? Or is there a quick workaround? I am still new to python so any advice would be greatly appreciated!
yes, I should have a stab at it sooner than later - no worries about coding skills, it's actually my job to get this done in an even more general way :+1: For now, is there a possibility for you to rename your local data files with a different model name? No need to rename the actual data, but to create symlinks with a slightly different name in the model name bit?
Yes, for now I am renaming the data files to reflect the model and experiment and it's working for me. I'll close this issue now. Thank you for looking into this, I appreciate the help!
@hahsan1 please have a look at #2281 and linked PR :+1:
I would like to generate 2D NetCDF difference maps between various model reference cases and their perturbations.
I have the option for "Diagnostics write NetCDF files" set to true in the config-user.yml file. But this only generates a NetCDF file for the reference case. Is there an option to have a NetCDF generated for the difference between the reference and perturbation? Or a diagnostic script that does this already?
I have attached a sample recipe. global_diff_recipe.txt