From ccea0969fc4e27d7735f01620f2d1156553e1a00 Mon Sep 17 00:00:00 2001 From: James Foucar Date: Thu, 6 Jun 2019 10:55:22 -0600 Subject: [PATCH 1/2] Update CIME to ESMCI cime5.8.2-3 (PR #2967) Update CIME to ESMCI cime5.8.2-3 Squash merge of jgfouca/branch-for-to-acme-2019-06-03 Features: * Provide default for the number of create_test parallel jobs * Nuopc cmeps removed (moved to separate repository) * RCP cmip5 scenarios - these have been removed and replaced in datm with the SSP scenarios of cmip6 Bug fix: * Use truncated division operator in SEQ SystemTest for py2+3 compatibility [BFB] --- cime/README.md | 4 + cime/config/cesm/config_grids.xml | 2 + .../config/cesm/machines/config_compilers.xml | 44 ++++- cime/config/cesm/machines/config_machines.xml | 20 +-- cime/config/cesm/machines/config_pio.xml | 7 +- cime/config/e3sm/machines/config_machines.xml | 8 + cime/config/xml_schemas/config_machines.xsd | 3 + cime/doc/source/users_guide/compsets.rst | 2 +- cime/doc/source/users_guide/create-a-case.rst | 23 +++ cime/scripts/Tools/archive_metadata | 2 - cime/scripts/create_test | 9 +- cime/scripts/lib/CIME/SystemTests/seq.py | 2 +- .../scripts/lib/CIME/case/check_input_data.py | 6 +- cime/scripts/lib/CIME/code_checker.py | 5 +- cime/scripts/lib/CIME/namelist.py | 56 ++++--- cime/scripts/lib/CIME/test_scheduler.py | 6 +- cime/scripts/lib/CIME/test_utils.py | 15 +- cime/scripts/lib/e3sm_cime_mgmt.py | 2 - .../scripts/tests/scripts_regression_tests.py | 2 + .../datm/cime_config/config_component.xml | 64 +++---- .../cime_config/namelist_definition_datm.xml | 157 ++++++++++++------ .../data_comps/dice/nuopc/dice_comp_mod.F90 | 25 ++- .../data_comps/dice/nuopc/ice_comp_nuopc.F90 | 16 +- .../xcpl_comps/xglc/nuopc/glc_comp_nuopc.F90 | 2 +- .../mct/cime_config/config_component.xml | 108 ++++++++++++ .../mct/cime_config/config_component_cesm.xml | 16 +- .../mct/cime_config/config_component_e3sm.xml | 102 ------------ .../mct/cime_config/config_compsets.xml | 2 +- cime/src/drivers/mct/main/cime_comp_mod.F90 | 56 +++---- cime/src/drivers/mct/main/prep_ice_mod.F90 | 12 +- cime/src/share/util/shr_pio_mod.F90 | 1 + cime/tools/statistical_ensemble_test/README | 32 ++-- 32 files changed, 500 insertions(+), 311 deletions(-) diff --git a/cime/README.md b/cime/README.md index 07424f5d280d..7ce3cc3c4ff8 100644 --- a/cime/README.md +++ b/cime/README.md @@ -38,3 +38,7 @@ of NSF's Division of Atmospheric and Geospace Sciences. # License CIME is free software made available under the BSD License. For details see the LICENSE file. + +# Digital Object Identifier + +DOI:[10.5065/WE0D-9K91](http://dx.doi.org/10.5065/WE0D-9K91) diff --git a/cime/config/cesm/config_grids.xml b/cime/config/cesm/config_grids.xml index 5e7d79f02448..c7d9be8ae745 100644 --- a/cime/config/cesm/config_grids.xml +++ b/cime/config/cesm/config_grids.xml @@ -1412,6 +1412,7 @@ $DIN_LOC_ROOT/share/domains/domain.ocn.tx0.1v2.161014.nc $DIN_LOC_ROOT/share/domains/domain.lnd.TL319_tx0.1v3.170730.nc $DIN_LOC_ROOT/share/domains/domain.ocn.tx0.1v3.170730.nc + $DIN_LOC_ROOT/share/meshes/TL319_151007_ESMFmesh.nc TL319 grid for JRA55 @@ -1528,6 +1529,7 @@ 1440 720 + $DIN_LOC_ROOT/share/meshes/JRA025m.170209_ESMFmesh.nc JRA is 0.25 degree runoff grid for use with JRA-55 runoff data diff --git a/cime/config/cesm/machines/config_compilers.xml b/cime/config/cesm/machines/config_compilers.xml index 998021114eb9..2b66b36f48c1 100644 --- a/cime/config/cesm/machines/config_compilers.xml +++ b/cime/config/cesm/machines/config_compilers.xml @@ -503,6 +503,38 @@ using a fortran linker. $ENV{TRILINOS_PATH} + + + + -DHAVE_NANOTIME -DBIT64 -DHAVE_VPRINTF -DHAVE_BACKTRACE -DHAVE_SLASHPROC -DHAVE_COMM_F2C -DHAVE_TIMES -DHAVE_GETTIMEOFDAY + + $ENV{NETCDF} + gpfs + $ENV{PNETCDF} + xiar + + cru + + + + + + -xHost + + + -DINTEL_MKL -DHAVE_SSE2 + + + -xHost + + mpiicpc + mpiicc + mpiifort + icc + ifort + $ENV{TRILINOS_PATH} + + -DHAVE_PAPI @@ -590,8 +622,8 @@ using a fortran linker. $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_noMPI_noOpenMP $ENV{CESMDATAROOT}/tools/pFUnit/pFUnit3.2.8_cheyenne_Intel17.0.1_MPI_openMP - - FALSE + + TRUE @@ -1071,7 +1103,7 @@ using a fortran linker. -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf - /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + /home6/fvitt/esmf_7_1_0r/esmf/lib/libO/Linux.intel.64.mpi.default @@ -1085,7 +1117,7 @@ using a fortran linker. -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf - /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + /home6/fvitt/esmf_7_1_0r/esmf/lib/libO/Linux.intel.64.mpi.default @@ -1099,7 +1131,7 @@ using a fortran linker. -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf - /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + /home6/fvitt/esmf_7_1_0r/esmf/lib/libO/Linux.intel.64.mpi.default @@ -1113,7 +1145,7 @@ using a fortran linker. -L$ENV{NETCDF}/lib -lnetcdff -lnetcdf - /home6/fvitt/esmf_7_0_0/esmf/lib/libO/Linux.intel.64.mpi.default + /home6/fvitt/esmf_7_1_0r/esmf/lib/libO/Linux.intel.64.mpi.default diff --git a/cime/config/cesm/machines/config_machines.xml b/cime/config/cesm/machines/config_machines.xml index d14640afb560..cd78bf97d775 100644 --- a/cime/config/cesm/machines/config_machines.xml +++ b/cime/config/cesm/machines/config_machines.xml @@ -1930,7 +1930,7 @@ This allows using a different mpirun command to launch unit tests nas pkgsrc - comp-intel/2016.2.181 + comp-intel/2018.3.222 mpi-sgi/mpt.2.15r20 szip/2.1.1 hdf4/4.2.12 @@ -1984,7 +1984,7 @@ This allows using a different mpirun command to launch unit tests nas pkgsrc - comp-intel/2016.2.181 + comp-intel/2018.3.222 mpi-sgi/mpt.2.15r20 szip/2.1.1 hdf4/4.2.12 @@ -2038,7 +2038,7 @@ This allows using a different mpirun command to launch unit tests nas pkgsrc - comp-intel/2016.2.181 + comp-intel/2018.3.222 mpi-sgi/mpt.2.15r20 szip/2.1.1 hdf4/4.2.12 @@ -2092,7 +2092,7 @@ This allows using a different mpirun command to launch unit tests nas pkgsrc - comp-intel/2016.2.181 + comp-intel/2018.3.222 mpi-sgi/mpt.2.15r20 szip/2.1.1 hdf4/4.2.12 @@ -2238,7 +2238,7 @@ This allows using a different mpirun command to launch unit tests $ENV{SCRATCH} /work/02503/edwardsj/CESM/inputdata /work/02503/edwardsj/CESM/inputdata/lmwg - $WORK/archive/$CASE + $ENV{WORK}/archive/$CASE /work/02503/edwardsj/CESM/cesm_baselines /work/02503/edwardsj/CESM/cime/tools/cprnc/cprnc 4 @@ -2276,13 +2276,13 @@ This allows using a different mpirun command to launch unit tests mvapich2/2.3b - pnetcdf/1.8.1 + pnetcdf/1.11.0 parallel-netcdf/4.3.3.1 mvapich2 impi/18.0.2 - pnetcdf/1.8.1 + pnetcdf/1.11.0 parallel-netcdf/4.3.3.1 @@ -2318,7 +2318,7 @@ This allows using a different mpirun command to launch unit tests $ENV{SCRATCH} /work/02503/edwardsj/CESM/inputdata /work/02503/edwardsj/CESM/inputdata/lmwg - $WORK/archive/$CASE + $ENV{WORK}/archive/$CASE /work/02503/edwardsj/CESM/cesm_baselines /work/02503/edwardsj/CESM/cime/tools/cprnc/cprnc 4 @@ -2350,13 +2350,13 @@ This allows using a different mpirun command to launch unit tests mvapich2/2.3b - pnetcdf/1.8.1 + pnetcdf/1.11.0 parallel-netcdf/4.3.3.1 mvapich2 impi/17.0.3 - pnetcdf/1.8.1 + pnetcdf/1.11.0 parallel-netcdf/4.3.3.1 diff --git a/cime/config/cesm/machines/config_pio.xml b/cime/config/cesm/machines/config_pio.xml index 426b12829e84..40f22b32a07b 100644 --- a/cime/config/cesm/machines/config_pio.xml +++ b/cime/config/cesm/machines/config_pio.xml @@ -25,12 +25,13 @@ + + + 1 diff --git a/cime/config/e3sm/machines/config_machines.xml b/cime/config/e3sm/machines/config_machines.xml index 5c411827a5cd..953212d052e2 100644 --- a/cime/config/e3sm/machines/config_machines.xml +++ b/cime/config/e3sm/machines/config_machines.xml @@ -218,6 +218,7 @@ /project/projectdirs/acme/tools/cprnc.cori/cprnc 8 e3sm_developer + 4 nersc_slurm e3sm 32 @@ -356,6 +357,7 @@ /project/projectdirs/acme/tools/cprnc.cori/cprnc 8 e3sm_developer + 4 nersc_slurm e3sm 128 @@ -1040,6 +1042,7 @@ /home/ccsm-data/tools/cprnc 4 e3sm_integration + 4 pbs acme 16 @@ -1143,6 +1146,7 @@ /lcrc/group/acme/tools/cprnc/cprnc 8 e3sm_integration + 4 slurm E3SM 36 @@ -1257,6 +1261,7 @@ /lcrc/group/acme/tools/cprnc/cprnc 8 e3sm_integration + 4 slurm E3SM 36 @@ -1576,6 +1581,7 @@ /projects/ccsm/acme/tools/cprnc/cprnc 8 e3sm_developer + 4 cobalt_theta E3SM 128 @@ -2187,6 +2193,7 @@ /lustre/atlas1/cli900/world-shared/cesm/tools/cprnc/cprnc.titan 8 e3sm_developer + 4 pbs TRUE E3SM @@ -3075,6 +3082,7 @@ /gpfs/alpine/cli115/world-shared/e3sm/tools/cprnc.summit/cprnc 32 e3sm_developer + 4 lsf e3sm 84 diff --git a/cime/config/xml_schemas/config_machines.xsd b/cime/config/xml_schemas/config_machines.xsd index f59f2a5f264c..e8af235035cf 100644 --- a/cime/config/xml_schemas/config_machines.xsd +++ b/cime/config/xml_schemas/config_machines.xsd @@ -46,6 +46,7 @@ + @@ -140,6 +141,8 @@ + + diff --git a/cime/doc/source/users_guide/compsets.rst b/cime/doc/source/users_guide/compsets.rst index 8436dbc738d1..f57a3d9b65cb 100644 --- a/cime/doc/source/users_guide/compsets.rst +++ b/cime/doc/source/users_guide/compsets.rst @@ -55,7 +55,7 @@ A compset longname has this form:: Supported values for each element of the longname:: - TIME = model time period (e.g. 1850, 2000, 20TR, RCP8...) + TIME = model time period (e.g. 1850, 2000, 20TR, SSP585...) CIME supports the following values for ATM,LND,ICE,OCN,ROF,GLC,WAV and ESP. ATM = [DATM, SATM, XATM] diff --git a/cime/doc/source/users_guide/create-a-case.rst b/cime/doc/source/users_guide/create-a-case.rst index bb70e7330b28..71b39b5cbd87 100644 --- a/cime/doc/source/users_guide/create-a-case.rst +++ b/cime/doc/source/users_guide/create-a-case.rst @@ -187,3 +187,26 @@ CIME locks your ``$CASEROOT`` files according to the following rules: - Variables in **env_run.xml**, **env_batch.xml** and **env_archive.xml** are never locked, and most can be changed at any time. - There are some exceptions in the **env_batch.xml** file. + +=================================== +Adding a --user-mods-dir argument to **create_newcase** +=================================== + +A user may want to customize a target case with a combination of +``user_nl_xxx`` file modifications and/or ``SourceMods`` for some +components and/or **xmlchange** commands. As an example, the user +might want to carry out a series of experiments based on a common set +of changes to the namelists, source code and/or case xml settings. +Rather than make these changes each time a new experimental +``CASEROOT`` is generated, the user can create a directory on local +disk with a set of changes that will be applied to each case. + +As an example, the directory could contain the following files: :: + + > user_nl_cpl + > shell_commands (this would contain ./xmlchange commands) + > SourceMods/src.cam/dyncomp.F90 + +When the user calls **create_newcase** with the ``--user-mods-dir`` pointing to the +full pathname of the directory containing these changes, then the ``CASEROOT`` will be +created with these changes applied. diff --git a/cime/scripts/Tools/archive_metadata b/cime/scripts/Tools/archive_metadata index 8114a3eaf40e..d0846920e2b4 100755 --- a/cime/scripts/Tools/archive_metadata +++ b/cime/scripts/Tools/archive_metadata @@ -454,8 +454,6 @@ def get_pp_status(case_dict): # get xconform status case_dict['xconform_path'] = '' case_dict['xconform_path'] = get_pp_path(pp_dir, 'xconform') - if (len(case_dict['xconform_path']) > 2): - case_dict['xconform_path'] = os.path.join(case_dict['xconform_path'], str(case_dict['case_id'])) case_dict['xconform_status'] = 'Unknown' case_dict['xconform_size'] = get_disk_usage(case_dict['xconform_path']) case_dict['xconform_dates'] = case_dict['timeseries_dates'] diff --git a/cime/scripts/create_test b/cime/scripts/create_test index 471e1cab5329..bb9b1fce1d3d 100755 --- a/cime/scripts/create_test +++ b/cime/scripts/create_test @@ -158,6 +158,9 @@ def parse_command_line(args, description): parser.add_argument("--xml-testlist", help="Use this testlist to lookup tests.The default is specified in config_files.xml") + parser.add_argument("--xml-driver", choices=('mct', 'nuopc', 'moab'), + help="Override driver specified in tests and use this one.") + parser.add_argument("testargs", nargs="*", help="Tests to run. Testname form is TEST.GRID.COMPSET[.MACHINE_COMPILER]") @@ -389,9 +392,9 @@ def parse_command_line(args, description): "At least one of --xml-machine, --xml-testlist, " "--xml-compiler, --xml-category or a valid test name must be provided.") - test_data = get_tests_from_xml(args.xml_machine, args.xml_category, - args.xml_compiler, args.xml_testlist, - machine_name, args.compiler) + test_data = get_tests_from_xml(xml_machine=args.xml_machine, xml_category=args.xml_category, + xml_compiler=args.xml_compiler, xml_testlist=args.xml_testlist, + machine=machine_name, compiler=args.compiler, driver=args.xml_driver) test_names = [item["name"] for item in test_data] for test_datum in test_data: test_extra_data[test_datum["name"]] = test_datum diff --git a/cime/scripts/lib/CIME/SystemTests/seq.py b/cime/scripts/lib/CIME/SystemTests/seq.py index ed3ec925700a..716215db5671 100644 --- a/cime/scripts/lib/CIME/SystemTests/seq.py +++ b/cime/scripts/lib/CIME/SystemTests/seq.py @@ -32,7 +32,7 @@ def _case_two_setup(self): self._case.set_value("ROOTPE_{}".format(comp), 0) else: totalpes = self._case.get_value("TOTALPES") - newntasks = max(1, totalpes/len(comp_classes)) + newntasks = max(1, totalpes//len(comp_classes)) rootpe = newntasks for comp in comp_classes: diff --git a/cime/scripts/lib/CIME/case/check_input_data.py b/cime/scripts/lib/CIME/case/check_input_data.py index fe7a0b6e5eb6..34b49aab84b6 100644 --- a/cime/scripts/lib/CIME/case/check_input_data.py +++ b/cime/scripts/lib/CIME/case/check_input_data.py @@ -210,6 +210,8 @@ def stage_refcase(self, input_data_root=None, data_list_dir=None): if os.path.isabs(run_refdir): refdir = run_refdir + expect(os.path.isdir(refdir), "Reference case directory {} does not exist or is not readable".format(refdir)) + else: refdir = os.path.join(din_loc_root, run_refdir, run_refcase, run_refdate) if not os.path.isdir(refdir): @@ -230,12 +232,12 @@ def stage_refcase(self, input_data_root=None, data_list_dir=None): if (not os.path.exists(rundir)): logger.debug("Creating run directory: {}".format(rundir)) os.makedirs(rundir) - + rpointerfile = None # copy the refcases' rpointer files to the run directory for rpointerfile in glob.iglob(os.path.join("{}","*rpointer*").format(refdir)): logger.info("Copy rpointer {}".format(rpointerfile)) safe_copy(rpointerfile, rundir) - + expect(rpointerfile,"Reference case directory {} does not contain any rpointer files".format(refdir)) # link everything else for rcfile in glob.iglob(os.path.join(refdir,"*")): diff --git a/cime/scripts/lib/CIME/code_checker.py b/cime/scripts/lib/CIME/code_checker.py index 8061b90d25a5..b0800756c998 100644 --- a/cime/scripts/lib/CIME/code_checker.py +++ b/cime/scripts/lib/CIME/code_checker.py @@ -26,10 +26,11 @@ def _run_pylint(on_file, interactive): cmd_options +=",relative-import" # add init-hook option - cmd_options += " --init-hook='sys.path.extend((\"%s\",\"%s\",\"%s\"))'"%\ + cmd_options += " --init-hook='sys.path.extend((\"%s\",\"%s\",\"%s\",\"%s\"))'"%\ (os.path.join(cimeroot,"scripts","lib"), os.path.join(cimeroot,"scripts","Tools"), - os.path.join(cimeroot,"scripts","fortran_unit_testing","python")) + os.path.join(cimeroot,"scripts","fortran_unit_testing","python"), + os.path.join(cimeroot,"src","drivers","nuopc","cime_config","runseq")) cmd = "%s %s %s" % (pylint, cmd_options, on_file) logger.debug("pylint command is %s"%cmd) diff --git a/cime/scripts/lib/CIME/namelist.py b/cime/scripts/lib/CIME/namelist.py index 47cd0a0bb138..d9589b74b746 100644 --- a/cime/scripts/lib/CIME/namelist.py +++ b/cime/scripts/lib/CIME/namelist.py @@ -1178,32 +1178,34 @@ def _write(self, out_file, groups, format_, sorted_groups): for group_name in group_names: if format_ == 'nml': out_file.write("&{}\n".format(group_name)) - group = self._groups[group_name] - for name in sorted(group.keys()): - values = group[name] - - # @ is used in a namelist to put the same namelist variable in multiple groups - # in the write phase, all characters in the namelist variable name after - # the @ and including the @ should be removed - if "@" in name: - name = re.sub('@.+$', "", name) - - # To prettify things for long lists of values, build strings - # line-by-line. - if values[0] == "True" or values[0] == "False": - values[0] = values[0].replace("True",".true.").replace("False",".false.") - lines = [" {}{} {}".format(name, equals, values[0])] - for value in values[1:]: - if value == "True" or value == "False": - value = value.replace("True",".true.").replace("False",".false.") - if len(lines[-1]) + len(value) <= 77: - lines[-1] += ", " + value - else: - lines[-1] += ",\n" - lines.append(" " + value) - lines[-1] += "\n" - for line in lines: - out_file.write(line) + # allow empty group + if group_name in self._groups: + group = self._groups[group_name] + for name in sorted(group.keys()): + values = group[name] + + # @ is used in a namelist to put the same namelist variable in multiple groups + # in the write phase, all characters in the namelist variable name after + # the @ and including the @ should be removed + if "@" in name: + name = re.sub('@.+$', "", name) + + # To prettify things for long lists of values, build strings + # line-by-line. + if values[0] == "True" or values[0] == "False": + values[0] = values[0].replace("True",".true.").replace("False",".false.") + lines = [" {}{} {}".format(name, equals, values[0])] + for value in values[1:]: + if value == "True" or value == "False": + value = value.replace("True",".true.").replace("False",".false.") + if len(lines[-1]) + len(value) <= 77: + lines[-1] += ", " + value + else: + lines[-1] += ",\n" + lines.append(" " + value) + lines[-1] += "\n" + for line in lines: + out_file.write(line) if format_ == 'nml': out_file.write("/\n") if format_ == 'nmlcontents': @@ -1220,7 +1222,7 @@ def _write_nuopc(self, out_file, groups, sorted_groups, skip_comps): group_names = groups for group_name in group_names: - if "_attributes" not in group_name and "nuopc_" not in group_name: + if "_attributes" not in group_name and "nuopc_" not in group_name and "_no_group" not in group_name: continue if "_attributes" in group_name: out_file.write("{}::\n".format(group_name)) diff --git a/cime/scripts/lib/CIME/test_scheduler.py b/cime/scripts/lib/CIME/test_scheduler.py index 774c50c18604..85ac42c0e0a8 100644 --- a/cime/scripts/lib/CIME/test_scheduler.py +++ b/cime/scripts/lib/CIME/test_scheduler.py @@ -191,8 +191,10 @@ def __init__(self, test_names, test_data=None, self._walltime = walltime if parallel_jobs is None: - self._parallel_jobs = min(len(test_names), - self._machobj.get_value("MAX_MPITASKS_PER_NODE")) + mach_parallel_jobs = self._machobj.get_value("NTEST_PARALLEL_JOBS") + if mach_parallel_jobs is None: + mach_parallel_jobs = self._machobj.get_value("MAX_MPITASKS_PER_NODE") + self._parallel_jobs = min(len(test_names), mach_parallel_jobs) else: self._parallel_jobs = parallel_jobs diff --git a/cime/scripts/lib/CIME/test_utils.py b/cime/scripts/lib/CIME/test_utils.py index dd67eb4a48a7..25f2af0a0a03 100644 --- a/cime/scripts/lib/CIME/test_utils.py +++ b/cime/scripts/lib/CIME/test_utils.py @@ -11,7 +11,7 @@ logger = logging.getLogger(__name__) def get_tests_from_xml(xml_machine=None,xml_category=None,xml_compiler=None, xml_testlist=None, - machine=None, compiler=None): + machine=None, compiler=None, driver=None): """ Parse testlists for a list of tests """ @@ -46,6 +46,19 @@ def get_tests_from_xml(xml_machine=None,xml_category=None,xml_compiler=None, xml test["name"] = CIME.utils.get_full_test_name(test["testname"], grid=test["grid"], compset=test["compset"], machine=thismach, compiler=thiscompiler, testmod=None if "testmods" not in test else test["testmods"]) + if driver: + # override default or specified driver + founddriver = False + for specdriver in ("Vnuopc","Vmct","Vmoab"): + if specdriver in test["name"]: + test["name"] = test["name"].replace(specdriver,"V{}".format(driver)) + founddriver = True + if not founddriver: + name = test["name"] + index = name.find('.') + test["name"] = name[:index] + "_V{}".format(driver) + name[index:] + + logger.debug("Adding test {} with compiler {}".format(test["name"], test["compiler"])) listoftests += newtests logger.debug("Found {:d} tests".format(len(listoftests))) diff --git a/cime/scripts/lib/e3sm_cime_mgmt.py b/cime/scripts/lib/e3sm_cime_mgmt.py index b3325648d663..a1c8d026c37e 100644 --- a/cime/scripts/lib/e3sm_cime_mgmt.py +++ b/cime/scripts/lib/e3sm_cime_mgmt.py @@ -25,8 +25,6 @@ def setup(): run_cmd_no_fail("git clean -fd", verbose=True) - run_cmd_no_fail("git clean -fd", verbose=True) - ############################################################################### def get_tag(prefix, expected_num=1): ############################################################################### diff --git a/cime/scripts/tests/scripts_regression_tests.py b/cime/scripts/tests/scripts_regression_tests.py index 9f26c73fba7d..90bbf8f8dafe 100755 --- a/cime/scripts/tests/scripts_regression_tests.py +++ b/cime/scripts/tests/scripts_regression_tests.py @@ -729,6 +729,8 @@ def test_m_createnewcase_alternate_drivers(self): cls = self.__class__ model = CIME.utils.get_model() for driver in ("nuopc", "moab"): + if not os.path.exists(os.path.join(get_cime_root(),"src","drivers",driver)): + self.skipTest("Skipping driver test for {}, driver not found".format(driver)) if ((model == 'cesm' and driver == 'moab') or (model == 'e3sm' and driver == 'nuopc')): continue diff --git a/cime/src/components/data_comps/datm/cime_config/config_component.xml b/cime/src/components/data_comps/datm/cime_config/config_component.xml index 04c94974219f..f4dfd2714459 100644 --- a/cime/src/components/data_comps/datm/cime_config/config_component.xml +++ b/cime/src/components/data_comps/datm/cime_config/config_component.xml @@ -60,20 +60,24 @@ char - none,clim_1850,clim_2000,clim_2010,trans_1850-2000,rcp2.6,rcp4.5,rcp6.0,rcp8.5,cplhist + none,clim_1850,clim_2000,clim_2010,trans_1850-2000,SSP1-1.9,SSP1-2.6,SSP2-4.5,SSP3-7.0,SSP4-3.4,SSP4-6.0,SSP5-3.4,SSP5-8.5,cplhist clim_2000 - clim_1850 - clim_2000 - clim_2010 - rcp8.5 - rcp6.0 - rcp4.5 - rcp2.6 - trans_1850-2000 - trans_1850-2000 + clim_1850 + clim_2000 + clim_2010 + SSP1-1.9 + SSP1-2.6 + SSP2-4.5 + SSP3-7.0 + SSP4-3.4 + SSP4-6.0 + SSP5-3.4 + SSP5-8.5 + trans_1850-2000 + trans_1850-2000 cplhist - none + none run_component_datm env_run.xml @@ -97,15 +101,19 @@ char - none,20tr,20tr.latbnd,rcp2.6,rcp4.5,rcp6.0,rcp8.5 + none,20tr,20tr.latbnd,SSP1-1.9,SSP1-2.6,SSP2-4.5,SSP3-7.0,SSP4-3.4,SSP4-6.0,SSP5-3.4,SSP5-8.5,SSP1-1.9.latbnd,SSP1-2.6.latbnd,SSP2-4.5.latbnd,SSP3-7.0.latbnd,SSP4-3.4.latbnd,SSP4-6.0.latbnd,SSP5-3.4.latbnd,SSP5-8.5.latbnd none - rcp8.5 - rcp6.0 - rcp4.5 - rcp2.6 - 20tr - 20tr + SSP1-1.9 + SSP1-2.6 + SSP2-4.5 + SSP3-7.0 + SSP4-3.4 + SSP4-6.0 + SSP5-3.4 + SSP5-8.5 + 20tr + 20tr run_component_datm env_run.xml @@ -193,7 +201,6 @@ 1 1 1 - 1 1895 1901 1901 @@ -201,10 +208,9 @@ 1895 1901 1901 - $DATM_CLMNCEP_YR_START - 2004 - 2005 - 2005 + $DATM_CLMNCEP_YR_START + $DATM_CLMNCEP_YR_START + $DATM_CLMNCEP_YR_START 1 1 $DATM_CLMNCEP_YR_START @@ -238,9 +244,9 @@ 1901 0 1948 - 1972 - 1991 - 1991 + 1995 + 2001 + 2001 2002 1901 1991 @@ -280,9 +286,9 @@ 1920 -1 2004 - 2004 - 2010 - 2010 + 2004 + 2016 + 2014 2003 1920 2010 diff --git a/cime/src/components/data_comps/datm/cime_config/namelist_definition_datm.xml b/cime/src/components/data_comps/datm/cime_config/namelist_definition_datm.xml index a502d81ce66d..aef5b26ae645 100644 --- a/cime/src/components/data_comps/datm/cime_config/namelist_definition_datm.xml +++ b/cime/src/components/data_comps/datm/cime_config/namelist_definition_datm.xml @@ -103,10 +103,22 @@ co2tseries.20tr co2tseries.20tr.latbnd - co2tseries.rcp2.6 - co2tseries.rcp4.5 - co2tseries.rcp6.0 - co2tseries.rcp8.5 + co2tseries.SSP1-1.9 + co2tseries.SSP1-2.6 + co2tseries.SSP2-4.5 + co2tseries.SSP3-7.0 + co2tseries.SSP4-3.4 + co2tseries.SSP4-6.0 + co2tseries.SSP5-3.4 + co2tseries.SSP5-8.5 + co2tseries.SSP1-1.9.latbnd + co2tseries.SSP1-2.6.latbnd + co2tseries.SSP2-4.5.latbnd + co2tseries.SSP3-7.0.latbnd + co2tseries.SSP4-3.4.latbnd + co2tseries.SSP4-6.0.latbnd + co2tseries.SSP5-3.4.latbnd + co2tseries.SSP5-8.5.latbnd CORE2_NYF.GISS CORE2_NYF.GXGXS @@ -135,10 +147,14 @@ presaero.clim_2000 presaero.clim_2010 presaero.trans_1850-2000 - presaero.rcp2.6 - presaero.rcp4.5 - presaero.rcp6.0 - presaero.rcp8.5 + presaero.SSP1-1.9 + presaero.SSP1-2.6 + presaero.SSP2-4.5 + presaero.SSP3-7.0 + presaero.SSP4-3.4 + presaero.SSP4-6.0 + presaero.SSP5-3.4 + presaero.SSP5-8.5 presaero.cplhist topo.observed @@ -244,7 +260,8 @@ $DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero $DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero $DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero - $DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero + null + $DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero $DIN_LOC_ROOT/atm/datm7/topo_forcing null @@ -303,21 +320,38 @@ domain.atm.TL319.151007.nc CORE2.t_10.ArcFactor.T62.1997-2004.nc fco2_datm_1765-2007_c100614.nc - fco2_datm_lat-bands_simyr_1750-2015_CMIP6_c180929.nc fco2_datm_global_simyr_1750-2014_CMIP6_c180929.nc - fco2_datm_rcp2.6_1765-2500_c130312.nc - fco2_datm_rcp4.5_1765-2500_c130312.nc - fco2_datm_rcp6.0_1765-2500_c130312.nc - fco2_datm_rcp8.5_1765-2500_c110919.nc + fco2_datm_lat-bands_simyr_1750-2015_CMIP6_c180929.nc + fco2_datm_lat-bandsSSP1-1.9_simyr_2014-2500_CMIP6_c190514.nc + fco2_datm_lat-bandsSSP1-2.6__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP2-4.5__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP3-7.0__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP4-3.4_simyr_2014-2500_CMIP6_c190514.nc + fco2_datm_lat-bandsSSP4-6.0__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP5-3.4__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP5-8.5__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_globalSSP1-1.9_simyr_2014-2501_CMIP6_c190514.nc + fco2_datm_globalSSP1-2.6__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP2-4.5__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP3-7.0__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP4-3.4_simyr_2014-2501_CMIP6_c190514.nc + fco2_datm_globalSSP4-6.0__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP5-3.4__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP5-8.5__simyr_2014-2501_CMIP6_c190506.nc qian.bc.domain.c130531.nc cruncep.bc.domain.0.9x1.25.nc cruncep.bc.domain.c100429.nc domain.permafrostRCN_P2.c2013.nc null aerosoldep_monthly_1849-2006_${CLM_USRDAT_NAME}.nc - aerosoldep_rcp2.6_monthly_1849-2104_${CLM_USRDAT_NAME}.nc - aerosoldep_rcp4.5_monthly_1849-2104_${CLM_USRDAT_NAME}.nc - aerosoldep_rcp6_monthly_1849-2104_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP1-1.9_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP1-2.6_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP2-4.5_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP3-7.0_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP4-3.4_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP4-6.0_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP5-3.4_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP5-8.5_monthly_1849-2101_${CLM_USRDAT_NAME}.nc aerosoldep_monthly_1850_mean_1.9x2.5_c090421.nc aerosoldep_monthly_2000_mean_1.9x2.5_c090421.nc @@ -327,10 +361,10 @@ aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc - aerosoldep_rcp2.6_monthly_1849-2104_1.9x2.5_c100402.nc - aerosoldep_rcp4.5_monthly_1849-2104_1.9x2.5_c100402.nc - aerosoldep_rcp6.0_monthly_1849-2104_1.9x2.5_c100830.nc - aerosoldep_rcp8.5_monthly_1849-2104_1.9x2.5_c100201.nc + aerodep_clm_SSP245_b.e21.BWSSP245cmip6.f09_g17.CMIP6-SSP2-4.5-WACCM.001_2014-2101_monthly_0.9x1.25_c190401.nc + aerodep_clm_SSP370_b.e21.BWSSP370cmip6.f09_g17.CMIP6-SSP3-7.0-WACCM.001_2014-2101_monthly_0.9x1.25_c190402.nc + null + aerodep_clm_SSP585_b.e21.BSSP585cmip6.f09_g17.CMIP6-SSP5-8.5.001_2014-2101_monthly_0.9x1.25_c190419.nc topodata_0.9x1.25_USGS_070110_stream_c151201.nc null @@ -441,6 +475,7 @@ $DIN_LOC_ROOT/atm/datm7/bias_correction/precip/cmap/cruncep $DIN_LOC_ROOT/atm/datm7/anomaly_forcing $DATM_CPLHIST_DIR + null $DIN_LOC_ROOT/atm/cam/chem/trop_mozart_aero/aero $DIN_LOC_ROOT/atm/datm7/topo_forcing $DATM_CPLHIST_DIR @@ -1398,7 +1433,7 @@ JRA.v1.3.q_10.TL319.2014.171019.nc JRA.v1.3.q_10.TL319.2015.171019.nc JRA.v1.3.q_10.TL319.2016.171019.nc - + JRA.v1.3.slp.TL319.1958.171019.nc JRA.v1.3.slp.TL319.1959.171019.nc @@ -1459,7 +1494,7 @@ JRA.v1.3.slp.TL319.2014.171019.nc JRA.v1.3.slp.TL319.2015.171019.nc JRA.v1.3.slp.TL319.2016.171019.nc - + JRA.v1.3.t_10.TL319.1958.171019.nc JRA.v1.3.t_10.TL319.1959.171019.nc @@ -1520,7 +1555,7 @@ JRA.v1.3.t_10.TL319.2014.171019.nc JRA.v1.3.t_10.TL319.2015.171019.nc JRA.v1.3.t_10.TL319.2016.171019.nc - + JRA.v1.3.u_10.TL319.1958.171019.nc JRA.v1.3.u_10.TL319.1959.171019.nc @@ -1581,7 +1616,7 @@ JRA.v1.3.u_10.TL319.2014.171019.nc JRA.v1.3.u_10.TL319.2015.171019.nc JRA.v1.3.u_10.TL319.2016.171019.nc - + JRA.v1.3.v_10.TL319.1958.171019.nc JRA.v1.3.v_10.TL319.1959.171019.nc @@ -1647,10 +1682,22 @@ fco2_datm_lat-bands_simyr_1750-2015_CMIP6_c180929.nc fco2_datm_global_simyr_1750-2014_CMIP6_c180929.nc fco2_datm_1765-2007_c100614.nc - fco2_datm_rcp2.6_1765-2500_c130312.nc - fco2_datm_rcp4.5_1765-2500_c130312.nc - fco2_datm_rcp6.0_1765-2500_c130312.nc - fco2_datm_rcp8.5_1765-2500_c110919.nc + fco2_datm_lat-bandsSSP1-1.9_simyr_2014-2500_CMIP6_c190514.nc + fco2_datm_lat-bandsSSP1-2.6__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP2-4.5__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP3-7.0__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP4-3.4_simyr_2014-2500_CMIP6_c190514.nc + fco2_datm_lat-bandsSSP4-6.0__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP5-3.4__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_lat-bandsSSP5-8.5__simyr_2014-2500_CMIP6_c190506.nc + fco2_datm_globalSSP1-1.9_simyr_2014-2501_CMIP6_c190514.nc + fco2_datm_globalSSP1-2.6__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP2-4.5__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP3-7.0__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP4-3.4_simyr_2014-2501_CMIP6_c190514.nc + fco2_datm_globalSSP4-6.0__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP5-3.4__simyr_2014-2501_CMIP6_c190506.nc + fco2_datm_globalSSP5-8.5__simyr_2014-2501_CMIP6_c190506.nc bias_correction.Prec.%y.nc bias_correction.Prec.%y.nc bias_correction.Prec.%y.nc @@ -1671,13 +1718,24 @@ aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc - aerosoldep_rcp2.6_monthly_1849-2104_1.9x2.5_c100402.nc - aerosoldep_rcp2.6_monthly_1849-2104_${CLM_USRDAT_NAME}.nc - aerosoldep_rcp4.5_monthly_1849-2104_1.9x2.5_c100402.nc - aerosoldep_rcp4.5_monthly_1849-2104_${CLM_USRDAT_NAME}.nc - aerosoldep_rcp6.0_monthly_1849-2104_1.9x2.5_c100830.nc - aerosoldep_rcp6_monthly_1849-2104_${CLM_USRDAT_NAME}.nc - aerosoldep_rcp8.5_monthly_1849-2104_1.9x2.5_c100201.nc + aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc + aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc + aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc + aerosoldep_WACCM.ensmean_monthly_hist_1849-2015_0.9x1.25_CMIP6_c180926.nc + + aerosoldep_SSP1-1.9_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP1-2.6_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP2-4.5_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP3-7.0_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP4-3.4_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP4-6.0_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP5-3.4_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + aerosoldep_SSP5-8.5_monthly_1849-2101_${CLM_USRDAT_NAME}.nc + + aerodep_clm_SSP245_b.e21.BWSSP245cmip6.f09_g17.CMIP6-SSP2-4.5-WACCM.001_2014-2101_monthly_0.9x1.25_c190401.nc + aerodep_clm_SSP370_b.e21.BWSSP370cmip6.f09_g17.CMIP6-SSP3-7.0-WACCM.001_2014-2101_monthly_0.9x1.25_c190402.nc + null + aerodep_clm_SSP585_b.e21.BSSP585cmip6.f09_g17.CMIP6-SSP5-8.5.001_2014-2101_monthly_0.9x1.25_c190419.nc topodata_0.9x1.25_USGS_070110_stream_c151201.nc @@ -1920,7 +1978,7 @@ prec prec - lwdn lwdn + lwdn lwdn swdn swdn @@ -1946,16 +2004,7 @@ CO2 co2diag - - CO2 co2diag - - - CO2 co2diag - - - CO2 co2diag - - + CO2 co2diag @@ -2050,7 +2099,7 @@ 1 1 1850 - 2005 + 2015 1979 1979 1979 @@ -2063,7 +2112,7 @@ 1 1849 - 1849 + 2015 1 $DATM_CPLHIST_YR_ALIGN @@ -2118,7 +2167,7 @@ 1958 1958 1850 - 2005 + 2015 1979 1979 2006 @@ -2130,7 +2179,7 @@ 2010 1849 - 1849 + 2015 1 $DATM_CPLHIST_YR_START @@ -2186,7 +2235,7 @@ 2016 2007 2014 - 2500 + 2500 2004 2012 2010 @@ -2200,7 +2249,7 @@ 2010 2014 - 2104 + 2101 1 $DATM_CPLHIST_YR_END @@ -2512,7 +2561,7 @@ cycle extend - extend + extend extend cycle diff --git a/cime/src/components/data_comps/dice/nuopc/dice_comp_mod.F90 b/cime/src/components/data_comps/dice/nuopc/dice_comp_mod.F90 index 68062a36a11a..8f1a7d6443ee 100644 --- a/cime/src/components/data_comps/dice/nuopc/dice_comp_mod.F90 +++ b/cime/src/components/data_comps/dice/nuopc/dice_comp_mod.F90 @@ -118,7 +118,8 @@ module dice_comp_mod !=============================================================================== subroutine dice_comp_advertise(importState, exportState, flds_scalar_name, & - ice_present, ice_prognostic, fldsFrIce_num, fldsFrIce, fldsToIce_num, fldsToIce, rc) + ice_present, ice_prognostic, flds_i2o_per_cat, & + fldsFrIce_num, fldsFrIce, fldsToIce_num, fldsToIce, rc) ! input/output arguments type(ESMF_State) , intent(inout) :: importState @@ -126,6 +127,7 @@ subroutine dice_comp_advertise(importState, exportState, flds_scalar_name, & character(len=*) , intent(in) :: flds_scalar_name logical , intent(in) :: ice_present logical , intent(in) :: ice_prognostic + logical , intent(in) :: flds_i2o_per_cat integer , intent(out) :: fldsToIce_num integer , intent(out) :: fldsFrIce_num type (fld_list_type) , intent(out) :: fldsToIce(:) @@ -154,6 +156,15 @@ subroutine dice_comp_advertise(importState, exportState, flds_scalar_name, & call dshr_fld_add(data_fld='ifrac', data_fld_array=avifld, model_fld='Si_ifrac', model_fld_array=avofld, & model_fld_concat=flds_i2x, model_fld_index=kiFrac, fldlist_num=fldsFrIce_num, fldlist=fldsFrIce) + if (flds_i2o_per_cat) then + call dshr_fld_add(model_fld='Si_ifrac_01' , model_fld_concat=flds_i2x, model_fld_index=kiFrac_01) + call dshr_fld_add(model_fld='Fioi_swpen_ifrac_01', model_fld_concat=flds_i2x, model_fld_index=kswpen_iFrac_01) + call dshr_fld_add(med_fld='Si_ifrac_n', fldlist_num=fldsFrIce_num, fldlist=fldsFrIce, & + ungridded_lbound=1, ungridded_ubound=1) + call dshr_fld_add(med_fld='Fioi_swpen_ifrac_n', fldlist_num=fldsFrIce_num, fldlist=fldsFrIce, & + ungridded_lbound=1, ungridded_ubound=1) + end if + ! export fields that have no corresponding stream field (computed internally) call dshr_fld_add(model_fld='Si_imask', model_fld_concat=flds_i2x, model_fld_index=km, & @@ -500,7 +511,7 @@ subroutine dice_comp_init(flds_i2o_per_cat, mpicom, compid, my_task, master_task ! optional per thickness category fields if (flds_i2o_per_cat) then kiFrac_01 = mct_aVect_indexRA(i2x,'Si_ifrac_01') - kswpen_iFrac_01 = mct_aVect_indexRA(i2x,'PFioi_swpen_ifrac_01') + kswpen_iFrac_01 = mct_aVect_indexRA(i2x,'Fioi_swpen_ifrac_01') end if call mct_aVect_init(x2i, rList=flds_x2i, lsize=lsize) @@ -966,10 +977,11 @@ end subroutine dice_comp_import !=============================================================================== - subroutine dice_comp_export(exportState, rc) + subroutine dice_comp_export(exportState, flds_i2o_per_cat, rc) ! input/output variables type(ESMF_State) :: exportState + logical, intent(in) :: flds_i2o_per_cat integer, intent(out) :: rc ! local variables @@ -981,6 +993,13 @@ subroutine dice_comp_export(exportState, rc) call dshr_export(i2x%rattr(kiFrac,:) , exportState, 'Si_ifrac', rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return + if (flds_i2o_per_cat) then + call dshr_export(i2x%rattr(kiFrac_01,:), exportState, 'Si_ifrac_n', ungridded_index=1, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + call dshr_export(i2x%rattr(kswpen_iFrac_01,:), exportState, 'Fioi_swpen_ifrac_n', ungridded_index=1, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + end if + call dshr_export(i2x%rattr(km,:) , exportState, 'Si_imask', rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return diff --git a/cime/src/components/data_comps/dice/nuopc/ice_comp_nuopc.F90 b/cime/src/components/data_comps/dice/nuopc/ice_comp_nuopc.F90 index 8bc0022e4b20..7f54b7815043 100644 --- a/cime/src/components/data_comps/dice/nuopc/ice_comp_nuopc.F90 +++ b/cime/src/components/data_comps/dice/nuopc/ice_comp_nuopc.F90 @@ -230,9 +230,13 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return endif + call NUOPC_CompAttributeGet(gcomp, name='flds_i2o_per_cat', value=cvalue, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + read(cvalue,*) flds_i2o_per_cat + call dice_comp_advertise(importstate, exportState, flds_scalar_name, & - ice_present, ice_prognostic, & - fldsFrIce_num, fldsFrIce, fldsToIce_num, fldsToIce, rc) + ice_present, ice_prognostic, flds_i2o_per_cat, & + fldsFrIce_num, fldsFrIce, fldsToIce_num, fldsToIce, rc) !---------------------------------------------------------------------------- ! Reset shr logging to original values @@ -347,6 +351,10 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) Emesh = ESMF_MeshCreate(filename=trim(cvalue), fileformat=ESMF_FILEFORMAT_ESMFMESH, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return + if (my_task == master_task) then + write(logunit,*) " obtaining dice mesh from " // trim(cvalue) + end if + !-------------------------------- ! Initialize model !-------------------------------- @@ -406,7 +414,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) calendar, modeldt, current_ymd, current_tod, cosArg) ! Pack export state - call dice_comp_export(exportState, rc=rc) + call dice_comp_export(exportState, flds_i2o_per_cat, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return call State_SetScalar(dble(nxg),flds_scalar_index_nx, exportState, & @@ -539,7 +547,7 @@ subroutine ModelAdvance(gcomp, rc) ! Pack export state !-------------------------------- - call dice_comp_export(exportState, rc=rc) + call dice_comp_export(exportState, flds_i2o_per_cat, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return !-------------------------------- diff --git a/cime/src/components/xcpl_comps/xglc/nuopc/glc_comp_nuopc.F90 b/cime/src/components/xcpl_comps/xglc/nuopc/glc_comp_nuopc.F90 index 83885a73e944..6da7c9f24cfe 100644 --- a/cime/src/components/xcpl_comps/xglc/nuopc/glc_comp_nuopc.F90 +++ b/cime/src/components/xcpl_comps/xglc/nuopc/glc_comp_nuopc.F90 @@ -494,7 +494,7 @@ subroutine field_setexport(exportState, fldname, lon, lat, nf, ungridded_index, else call ESMF_FieldGet(lfield, farrayPtr=data1d, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return - if (fldname == 'Sg_icemask' .or. 'fldname == Sg_icemask_coupled_fluxes' .or. fldname == 'Sg_ice_covered') then + if (fldname == 'Sg_icemask' .or. fldname == 'Sg_icemask_coupled_fluxes' .or. fldname == 'Sg_ice_covered') then data1d(:) = 1._r8 else do i = 1,size(data1d) diff --git a/cime/src/drivers/mct/cime_config/config_component.xml b/cime/src/drivers/mct/cime_config/config_component.xml index d3fb65a3e2e1..73cdb63e2b7d 100644 --- a/cime/src/drivers/mct/cime_config/config_component.xml +++ b/cime/src/drivers/mct/cime_config/config_component.xml @@ -1626,6 +1626,42 @@ glc2lnd state mapping file decomp type + + char + idmap_ignore + run_domain + env_run.xml + glc2ice flux mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and + will generate a runtime error if in fact a file is required for the given compset + + + + char + X,Y + X + run_domain + env_run.xml + glc2ice flux mapping file decomp type + + + + char + idmap_ignore + run_domain + env_run.xml + glc2ice state mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and + will generate a runtime error if in fact a file is required for the given compset + + + + char + X,Y + X + run_domain + env_run.xml + glc2ice state mapping file decomp type + + char idmap_ignore @@ -1644,6 +1680,42 @@ glc2ice runoff mapping file decomp type + + char + idmap_ignore + run_domain + env_run.xml + glc2ocn flux mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and + will generate a runtime error if in fact a file is required for the given compset + + + + char + X,Y + Y + run_domain + env_run.xml + glc2ocn flux mapping file decomp type + + + + char + idmap_ignore + run_domain + env_run.xml + glc2ocn state mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and + will generate a runtime error if in fact a file is required for the given compset + + + + char + X,Y + Y + run_domain + env_run.xml + glc2ocn state mapping file decomp type + + char idmap_ignore @@ -1680,6 +1752,42 @@ glc2ocn runoff mapping file decomp type for ice runoff + + char + idmap_ignore + run_domain + env_run.xml + ocn2glc flux mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and + will generate a runtime error if in fact a file is required for the given compset + + + + char + X,Y + Y + run_domain + env_run.xml + ocn2glc flux mapping file decomp type + + + + char + idmap_ignore + run_domain + env_run.xml + ocn2glc state mapping file - the default value idmap_ignore, if set, will be ignored by buildnml and + will generate a runtime error if in fact a file is required for the given compset + + + + char + X,Y + Y + run_domain + env_run.xml + ocn2glc state mapping file decomp type + + char idmap diff --git a/cime/src/drivers/mct/cime_config/config_component_cesm.xml b/cime/src/drivers/mct/cime_config/config_component_cesm.xml index 79f980074734..8a1a42a86994 100644 --- a/cime/src/drivers/mct/cime_config/config_component_cesm.xml +++ b/cime/src/drivers/mct/cime_config/config_component_cesm.xml @@ -18,10 +18,14 @@ Historic transient Twentieth century transient - CMIP5 rcp 2.6 forcing - CMIP5 rcp 4.5 forcing - CMIP5 rcp 6.0 forcing - CMIP5 rcp 8.5 forcing + CMIP6 SSP1-1.9 forcing + CMIP6 SSP1-2.6 forcing + CMIP6 SSP2-4.5 forcing + CMIP6 SSP3-7.0 forcing + CMIP6 SSP4-3.4 forcing + CMIP6 SSP4-6.0 forcing + CMIP6 SSP5-3.4 forcing + CMIP6 SSP5-8.5 forcing Biogeochemistry intercomponent with diagnostic CO2 with prognostic CO2 @@ -51,7 +55,7 @@ 0 run_flags env_run.xml - Sets level of task-to-node mapping output for the whole model + Sets level of task-to-node mapping output for the whole model (0: no output; 1: compact; 2: verbose). @@ -158,7 +162,7 @@ none CO2A CO2A - CO2A + CO2A CO2C CO2C diff --git a/cime/src/drivers/mct/cime_config/config_component_e3sm.xml b/cime/src/drivers/mct/cime_config/config_component_e3sm.xml index a1fc444c033c..63fe71989c36 100644 --- a/cime/src/drivers/mct/cime_config/config_component_e3sm.xml +++ b/cime/src/drivers/mct/cime_config/config_component_e3sm.xml @@ -726,108 +726,6 @@ compsets. - - char - idmap - run_domain - env_run.xml - ocn2glc flux mapping file - - - - char - X,Y - Y - run_domain - env_run.xml - ocn2glc flux mapping file decomp type - - - - char - idmap - run_domain - env_run.xml - ocn2glc state mapping file - - - - char - X,Y - Y - run_domain - env_run.xml - ocn2glc state mapping file decomp type - - - - char - idmap - run_domain - env_run.xml - glc2ocn flux mapping file - - - - char - X,Y - Y - run_domain - env_run.xml - glc2ocn flux mapping file decomp type - - - - char - idmap - run_domain - env_run.xml - glc2ocn state mapping file - - - - char - X,Y - Y - run_domain - env_run.xml - glc2ocn state mapping file decomp type - - - - char - idmap - run_domain - env_run.xml - glc2ice flux mapping file - - - - char - X,Y - X - run_domain - env_run.xml - glc2ice flux mapping file decomp type - - - - char - idmap - run_domain - env_run.xml - glc2ice state mapping file - - - - char - X,Y - X - run_domain - env_run.xml - glc2ice state mapping file decomp type - - integer diff --git a/cime/src/drivers/mct/cime_config/config_compsets.xml b/cime/src/drivers/mct/cime_config/config_compsets.xml index 0386fbfa0723..2c91672f4012 100644 --- a/cime/src/drivers/mct/cime_config/config_compsets.xml +++ b/cime/src/drivers/mct/cime_config/config_compsets.xml @@ -16,7 +16,7 @@ without any prognostic components. For the compsets below the following are the only allowable values of the components. - TIME = Time period (e.g. 2000, HIST, RCP8...) + TIME = Time period (e.g. 2000, HIST, SSP585...) ATM = [DATM, SATM, XATM] LND = [DLND, SLND, XLND] ICE = [DICE, SICE, XICE] diff --git a/cime/src/drivers/mct/main/cime_comp_mod.F90 b/cime/src/drivers/mct/main/cime_comp_mod.F90 index d22fd65753e4..a140c85b14a3 100644 --- a/cime/src/drivers/mct/main/cime_comp_mod.F90 +++ b/cime/src/drivers/mct/main/cime_comp_mod.F90 @@ -3907,37 +3907,37 @@ subroutine cime_run_ocnglc_coupling() if (glc_present) then - if (ocn_c2_glcshelf .and. glcshelf_c2_ocn) then - ! the boundary flux calculations done in the coupler require inputs from both GLC and OCN, - ! so they will only be valid if both OCN->GLC and GLC->OCN - - call prep_glc_calc_o2x_gx(timer='CPL:glcprep_ocn2glc') !remap ocean fields to o2x_g at ocean couping interval - - call prep_glc_calculate_subshelf_boundary_fluxes ! this is actual boundary layer flux calculation - !this outputs - !x2g_g/g2x_g, where latter is going - !to ocean, so should get remapped to - !ocean grid in prep_ocn_shelf_calc_g2x_ox - call prep_ocn_shelf_calc_g2x_ox(timer='CPL:glcpost_glcshelf2ocn') - !Map g2x_gx shelf fields that were updated above, to g2x_ox. - !Do this at intrinsic coupling - !frequency - call prep_ice_shelf_calc_g2x_ix(timer='CPL:glcpost_glcshelf2ice') - !Map g2x_gx shelf fields to g2x_ix. - !Do this at intrinsic coupling - !frequency. This is perhaps an - !unnecessary place to put this - !call, since these fields aren't - !changing on the intrinsic - !timestep. But I don't think it's - !unsafe to do it here. - - call prep_glc_accum_ocn(timer='CPL:glcprep_accum_ocn') !accum x2g_g fields here into x2g_gacc - - endif + if (ocn_c2_glcshelf .and. glcshelf_c2_ocn) then + ! the boundary flux calculations done in the coupler require inputs from both GLC and OCN, + ! so they will only be valid if both OCN->GLC and GLC->OCN + + call prep_glc_calc_o2x_gx(timer='CPL:glcprep_ocn2glc') !remap ocean fields to o2x_g at ocean couping interval + + call prep_glc_calculate_subshelf_boundary_fluxes ! this is actual boundary layer flux calculation + !this outputs + !x2g_g/g2x_g, where latter is going + !to ocean, so should get remapped to + !ocean grid in prep_ocn_shelf_calc_g2x_ox + call prep_ocn_shelf_calc_g2x_ox(timer='CPL:glcpost_glcshelf2ocn') + !Map g2x_gx shelf fields that were updated above, to g2x_ox. + !Do this at intrinsic coupling + !frequency + call prep_ice_shelf_calc_g2x_ix(timer='CPL:glcpost_glcshelf2ice') + !Map g2x_gx shelf fields to g2x_ix. + !Do this at intrinsic coupling + !frequency. This is perhaps an + !unnecessary place to put this + !call, since these fields aren't + !changing on the intrinsic + !timestep. But I don't think it's + !unsafe to do it here. + + call prep_glc_accum_ocn(timer='CPL:glcprep_accum_ocn') !accum x2g_g fields here into x2g_gacc endif + endif + end subroutine cime_run_ocnglc_coupling !---------------------------------------------------------------------------------- diff --git a/cime/src/drivers/mct/main/prep_ice_mod.F90 b/cime/src/drivers/mct/main/prep_ice_mod.F90 index e30032ee3d9d..36c478f6fc21 100644 --- a/cime/src/drivers/mct/main/prep_ice_mod.F90 +++ b/cime/src/drivers/mct/main/prep_ice_mod.F90 @@ -174,19 +174,19 @@ subroutine prep_ice_init(infodata, ocn_c2_ice, glc_c2_ice, glcshelf_c2_ice, rof_ endif if (glcshelf_c2_ice) then - if (iamroot_CPLID) then + if (iamroot_CPLID) then write(logunit,*) ' ' write(logunit,F00) 'Initializing mapper_Sg2i' - end if - call seq_map_init_rcfile(mapper_Sg2i, glc(1), ice(1), & + end if + call seq_map_init_rcfile(mapper_Sg2i, glc(1), ice(1), & 'seq_maps.rc','glc2ice_smapname:','glc2ice_smaptype:',samegrid_ig, & 'mapper_Sg2i initialization', esmf_map_flag) - if (iamroot_CPLID) then + if (iamroot_CPLID) then write(logunit,*) ' ' write(logunit,F00) 'Initializing mapper_Fg2i' - end if - call seq_map_init_rcfile(mapper_Fg2i, glc(1), ice(1), & + end if + call seq_map_init_rcfile(mapper_Fg2i, glc(1), ice(1), & 'seq_maps.rc','glc2ice_fmapname:','glc2ice_fmaptype:',samegrid_ig, & 'mapper_Fg2i initialization', esmf_map_flag) endif diff --git a/cime/src/share/util/shr_pio_mod.F90 b/cime/src/share/util/shr_pio_mod.F90 index 04461903423b..ad652cbaddc5 100644 --- a/cime/src/share/util/shr_pio_mod.F90 +++ b/cime/src/share/util/shr_pio_mod.F90 @@ -686,6 +686,7 @@ subroutine shr_pio_namelist_set(npes,mycomm, pio_stride, pio_root, pio_numiotask (pio_iotype .eq. PIO_IOTYPE_PNETCDF .or. & pio_iotype .eq. PIO_IOTYPE_NETCDF4P)) then pio_numiotasks = 2 + pio_stride = min(pio_stride, npes/2) endif !-------------------------------------------------------------------------- diff --git a/cime/tools/statistical_ensemble_test/README b/cime/tools/statistical_ensemble_test/README index 3cec75437c11..0439177cdcff 100644 --- a/cime/tools/statistical_ensemble_test/README +++ b/cime/tools/statistical_ensemble_test/README @@ -12,16 +12,16 @@ UF-CAM-ECT - detects issues in CAM and CLM (9 time step runs) POP-ECT - detects issues in POP and CICE (12 month runs) The ECT process involves comparing runs generated with -the new scenario ( 3 for CAM-ECT and UF-CAM-ECT, and 1 for POP-ECT) +the new scenario ( 3 for CAM-ECT and UF-CAM-ECT, and 1 for POP-ECT) to an ensemble built on a trusted machine (currently cheyenne). The python ECT tools are located in the pyCECT subdirectory or https://github.com/NCAR/PyCECT/releases. -OR- - -We now provide a web server for CAM-ECT and UF-CAM-ECT, where + +We now provide a web server for CAM-ECT and UF-CAM-ECT, where you can upload the (3) generated runs for comparison to our ensemble. -Please see the webpage at http://www.cesm.ucar.edu/models/cesm2/verification/ +Please see the webpage at http://www.cesm.ucar.edu/models/cesm2/verification/ for further instructions. ----------------------------------- @@ -40,12 +40,12 @@ $CESMDATAROOT/inputdata/validation/pop_ensembles If none of our ensembles are suitable for your needs, then you may create your own ensemble (and summary file) using the following instructions: - -(1) To create a new ensemble, use the ensemble.py script in this directory. + +(1) To create a new ensemble, use the ensemble.py script in this directory. This script creates and compiles a case, then creates clones of the original case, where the initial temperature perturbation is slightly modified for each ensemble member. At this time, cime includes functionality -to create ensembles for CAM-ECT, UF-CAM-ECT, and POP-ECT. +to create ensembles for CAM-ECT, UF-CAM-ECT, and POP-ECT. (2) Use --ect to specify whether ensemble is for CAM or POP. (See 'python ensemble.py -h' for additional details). @@ -71,21 +71,21 @@ POP-ECT: python ensemble.py --case /glade/scratch/cesm_user/cesm_tag/uf_ensemble/ensemble.cesm_tag.000 --mach cheyenne --ensemble 40 --ect pop --project P99999999 -Notes: +Notes: (a) ensemble.py accepts (most of) the argumenets of create_newcase (b) case name must end in ".000" and include the full path (c) ensemble size must be specified, and suggested defaults are listed - above. Note that for CAM-ECT and UF-CAM-ECT, the ensemble size + above. Note that for CAM-ECT and UF-CAM-ECT, the ensemble size needs to be larger than the number of variables that ECT will evaluate. -(5) Once all ensemble simulations have run successfully, copy every cam history -file (*.cam.h0.*) for CAM-ECT and UF-CAM-ECT) or monthly pop history file -(*.pop.h.*) for POP-ECT from each ensemble run directory into a separate directory. +(5) Once all ensemble simulations have run successfully, copy every cam history +file (*.cam.h0.*) for CAM-ECT and UF-CAM-ECT) or monthly pop history file +(*.pop.h.*) for POP-ECT from each ensemble run directory into a separate directory. Next create the ensemble summary using the pyCECT tool pyEnsSum.py (for CAM-ECT and -UF-CAM-ECT) or pyEnsSumPop.py (for POP-ECT). For details see README_pyEnsSum.rst +UF-CAM-ECT) or pyEnsSumPop.py (for POP-ECT). For details see README_pyEnsSum.rst and README_pyEnsSumPop.rst with the pyCECT tools. ------------------- @@ -103,14 +103,14 @@ attributes give this information. (2) For example, for CAM-ECT: python ensemble.py --case /glade/scratch/cesm_user/cesm_tag/camcase.cesm_tag.000 --ect cam --mach cheyenne --project P99999999 ---compset F2000climo --res f19_f19 +--compset F2000climo --res f19_f19_mg17 For example, for UF-CAM-ECT: -python ensemble.py --case /glade/scratch/cesm_user/cesm_tag/uf.camcase.cesm_tag.000 --ect cam --uf --mach cheyenne --project P99999999 --compset F2000climo --res f19_f19 +python ensemble.py --case /glade/scratch/cesm_user/cesm_tag/uf.camcase.cesm_tag.000 --ect cam --uf --mach cheyenne --project P99999999 --compset F2000climo --res f19_f19_mg17 For example, for POP-ECT: -python ensemble.py --case /glade/scratch/cesm_user/cesm_tag/popcase.cesm_tag.000 --ect pop --mach cheyenne --project P99999999 --compset G --res T62_g17 +python ensemble.py --case /glade/scratch/cesm_user/cesm_tag/popcase.cesm_tag.000 --ect pop --mach cheyenne --project P99999999 --compset G --res T62_g17 (3) Next verify the new simulation(s) with the pyCECT tool pyCECT.py (see README_pyCECT.rst with the pyCECT tools). From b15089f5415ca68e02657f614c769943b3d4ed8b Mon Sep 17 00:00:00 2001 From: James Foucar Date: Tue, 4 Jun 2019 11:20:04 -0600 Subject: [PATCH 2/2] Switch mosart buildlib to python and cmake --- components/mosart/cime_config/buildlib | 87 ++++++++++++++++---------- 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/components/mosart/cime_config/buildlib b/components/mosart/cime_config/buildlib index 9d499214e2c0..6f2cad32676c 100755 --- a/components/mosart/cime_config/buildlib +++ b/components/mosart/cime_config/buildlib @@ -1,43 +1,64 @@ -#! /usr/bin/env perl -use strict; +#!/usr/bin/env python -if ($#ARGV == -1) { - die " ERROR mosart.buildexe: must specify a caseroot input argument"; -} -my ($CASEROOT) = @ARGV; -chdir "${CASEROOT}"; +""" +build mosart library +""" +import sys, os -my $CASEBUILD = `./xmlquery CASEBUILD -value`; -my $SRCROOT = `./xmlquery SRCROOT -value`; -my $CASETOOLS = `./xmlquery CASETOOLS -value`; -my $OBJROOT = `./xmlquery OBJROOT -value`; -my $LIBROOT = `./xmlquery LIBROOT -value`; -my $GMAKE_J = `./xmlquery GMAKE_J -value`; -my $GMAKE = `./xmlquery GMAKE -value`; -my $MAKE_ARGS = `./Tools/get_standard_makefile_args`; -chomp($MAKE_ARGS); +_CIMEROOT = os.environ.get("CIMEROOT") +if _CIMEROOT is None: + raise SystemExit("ERROR: must set CIMEROOT environment variable") -chdir "${OBJROOT}/rof/obj"; +_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools") +sys.path.append(_LIBDIR) -open(file,">tmp_filepath") or die "ERROT: mosart.buildexe could not open file Filepath to write"; -print file "$CASEROOT/SourceMods/src.mosart \n"; -print file "$SRCROOT/components/mosart/src/riverroute \n"; -print file "$SRCROOT/components/mosart/src/cpl \n"; -print file "$SRCROOT/components/mosart/src/cpl_share \n"; -close(file); +from standard_script_setup import * +from CIME.buildlib import parse_input +from CIME.case import Case +from CIME.utils import expect, run_bld_cmd_ensure_logging +from CIME.build import get_standard_cmake_args -if (-f "Filepath") { - my $sysmod = "cmp -s tmp_filepath Filepath || mv -f tmp_filepath Filepath "; - system($sysmod) == 0 or die "ERROR: mosart.buidexe $sysmod failed: $?\n"; -} else { - my $sysmod = "mv -f tmp_filepath Filepath "; - system($sysmod) == 0 or die "ERROR: mosart.buidexe $sysmod failed: $?\n"; -} +logger = logging.getLogger(__name__) -my $sysmod = "$GMAKE complib -j $GMAKE_J MODEL=mosart COMPLIB=$LIBROOT/librof.a -f $CASETOOLS/Makefile ${MAKE_ARGS}"; -system($sysmod) == 0 or die "ERROR: mosart.buildexe $sysmod failed: $?\n"; +############################################################################### +def buildlib(bldroot, installpath, case): +############################################################################### + caseroot = case.get_value("CASEROOT") + srcroot = case.get_value("SRCROOT") + gmake_j = case.get_value("GMAKE_J") + gmake = case.get_value("GMAKE") + cmake_args = get_standard_cmake_args(case) -exit(0); + #------------------------------------------------------- + # create Filepath in bldroot, unlike most other components, + # mosart makes it's Filepath right here. + #------------------------------------------------------- + filepaths = \ + """{caseroot}/SourceMods/src.mosart +{srcroot}/components/mosart/src/riverroute +{srcroot}/components/mosart/src/cpl +{srcroot}/components/mosart/src/cpl_share +""".format(caseroot=caseroot, srcroot=srcroot) + with open(os.path.join(bldroot, "Filepath"), "w") as fd: + fd.write(filepaths) + #------------------------------------------------------- + # create the library in libroot + #------------------------------------------------------- + + run_bld_cmd_ensure_logging('cmake -DMODEL=mosart -DCOMPLIB=rof {cmake_args} {srcroot}/components'.format(cmake_args=cmake_args, srcroot=srcroot), logger, from_dir=bldroot) + run_bld_cmd_ensure_logging("{} -j {}".format(gmake, gmake_j), logger, from_dir=bldroot) + +############################################################################### +def _main_func(): +############################################################################### + caseroot, libroot, bldroot = parse_input(sys.argv) + with Case(caseroot, read_only=False) as case: + buildlib(bldroot, libroot, case) + +############################################################################### + +if __name__ == "__main__": + _main_func()