diff --git a/ece2cmor3/components.py b/ece2cmor3/components.py index a11efc11..64ea4494 100644 --- a/ece2cmor3/components.py +++ b/ece2cmor3/components.py @@ -25,7 +25,7 @@ 'EC-EARTH-HR' : ["ifs", "nemo" ], 'EC-EARTH-LR' : ["ifs", "nemo" ], 'EC-EARTH-CC' : ["ifs", "nemo", "tm5", "lpjg" ], - 'EC-EARTH-ESM' : ["ifs", "nemo", "lpjg", "co2box"], # If a PISM component is added to ece2cmor3 it needs here to be added as well. + 'EC-EARTH-ESM-1' : ["ifs", "nemo", "lpjg", "co2box"], # If a PISM component is added to ece2cmor3 it needs here to be added as well. 'EC-EARTH-GrisIS' : ["ifs", "nemo" ], # If a PISM component is added to ece2cmor3 it needs here to be added as well. 'EC-EARTH-AerChem' : ["ifs", "nemo", "tm5" ], 'EC-EARTH-Veg' : ["ifs", "nemo", "lpjg" ], diff --git a/ece2cmor3/resources/prefs.py b/ece2cmor3/resources/prefs.py index 858b955f..aa543c8c 100644 --- a/ece2cmor3/resources/prefs.py +++ b/ece2cmor3/resources/prefs.py @@ -30,7 +30,9 @@ def keep_variable(target, model_component, ecearth_config): if variable in ["evspsbl", "mrfso", "mrso", "mrsol", "mrsos", "mrro", "mrros", "snc", "snd", "snw", "tsl"]: return model_component == "ifs" - # Carbon-cycle variables only activated in EC-EARTH-CC + # Carbon-cycle variables only activated in EC-EARTH-CC & EC-EARTH-ESM-1: + # The list below from the second line on is created by using: + # more basic-flat-cmip6-file_def_nemo.xml |grep pisces| sed -e 's/field_ref.*//' -e 's/^.*name=//' | sed -e 's/" .*$/",/' | sort | uniq | sed -e 's/$/ \\/' > pisces-vars.txt if variable in ["cfc12", "cfc13", "c14", "sf6", \ "bfe", "bfeos", "bsi", "bsios", "calc", "calcos", "chl", "chldiat", "chldiatos", \ "chlmisc", "chlmiscos", "chlos", "co3", "co3os", "co3satcalc", "co3satcalcos", \ @@ -45,9 +47,10 @@ def keep_variable(target, model_component, ecearth_config): "phydiatos", "phyfe", "phyfeos", "phymisc", "phymiscos", "physi", "physios", "pnitrate", \ "po4", "po4os", "pp", "ppdiat", "ppmisc", "ppos", "remoc", "si", "sios", "spco2", "talk", \ "talknat", "talknatos", "talkos", "zmeso", "zmesoos", "zmicro", "zmicroos", "zo2min", "zooc", "zoocos"]: - return model_component == "nemo" and ecearth_config == "EC-EARTH-CC" - # The list above from the second line on is created by using: - # more basic-flat-cmip6-file_def_nemo.xml |grep pisces| sed -e 's/field_ref.*//' -e 's/^.*name=//' | sed -e 's/" .*$/",/' | sort | uniq | sed -e 's/$/ \\/' > pisces-vars.txt + if ecearth_config == "EC-EARTH-CC": + return model_component == "nemo" and ecearth_config == "EC-EARTH-CC" + if ecearth_config == "EC-EARTH-ESM-1": + return model_component == "nemo" and ecearth_config == "EC-EARTH-ESM-1" if variable == "co2mass": if ecearth_config == "EC-EARTH-ESM": diff --git a/ece2cmor3/scripts/create-basic-ec-earth-cmip6-nemo-namelist.py b/ece2cmor3/scripts/create-basic-ec-earth-cmip6-nemo-namelist.py index edd3d67c..0f2ba0be 100755 --- a/ece2cmor3/scripts/create-basic-ec-earth-cmip6-nemo-namelist.py +++ b/ece2cmor3/scripts/create-basic-ec-earth-cmip6-nemo-namelist.py @@ -808,6 +808,7 @@ def create_sheet_column_indices(): drqlistjson_file_name = '../resources/miscellaneous-data-requests/test-data-request/drqlist-nemo-all.json' file_name_varlistjson_ece_cc = '../resources/miscellaneous-data-requests/test-data-request/varlist-nemo-all-ec-earth-cc.json' file_name_varlistjson_ece_aogcm = '../resources/miscellaneous-data-requests/test-data-request/varlist-nemo-all-ec-earth-aogcm.json' + file_name_varlistjson_ece_esm_1 = '../resources/miscellaneous-data-requests/test-data-request/varlist-nemo-all-ec-earth-esm-1.json' drqlistjson = open(drqlistjson_file_name,'w') drqlistjson.write('{}{}'.format('{','\n')) @@ -842,13 +843,15 @@ def create_sheet_column_indices(): command_2 = " drq2varlist --drq " + drqlistjson_file_name + " --varlist " + file_name_varlistjson_ece_cc + " --ececonf EC-EARTH-CC " command_3 = " drq2varlist --drq " + drqlistjson_file_name + " --varlist " + file_name_varlistjson_ece_aogcm + " --ececonf EC-EARTH-AOGCM " - #os.system(command_1) + command_4 = " drq2varlist --drq " + drqlistjson_file_name + " --varlist " + file_name_varlistjson_ece_esm_1 + " --ececonf EC-EARTH-ESM-1 " os.system(command_2) os.system(command_3) + os.system(command_4) print('\n The produced {:67} contains {:} variables.'.format(drqlistjson_file_name, i)) print(' The produced {:67} is a variant: ordened by model component, the ignored fields are dropped and the preferences are applied.'.format(file_name_varlistjson_ece_cc )) print(' The produced {:67} is a variant: ordened by model component, the ignored fields are dropped and the preferences are applied.'.format(file_name_varlistjson_ece_aogcm)) + print(' The produced {:67} is a variant: ordened by model component, the ignored fields are dropped and the preferences are applied.'.format(file_name_varlistjson_ece_esm_1)) ################################################################################ ################################### 7 ################################### diff --git a/ece2cmor3/scripts/drq2varlist.py b/ece2cmor3/scripts/drq2varlist.py index de4b016b..c05ebf8a 100755 --- a/ece2cmor3/scripts/drq2varlist.py +++ b/ece2cmor3/scripts/drq2varlist.py @@ -76,7 +76,7 @@ def main(): else: matches, omitted = taskloader.load_drq(args.drq, config=args.ececonf, check_prefs=True) # Here we load extra permanent tasks for LPJ-GUESS because the LPJ_GUESS community likes to output these variables at any time independent wheter they are requested by the data request: - if args.ececonf in ["EC-EARTH-CC", "EC-EARTH-Veg", "EC-EARTH-Veg-LR"]: + if args.ececonf in ["EC-EARTH-CC", "EC-EARTH-ESM-1", "EC-EARTH-Veg", "EC-EARTH-Veg-LR"]: matches_permanent, omitted_permanent = taskloader.load_drq(os.path.join(os.path.dirname(__file__), "..", "resources", "permanent-tasks.json"), config=args.ececonf, check_prefs=True) for model, targetlist in list(matches_permanent.items()): if model in matches: diff --git a/ece2cmor3/scripts/genecec.py b/ece2cmor3/scripts/genecec.py index d55244cb..3492c11f 100755 --- a/ece2cmor3/scripts/genecec.py +++ b/ece2cmor3/scripts/genecec.py @@ -91,6 +91,7 @@ 'EC-EARTH-HR' : 'CMIP,DCPP,HighResMIP', 'EC-EARTH-LR' : 'CMIP,PMIP', 'EC-EARTH-CC' : 'C4MIP,CDRMIP,CMIP,LUMIP,OMIP,ScenarioMIP', + 'EC-EARTH-ESM-1' : 'C4MIP,CDRMIP,CMIP,LUMIP,OMIP,ScenarioMIP', 'EC-EARTH-GrisIS' : 'CMIP,ISMIP6,PMIP', 'EC-EARTH-AerChem' : 'AerChemMIP,CMIP,RFMIP', 'EC-EARTH-Veg' : 'CDRMIP,CMIP,LUMIP,LS3MIP,ScenarioMIP', @@ -102,6 +103,7 @@ scenario_ece_configurations = { 'EC-EARTH-AOGCM' : 'CMIP,DCPP,LS3MIP,ScenarioMIP,CORDEX,DynVarMIP,VIACSAB', 'EC-EARTH-CC' : 'C4MIP,CDRMIP,CMIP,LUMIP,OMIP,ScenarioMIP', + 'EC-EARTH-ESM-1' : 'C4MIP,CDRMIP,CMIP,LUMIP,OMIP,ScenarioMIP', 'EC-EARTH-AerChem' : 'AerChemMIP,CMIP,RFMIP,ScenarioMIP', 'EC-EARTH-Veg' : 'CMIP,LUMIP,LS3MIP,ScenarioMIP', 'EC-EARTH-Veg-LR' : 'CMIP,PMIP,ScenarioMIP' @@ -123,12 +125,12 @@ # Define a dictionary which lists/maps for each MIP which EC-Earth3 model configurations are used to run the MIP: ece_conf_mip_map = { - #'CMIP' : ['EC-EARTH-AOGCM','EC-EARTH-HR','EC-EARTH-LR','EC-EARTH-CC','EC-EARTH-GrisIS','EC-EARTH-AerChem','EC-EARTH-Veg','EC-EARTH-Veg-LR'], + #'CMIP' : ['EC-EARTH-AOGCM','EC-EARTH-HR','EC-EARTH-LR','EC-EARTH-CC','EC-EARTH-ESM-1','EC-EARTH-GrisIS','EC-EARTH-AerChem','EC-EARTH-Veg','EC-EARTH-Veg-LR'], 'DCPP' : ['EC-EARTH-AOGCM','EC-EARTH-HR'], 'LS3MIP' : ['EC-EARTH-AOGCM','EC-EARTH-Veg'], 'PAMIP' : ['EC-EARTH-AOGCM'], 'RFMIP' : ['EC-EARTH-AOGCM','EC-EARTH-AerChem'], - 'ScenarioMIP' : ['EC-EARTH-AOGCM','EC-EARTH-CC','EC-EARTH-Veg','EC-EARTH-Veg-LR'], + 'ScenarioMIP' : ['EC-EARTH-AOGCM','EC-EARTH-CC','EC-EARTH-ESM-1','EC-EARTH-Veg','EC-EARTH-Veg-LR'], 'VolMIP' : ['EC-EARTH-AOGCM'], 'CORDEX' : ['EC-EARTH-AOGCM'], 'DynVarMIP' : ['EC-EARTH-AOGCM'], @@ -136,10 +138,10 @@ 'VIACSAB' : ['EC-EARTH-AOGCM'], 'HighResMIP' : ['EC-EARTH-HR'], 'PMIP' : ['EC-EARTH-LR','EC-EARTH-GrisIS','EC-EARTH-Veg-LR'], - 'C4MIP' : ['EC-EARTH-CC'], - 'CDRMIP' : ['EC-EARTH-CC','EC-EARTH-Veg'], - 'LUMIP' : ['EC-EARTH-CC','EC-EARTH-Veg'], - 'OMIP' : ['EC-EARTH-CC'], + 'C4MIP' : ['EC-EARTH-CC','EC-EARTH-ESM-1'], + 'CDRMIP' : ['EC-EARTH-CC','EC-EARTH-ESM-1','EC-EARTH-Veg'], + 'LUMIP' : ['EC-EARTH-CC','EC-EARTH-ESM-1','EC-EARTH-Veg'], + 'OMIP' : ['EC-EARTH-CC','EC-EARTH-ESM-1'], 'ISMIP6' : ['EC-EARTH-GrisIS'], 'AerChemMIP' : ['EC-EARTH-AerChem'] }