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
218 stars 128 forks source link

esmvalcore.cmor.check.CMORCheckError #3288

Open wu841227 opened 1 year ago

wu841227 commented 1 year ago

Describe the bug Hello,

I am running the recipe_lauer22jclim_fig3-4_zonal.yml and trying to include additional data set from EC-Earth3-AerChem ( - {dataset: EC-Earth3-AerChem, ensemble: r1i1p1f1, grid: gr} . However, I got following errors.

Not sure how I can fix it.

Thanks in advance! LIanghai


loaded from file /Users/lwu/climate_data/CMIP6/CMIP/EC-Earth-Consortium/EC-Earth3-AerChem/amip/r1i1p4f1/Amon/clw/gr/v20230503/clw_Amon_EC-Earth3-AerChem_amip_r1i1p4f1_gr_199501-199512.nc """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_main.py", line 524, in run fire.Fire(ESMValTool()) File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/fire/core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^ File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_main.py", line 411, in run self._run(recipe, session) File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_main.py", line 453, in _run process_recipe(recipe_file=recipe, session=session) File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_main.py", line 125, in process_recipe recipe.run() File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_recipe/recipe.py", line 1294, in run self.tasks.run(max_parallel_tasks=self.session['max_parallel_tasks']) File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_task.py", line 738, in run self._run_parallel(address, max_parallel_tasks) File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_task.py", line 782, in _run_parallel _copy_results(task, running[task]) File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/site-packages/esmvalcore/_task.py", line 805, in _copy_results task.output_files, task.products = future.get() ^^^^^^^^^^^^ File "/Users/lwu/mambaforge/envs/esmvaltool/lib/python3.11/multiprocessing/pool.py", line 774, in get raise self._value esmvalcore.cmor.check.CMORCheckError: There were errors in variable clw: There are multiple coordinates with standard_name "air_pressure": ['ps', None] in cube: mass_fraction_of_cloud_liquid_water_in_air / (kg kg-1) (time: 12; atmosphere_hybrid_sigma_pressure_coordinate: 91; latitude: 256; longitude: 512) Dimension coordinates: time x - - - atmosphere_hybrid_sigma_pressure_coordinate - x - - latitude - - x - longitude - - - x Auxiliary coordinates: air_pressure x - x x vertical coordinate formula term: ap - x - - vertical coordinate formula term: b - x - - Derived coordinates: air_pressure x x x x Cell methods: 0 area: time: mean Attributes: Conventions 'CF-1.7 CMIP-6.2' activity_id 'CMIP' branch_method 'no parent' branch_time_in_child 0.0 branch_time_in_parent 0.0 cmor_version '3.7.1' contact 'cmip6-data@ec-earth.org' data_specs_version '01.00.33' ece2cmor_git_revision '36e7c05ee90b31d8bff8a8cd28ab879e4298f477' experiment 'AMIP' experiment_id 'amip' external_variables 'areacella' forcing_index 1 frequency 'mon' further_info_url 'https://furtherinfo.es-doc.org/CMIP6.EC-Earth-Consortium.EC-Earth3-Aer ...' grid 'T255L91' grid_label 'gr' initialization_index 1 institution 'AEMET, Spain; BSC, Spain; CNR-ISAC, Italy; DMI, Denmark; ENEA, Italy; FMI, ...' institution_id 'EC-Earth-Consortium' latest_applied_cmor_fixer_version 'None' latest_ece2cmor_version 'v2.1.0' license 'CMIP6 model data produced by EC-Earth-Consortium is licensed under a Creative ...' mip_era 'CMIP6' nominal_resolution '100 km' parent_activity_id 'no parent' parent_experiment_id 'no parent' parent_mip_era 'no parent' parent_source_id 'no parent' parent_time_units 'no parent' parent_variant_label 'no parent' physics_index 4 product 'model-output' realization_index 1 realm 'atmos' source 'EC-Earth3-AerChem (2019): \naerosol: TM5 (3 x 2 degrees; 120 x 90 longitude/latitude; ...' source_file '/Users/lwu/climate_data/CMIP6/CMIP/EC-Earth-Consortium/EC-Earth3-AerCh ...' source_id 'EC-Earth3-AerChem' source_type 'AGCM AER CHEM' sub_experiment 'none' sub_experiment_id 'none' table_id 'Amon' table_info 'Creation Date:(18 November 2020) MD5:f79f5f5ae101b37ec402775a8266587d' title 'EC-Earth3-AerChem output prepared for CMIP6' variable_id 'clw' variant_info 'The model used for this experiment is an updated version of EC-Earth3-AerChem ...' variant_label 'r1i1p4f1'

Please attach main_log_debug.txt

valeriupredoi commented 1 year ago

@sloosvel @schlunma one of you guys had a bit of time have a look at this pls 🍺

sloosvel commented 1 year ago

We had the same issue, it turns out that the standard_name for variable ps is the same as the variable that gets created from the formula terms by iris that has the None var_name. We did a quick fix by removing the standard_name from ps, since other models work because the standard_name in ps is not set. But it's not a really accurate, because according to the tables ps should be named like that.

valeriupredoi commented 1 year ago

cheers @sloosvel - would you agree a fix is needed for this variable then?

sloosvel commented 1 year ago

Technically the data is correct I think. It's just that iris creates this extra coordinate with the same standard name as an existing one. But I cannot think of any other way to address this, other than setting the standard name of ps to None, even if not correct.