diff --git a/scripts/lib/CIME/namelist.py b/scripts/lib/CIME/namelist.py index e7639b921f0..e3a8d94d86a 100644 --- a/scripts/lib/CIME/namelist.py +++ b/scripts/lib/CIME/namelist.py @@ -1136,21 +1136,18 @@ def write(self, out_file, groups=None, append=False, format_='nml', sorted_group with open(out_file, flag) as file_obj: if format_ == 'nuopc': self._write_nuopc(file_obj, groups, sorted_groups=sorted_groups, - skip_comps=skip_comps, prognostic_comps=prognostic_comps, - atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) + skip_comps=skip_comps, atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) else: self._write(file_obj, groups, format_, sorted_groups=sorted_groups) else: logger.debug("Writing namelist to file object") if format_ == 'nuopc': self._write_noupc(out_file, groups, sorted_groups=sorted_groups, - skip_comps=skip_comps, prognostic_comps=prognostic_comps, - atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) + skip_comps=skip_comps, atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) else: self._write(out_file, groups, format_, sorted_groups=sorted_groups) - def _write_nuopc(self, out_file, groups, sorted_groups, skip_comps, prognostic_comps, - atm_cpl_dt, ocn_cpl_dt): + def _write_nuopc(self, out_file, groups, sorted_groups, skip_comps, atm_cpl_dt, ocn_cpl_dt): """Unwrapped version of `write` assuming that a file object is input.""" if groups is None: @@ -1225,22 +1222,6 @@ def _write_nuopc(self, out_file, groups, sorted_groups, skip_comps, prognostic_c if skip_comp.lower().strip() in run_entry: print_entry = False logger.info("Writing nuopc_runseq, skipping {}".format(run_entry)) - if print_entry: - med_to_comp_regex = re.compile(r"MED.*-\> *([A-Z]+)") - match = med_to_comp_regex.search(run_entry) - if match: - target_comp = match.group(1) - for prognostic_comp in prognostic_comps: - if not prognostic_comp in target_comp: - print_entry = False - logger.info("Writing nuopc_runseq, skipping {}".format(run_entry)) - med_to_comp_regex = re.compile(r"MED.*prep.+") - match = med_to_comp_regex.search(run_entry) - if match: - for prognostic_comp in prognostic_comps: - if not prognostic_comp.lower().strip() in run_entry: - print_entry = False - logger.info("Writing nuopc_runseq, skipping {}".format(run_entry)) if print_entry: if "@atm_cpl_dt" in run_entry: run_entry = run_entry.replace("atm_cpl_dt",atm_cpl_dt) diff --git a/scripts/lib/CIME/nmlgen.py b/scripts/lib/CIME/nmlgen.py index d885a6a9770..4942e9a9a97 100644 --- a/scripts/lib/CIME/nmlgen.py +++ b/scripts/lib/CIME/nmlgen.py @@ -658,12 +658,11 @@ def write_modelio_file(self, filename): self._namelist.write(filename, groups=["modelio", "pio_inparm"], format_="nml") def write_nuopc_config_file(self, filename, data_list_path=None, - skip_comps=None, prognostic_comps=None, atm_cpl_dt=None, ocn_cpl_dt=None): + skip_comps=None, atm_cpl_dt=None, ocn_cpl_dt=None): self._definition.validate(self._namelist) groups = self._namelist.get_group_names() self._namelist.write(filename, groups=groups, format_='nuopc', sorted_groups=False, - skip_comps=skip_comps, prognostic_comps=prognostic_comps, - atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) + skip_comps=skip_comps, atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) if data_list_path is not None: # append to input_data_list file with open(data_list_path, "a") as input_data_list: diff --git a/src/drivers/nuopc/cime_config/buildnml b/src/drivers/nuopc/cime_config/buildnml index 9a752db5e96..a312c49dcf0 100755 --- a/src/drivers/nuopc/cime_config/buildnml +++ b/src/drivers/nuopc/cime_config/buildnml @@ -182,10 +182,6 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files): xcpl_types = [ 'x' + x for x in comp_types] data_types = [ 'd' + x for x in comp_types] - prognostic_types = {"cam":"COMP_ATM", "clm":"COMP_LND", "cice":"COMP_ICE", - "pop":"COMP_OCN", "mom":"COMP_OCN", "rtm":"COMP_ROF", - "mosart":"COMP_ROF", "cism":"COMP_GLC", "ww":"COMP_WAV"} - # Determine components that are not present skip_comps = [] for item in comp_types: @@ -203,24 +199,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files): if case.get_value(item.upper() + "_NX") == "0" and case.get_value(item.upper() + "_NY") == "0": skip_comps.append(item.upper) - # Determine if prognostic components - prognostic_comps = [] - for key,value in prognostic_types.iteritems(): - if case.get_value(value) == key: - prognostic_comps.append(value) - - # Determine prognostic data component configurations - if case.get_value("COMP_ICE") == "dice": - if case.get_value("DICE_MODE") != "null": - prognostic_comps.append("ICE") - if case.get_value("COMP_OCN") == "docn": - if case.get_value("DOCN_MODE") == "interannual": - prognostic_comps.append("OCN") - if case.get_value("DOCN_MODE") == "som" or case.get_value("DOCN_MODE") == "som_aquap": - prognostic_comps.append("OCN") - logger.info("Writing nuopc_runseq will skip components {}".format(skip_comps)) - logger.info("Writing nuopc_runseq will only use prognostic components {}".format(prognostic_comps)) #TODO: how would the current data model namelist force_prognostic_true be used - and actually how is it unsed now? #TODO: how are we going to handle ocnrof_prognostic setting? @@ -229,8 +208,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files): ocn_cpl_dt = nmlgen.get_value('ocn_cpl_dt') nuopc_config_file = os.path.join(confdir, "cesm.runconfig") nmlgen.write_nuopc_config_file(nuopc_config_file, data_list_path=data_list_path, - skip_comps=skip_comps, prognostic_comps=prognostic_comps, - atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) + skip_comps=skip_comps, atm_cpl_dt=atm_cpl_dt, ocn_cpl_dt=ocn_cpl_dt) #-------------------------------- # (4) Write drv_flds_in