diff --git a/.gitignore b/.gitignore index 27823e7f54..e24a481063 100644 --- a/.gitignore +++ b/.gitignore @@ -85,9 +85,6 @@ ctsm.input_data_list.previous # mksurfdata unit tests unit_test_build -# Tools executables -/tools/mkprocdata_map/mkprocdata_map - # run_neon output directories /tools/site_and_regional/listing.csv /tools/site_and_regional/????/ diff --git a/.gitmodules b/.gitmodules index d16396da55..7274b9acd2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,7 +28,7 @@ [submodule "fates"] path = src/fates url = https://github.com/NGEET/fates -fxtag = sci.1.77.2_api.36.0.0 +fxtag = sci.1.78.2_api.36.0.0 fxrequired = AlwaysRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/fates-release diff --git a/README b/README index 8b4e15e557..c5c06daae7 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ -$CTSMROOT/README 04/19/2023 +$CTSMROOT/README 09/05/2024 -Community Terrestrial Systems Model (CTSM) science version 5.2 series -- source code, tools, +Community Terrestrial Systems Model (CTSM) science version 5.3 series -- source code, tools, offline-build and test scripts. This gives you everything you need to run CTSM with CESM with the CMEPS driver and CDEPS data models to provide CRU NCEP or GSWP3 forcing data in place of a modeled atmosphere. @@ -51,7 +51,7 @@ tools ------------- CTSM Offline tools to prepare input datasets and process out cime_config ------- Configuration files of cime for compsets and CTSM settings bin/git-fleximod -- Script to manage the needed sub-component source directories (handled with git submodule) py_env_create ----- Script to setup the python environment for CTSM python tools using conda -python ------------ Python modules used in tools and testing and automated checking of ALL CTSM python scirpts +python ------------ Python modules used in tools and testing and automated checking of ALL CTSM python scripts Directory structure only for a CTSM checkout: @@ -66,6 +66,8 @@ components/cmeps -------------------- CESM top level driver (for NUOPC driver [w components/cdeps -------------------- CESM top level data model shared code (for NUOPC driver). components/cism --------------------- CESM Community land Ice Sheet Model. components/mosart ------------------- Model for Scale Adaptive River Transport +components/mizuRoute ---------------- Reached based river transport model for water routing + (allows both gridded river and Hydrologic Responce Unit river grids) components/rtm ---------------------- CESM River Transport Model. Top level documentation ($CTSMROOT): @@ -74,6 +76,7 @@ README ------------------- This file README.md ---------------- File that displays on github under https::/github.com/ESCOMP/CTSM.git README.rst --------------- File that displays under the project in github README_GITFLEXIMOD.rst --- Information on how to work with git-fleximod for CTSM +WhatsNewInCTSM5.3.md ----- Overview document of the changes between ctsm5.2.0 and ctsm5.3.0 CODE_OF_CONDUCT.md ------- Code of Conduct for how to work with each other on the CTSM project Copyright ---------------- CESM Copyright file doc/UpdateChangeLog.pl --- Script to add documentation on a tag to the @@ -104,17 +107,16 @@ run_sys_tests --------------- Python script to send the standard CTSM testing of parse_cime.cs.status -------- Script to parse test status files cs.status.* created by create_test (can be used along with run_sys_tests) doc/Quickstart.GUIDE -------- Quick guide to using NUOPC scripts. -doc/IMPORTANT_NOTES --------- Some important notes about this version of - CTSM, configuration modes and namelist items - that are not validated or functional. +doc/IMPORTANT_NOTES.md ------ Some important notes about this version of + CTSM, configuration modes and namelist items + that are not validated or functional. doc/ChangeLog --------------- Detailed list of changes for each model version. doc/ChangeSum --------------- Summary one-line list of changes for each model version. doc/UsersGuide -------------- CTSM Users Guide -doc/IMPORTANT_NOTES --------- Some important notes on caveats for some configurations/namelist items bld/README ------------------ Description of how to use the build-namelist scripts. -bld/build-namelist ---------- Script to build CTSM namelists. +bld/build-namelist ---------- Lower level script to build CTSM namelists. cime_config/buildnml ------------- Build the CTSM namelist for CIME cime_config/buildlib ------------- Build the CTSM library @@ -130,8 +132,6 @@ cime_config/usermods_dirs -------- Directories of sets of user-modification subd tools/mksurfdata_esmf --------- Directory to build program to create surface dataset at any resolution. -tools/mkprocdata_map ---------- Process history data from unstructed grids to a gridded - format. tools/mkmapgrids -------------- NCL script to create a SCRIP grid file for a regular lat/lon grid (deprecated) tools/crop_calendars ---------- Tools to process and process and create crop calendar datasets for CTSM tools/modify_input_files ------ Script to modify existing CTSM input datasets in standard ways @@ -155,9 +155,9 @@ src/dyn_subgrid --- Dynamic land unit change src/init_interp --- Online interpolation scr/fates --------- FATES model and sub-directories Functionally Assembled Terrestrial Ecosystem Simulator (FATES) - Experimental Ecosystem Demography model + Ecosystem Demography model src/utils --------- Utility codes -src/self_tests ---- Internal testing (unit tests run as a part of a CTSM simulation) +src/self_tests ---- Internal testing (unit tests run as a part of a CTSM system test) src/unit_test_shr - Unit test shared modules for unit testing src/unit_test_stubs Unit test stubs that replicate CTSM code simpler diff --git a/README.md b/README.md index 045af9f6a1..5e800a0b77 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The Community Terrestrial Systems Model. -This includes the Community Land Model (CLM5.0 and CLM4.5) of the Community Earth System Model. +This includes the Community Land Model of the Community Earth System Model. For documentation, quick start, diagnostics, model output and references, see @@ -43,7 +43,7 @@ CTSM code management is provided primarily by: Software engineering team: - [Erik Kluzek](https://github.com/ekluzek) - [Bill Sacks](https://github.com/billsacks) -- [Sam Levis](https://github.com/slevisconsulting) +- [Sam Levis](https://github.com/slevis-lmwg) - [Adrianna Foster](https://github.com/adrifoster) - [Sam Rabin](https://github.com/samsrabin) - [Greg Lemieux](https://github.com/glemieux) diff --git a/README_GITFLEXIMOD.rst b/README_GITFLEXIMOD.rst index de6bbf392f..d1ab767645 100644 --- a/README_GITFLEXIMOD.rst +++ b/README_GITFLEXIMOD.rst @@ -67,10 +67,10 @@ Switching to a different CTSM branch or tag If you have already checked out a branch or tag and **HAVE NOT MADE ANY MODIFICATIONS** it is simple to change your sandbox. Say that you -checked out ctsm1.0.0 but really wanted to have ctsm1.1.0; +checked out ctsm5.2.0 but really wanted to have ctsm5.3.0; you would simply do the following:: - git checkout ctsm1.1.0 + git checkout ctsm5.3.0 ./bin/git-fleximod update You should **not** use this method if you have made any source code diff --git a/WhatsNewInCTSM5.3.md b/WhatsNewInCTSM5.3.md new file mode 100644 index 0000000000..b1f753081b --- /dev/null +++ b/WhatsNewInCTSM5.3.md @@ -0,0 +1,53 @@ +Purpose and description of changes since ctsm5.2.005 +---------------------------------------------------- + +Bring in updates needed for the CESM3.0 science capability/functionality "chill". Most importantly bringing +in: CN Matrix to speed up spinup for the BGC model, updated surface datasets, updated Leung 2023 dust emissions, +explicit Air Conditioning for the Urban model, updates to crop calendars. For clm6_0 physics these options are now +default turned on in addition to Sturm snow, and excess ice. + +Changes to CTSM Infrastructure: +=============================== + + - manage_externals removed and replaced by git-fleximod + - Ability to handle CAM7 in LND_TUNING_MODE + +Changes to CTSM Answers: +======================== + + Changes to defaults for clm6_0 physics: + - Urban explicit A/C turned on + - Snow thermal conductivity is now Sturm_1997 + - New IC file for f09 1850 + - New crop calendars + - Dust emissions is now Leung_2023 + - Excess ice is turned on + - Updates to MEGAN for BVOC's + - Updates to BGC fire method + + Changes for all physics versions: + + - Parameter files updated + - FATES parameter file updated + - Glacier region 1 is now undefined + - Update in FATES transient Land use + - Pass active glacier (CISM) runoff directly to river model (MOSART) + - Add the option for using matrix for Carbon/Nitrogen BGC spinup + +New surface datasets: +===================== + +- With new surface datasets the following GLC fields have region "1" set to UNSET: + glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior +- Updates to allow creating transient landuse timeseries files going back to 1700. +- Fix an important bug on soil fields that was there since ctsm5.2.0. This results in mksurfdata_esmf now giving identical answers with a change in number of processors, as it should. +- Add in creation of ne0np4.POLARCAP.ne30x4 surface datasets. +- Add version to the surface datasets. +- Remove the --hires_pft option from mksurfdata_esmf as we don't have the datasets for it. +- Remove VIC fields from surface datasets. + +New input datasets to mksurfdata_esmf: +====================================== + +- Updates in PFT/LAI/soil-color raw datasets (now from the TRENDY2024 timeseries that ends in 2023), as well as two fire datasets (AG fire, peatland), and the glacier behavior dataset. + diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 86b9943f34..b881cdbfac 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1665,6 +1665,7 @@ sub process_namelist_inline_logic { setup_logic_demand($opts, $nl_flags, $definition, $defaults, $nl); setup_logic_surface_dataset($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref); setup_logic_dynamic_subgrid($opts, $nl_flags, $definition, $defaults, $nl); + setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl, $physv); if ( remove_leading_and_trailing_quotes($nl_flags->{'clm_start_type'}) ne "branch" ) { setup_logic_initial_conditions($opts, $nl_flags, $definition, $defaults, $nl, $physv); } @@ -1894,7 +1895,7 @@ sub process_namelist_inline_logic { ################################# # namelist group: exice_streams # ################################# - setup_logic_exice($opts, $nl_flags, $definition, $defaults, $nl, $physv); + setup_logic_exice_streams($opts, $nl_flags, $definition, $defaults, $nl, $physv); ########################################## # namelist group: clm_temperature_inparm # @@ -2506,8 +2507,9 @@ sub setup_logic_surface_dataset { # consistent with it # MUST BE AFTER: setup_logic_demand which is where flanduse_timeseries is set # - my ($opts, $nl_flags, $definition, $defaults, $nl, $xmlvar_ref) = @_; + my ($opts_in, $nl_flags, $definition, $defaults, $nl, $xmlvar_ref) = @_; + my $opts = $opts_in; $nl_flags->{'flanduse_timeseries'} = "null"; my $flanduse_timeseries = $nl->get_value('flanduse_timeseries'); if (defined($flanduse_timeseries)) { @@ -2523,6 +2525,11 @@ sub setup_logic_surface_dataset { if ($flanduse_timeseries ne "null" && &value_is_true($nl_flags->{'use_cndv'}) ) { $log->fatal_error( "dynamic PFT's (setting flanduse_timeseries) are incompatible with dynamic vegetation (use_cndv=.true)." ); } + # Turn test option off for NEON until after XML is interpreted + my $test_files = $opts->{'test'}; + if ( &value_is_true($nl_flags->{'neon'})) { + $opts->{'test'} = 0; + } # # Always get the crop version of the datasets now and let the code turn it into the form desired # Provided this isn't with FATES on @@ -2548,7 +2555,7 @@ sub setup_logic_surface_dataset { 'use_crop'=>$nl_flags->{'use_crop'} ); } # - # Expand the XML variables for NEON cases so that NEONSITE will be used + # Expand the XML variables for NEON cases so that NEONSITE will be used and test for existence # if ( &value_is_true($nl_flags->{'neon'}) ) { my $fsurdat = $nl->get_value($var); @@ -2557,6 +2564,9 @@ sub setup_logic_surface_dataset { my $group = $definition->get_group_name($var); $nl->set_variable_value($group, $var, $newval); $log->verbose_message( "This is a NEON site and the fsurdat file selected is: $newval" ); + if ( $test_files and ($newval !~ /null|none/) and (! -f remove_leading_and_trailing_quotes($newval) ) ) { + $log->fatal_error("file not found: $var = $newval"); + } } } } @@ -2571,10 +2581,12 @@ sub setup_logic_initial_conditions { # # MUST BE AFTER: setup_logic_demand which is where flanduse_timeseries is set # AFTER: setup_logic_irrigate which is where irrigate is set + # AFTER: setup_logic_exice which is where use_excess_ice is set my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_; my $var = "finidat"; my $finidat = $nl->get_value($var); + $nl_flags->{'excess_ice_on_finidat'} = "unknown"; if ( $nl_flags->{'clm_start_type'} =~ /cold/ ) { if (defined $finidat ) { $log->warning("setting $var (either explicitly in your user_nl_clm or by doing a hybrid or branch RUN_TYPE)\n is incomptable with using a cold start" . @@ -2623,7 +2635,7 @@ sub setup_logic_initial_conditions { $settings{'sim_year'} = $st_year; } foreach my $item ( "mask", "maxpft", "irrigate", "glc_nec", "use_crop", "use_cn", "use_cndv", - "use_fates", + "use_fates", "use_excess_ice", "lnd_tuning_mode", ) { $settings{$item} = $nl_flags->{$item}; @@ -2644,6 +2656,7 @@ sub setup_logic_initial_conditions { my $done = 2; do { $try++; + $nl_flags->{'excess_ice_on_finidat'} = $settings{'use_excess_ice'}; add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, %settings ); # If couldn't find a matching finidat file, check if can turn on interpolation and try to find one again $finidat = $nl->get_value($var); @@ -4964,18 +4977,39 @@ sub setup_logic_cnmatrix { #------------------------------------------------------------------------------- sub setup_logic_exice { # - # excess ice streams + # excess ice streams, must be set before initial conditions # my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_; add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string()); my $use_exice = $nl->get_value( 'use_excess_ice' ); + # Put use_exice into nl_flags so can be referenced later + if ( value_is_true($use_exice) ) { + $nl_flags->{'use_excess_ice'} = ".true."; + } else { + $nl_flags->{'use_excess_ice'} = ".false."; + } +} + +#------------------------------------------------------------------------------- +sub setup_logic_exice_streams { + # + # excess ice streams + # Run after initial conditions found as well as after setup_logic_exice + # + my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_; + my $use_exice = $nl_flags->{'use_excess_ice'}; + my $excess_ice_on_finidat = $nl_flags->{'excess_ice_on_finidat'}; my $use_exice_streams = $nl->get_value( 'use_excess_ice_streams' ); my $finidat = $nl->get_value('finidat'); # If coldstart and use_excess_ice is on: if ( ( (not defined($use_exice_streams)) && value_is_true($use_exice) ) && string_is_undef_or_empty($finidat) ) { $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.'); $use_exice_streams = '.true.'; - # if excess ice is turned off + # If an finidat file was selected and use_excess_ice is on: + } elsif ( (not defined($use_exice_streams)) && value_is_true($use_exice) && (not value_is_true($excess_ice_on_finidat)) ) { + $nl->set_variable_value('exice_streams', 'use_excess_ice_streams' , '.true.'); + $use_exice_streams = '.true.'; + # if excess ice is turned off } elsif ( (not defined($use_exice_streams)) && (not value_is_true($use_exice)) ) { $use_exice_streams = '.false.'; # Checking for cold clm_start_type and not finidat here since finidat can be not set set in branch/hybrid runs and diff --git a/bld/README b/bld/README index 1e9517b189..feb0b8495c 100644 --- a/bld/README +++ b/bld/README @@ -4,16 +4,16 @@ CLM build and configure directory and scripts. Scripts to help you prepare to build CLM as a component within CESM, and setup a namelist for it. +This is a lower level script called from with CESM/CIME. + Important files/directories: ---------- Configure and build scripts ---------- (These scripts are also used by the cesm/cime scripts) +--------- Namelist build scripts config_files/clm_phys_vers.pm ------------- Perl module to handle different CLM versions -config_files/config_definition_ctsm.xml --- XML file defining all CTSM configuration items +config_files/config_definition_ctsm.xml --- XML file defining CTSM configuration items (mainly physics version) --------- Scripts to build the namelists ---------- (These scripts are also used by the cesm/cime scripts) build-namelist --- Build the namelists needed @@ -26,17 +26,17 @@ unit_testers --- Directory of scripts to test scipts in this directory ---------- XML Files describing namelists in namelist_files namelist_files/namelist_defaults_ctsm.xml --------- List of default values for the ctsm namelist namelist_files/namelist_defaults_overall.xml ------ List of default values for overall settings -namelist_files/namelist_defaults_usr_files.xml ---- List of default values for the user-files -namelist_files/namelist_definition_ctsm.xml -------- Definition of all namelist items for ctsm +namelist_files/namelist_defaults_usr_files.xml ---- List of default values for the user-files (deprecated) +namelist_files/namelist_definition_ctsm.xml ------- Definition of all namelist items for ctsm namelist_files/namelist_definition.xsl ------------ Describes how to view the xml file as html -namelist_files/namelist_defaults_drydep.xml ------- List of default values for the dry deposition module. namelist_files/use_cases -------------------------- Specific configurations that build-namelist uses namelist_files/use_cases/README ------------------- File explaining the naming convention for use_cases ---------- Driver namelist files, duplicated information from cime/driver/cime_config namelist_files/namelist_defaults_drv.xml ---------- List of default values for driver namelist defaults -namelist_files/namelist_defaults_drydep.xml ------- List of default values for dry deposition fields +namelist_files/namelist_defaults_drydep.xml ------- List of default values for dry deposition and MEGAN fields namelist_files/namelist_defaults_fire_emis.xml ---- List of default values for fire emission fields +namelist_files/namelist_defaults_dust_emis.xml ---- List of default values for the dust emissions module. namelist_files/namelist_definition_drv.xml -------- Definition of all driver namelist items namelist_files/namelist_definition_drv_flds.xml --- Definition of add driver fieldsnamelist items diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 81ce2704fa..650b21cb8d 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -238,7 +238,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. -li2021gswpfrc +li2024crujra li2016crufrc li2014qianfrc @@ -513,30 +513,30 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -'single_at_atm_topo','virtual','virtual','multiple' -'single_at_atm_topo','virtual','virtual','virtual' +'single_at_atm_topo','UNSET','virtual','multiple' +'single_at_atm_topo','UNSET','virtual','virtual' -'remains_in_place','replaced_by_ice','replaced_by_ice','replaced_by_ice' +'remains_in_place','UNSET','replaced_by_ice','replaced_by_ice' -'melted','melted','remains_ice','remains_ice' +'melted','UNSET','remains_ice','remains_ice' -lnd/clm2/paramdata/ctsm60_params.c240814.nc +lnd/clm2/paramdata/ctsm60_params.c240822.nc lnd/clm2/paramdata/ctsm51_params.c240814.nc lnd/clm2/paramdata/clm50_params.c240814.nc lnd/clm2/paramdata/clm45_params.c240814.nc @@ -886,232 +886,218 @@ attributes from the config_cache.xml file (with keys converted to upper-case). --> hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.true. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.true. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.true. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.true. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 use_excess_ice=.true. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 use_excess_ice=.true. hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 use_excess_ice=.true. - -hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 use_excess_ice=.true. -hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne120np4.pg3 maxpft=79 mask=tx0.1v3 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne120np4.pg3 maxpft=79 mask=tx0.1v3 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. @@ -1119,183 +1105,173 @@ attributes from the config_cache.xml file (with keys converted to upper-case). hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. - - - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne120np4.pg3 maxpft=79 mask=tx0.1v3 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne120np4.pg3 maxpft=79 mask=tx0.1v3 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. -hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +>hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. lnd/clm2/initdata_map/clmi.I1850Clm45BgcGs.0901-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc lnd/clm2/initdata_map/clmi.I1850Clm45BgcCruGs.1101-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc lnd/clm2/initdata_map/clmi.B1850Clm45BgcGs.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc lnd/clm2/initdata_map/clmi.B1850Clm45BgcGs.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc @@ -1333,7 +1309,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.I1850Clm50Sp.0181-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc @@ -1341,36 +1317,36 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc +>lnd/clm2/initdata_esmf/ctsm5.3/clmi.interp_from.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm50BgcCropCru-ciso.1526-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc lnd/clm2/initdata_map/clmi.B1850Clm50BgcCrop.0161-01-01.0.9x1.25_gx1v7_simyr1850_c200729.nc lnd/clm2/initdata_map/clmi.I1850Clm50SpCru.1706-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc @@ -1379,16 +1355,16 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm5_1" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm6_0" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc + lnd_tuning_mode="clm5_0_GSWP3v1" use_init_interp=".false." +>lnd/clm2/initdata_esmf/ctsm5.3/clmi.f19_interp_from.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc + +lnd/clm2/initdata_esmf/ctsm5.3/clmi.f19_interp_from.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc - + lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm6_0" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc @@ -1452,7 +1434,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc @@ -1463,14 +1445,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). --> lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc @@ -1478,7 +1460,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1486,7 +1468,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc @@ -1494,7 +1476,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1502,7 +1484,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc @@ -1512,25 +1494,25 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm5_1" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm6_0" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1539,21 +1521,21 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc @@ -1561,7 +1543,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1569,7 +1551,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc @@ -1577,7 +1559,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1586,15 +1568,15 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm5_1" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1603,21 +1585,21 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc @@ -1625,7 +1607,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1633,7 +1615,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc @@ -1641,7 +1623,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1650,15 +1632,15 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm6_0" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1667,7 +1649,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc @@ -1678,14 +1660,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). --> lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc @@ -1693,7 +1675,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1701,7 +1683,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc @@ -1709,7 +1691,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1717,7 +1699,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc @@ -1725,23 +1707,23 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm5_1" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm6_0" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1750,7 +1732,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc @@ -1758,14 +1740,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc @@ -1773,7 +1755,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1781,7 +1763,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc @@ -1789,7 +1771,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1798,15 +1780,15 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm5_1" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1815,7 +1797,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc @@ -1823,14 +1805,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr1979_c200806.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.1.9x2.5_gx1v7_simyr1979_c200806.nc @@ -1838,7 +1820,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc @@ -1846,7 +1828,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc @@ -1854,7 +1836,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc @@ -1863,15 +1845,15 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + phys="clm6_0" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc lnd/clm2/initdata_map/clmi.BHISTSp.2000-01-01.1.9x2.5_gx1v7_simyr2003_c200807.nc @@ -1880,7 +1862,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc @@ -1891,158 +1873,154 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_0.9x1.25_hist_2000_16pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1.9x2.5_hist_2000_16pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_10x15_hist_2000_16pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_4x5_hist_2000_16pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_mpasa60_hist_2000_16pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa60_hist_2000_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_mpasa15_hist_2000_16pfts_c240216.nc - +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa15_hist_2000_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_mpasa3p75_hist_2000_16pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa3p75_hist_2000_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_0.9x1.25_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_0.9x1.25_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1.9x2.5_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1.9x2.5_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_10x15_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_10x15_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_4x5_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_4x5_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1x1_brazil_hist_2000_78pfts_c240221.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1x1_brazil_hist_2000_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_5x5_amazon_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_5x5_amazon_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne30np4_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne30np4.pg2_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg2_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne30np4.pg3_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg3_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne16np4.pg3_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne16np4.pg3_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_0.125nldas2_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.125nldas2_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_T42_hist_2000_78pfts_c240425.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_T42_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_360x720cru_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_360x720cru_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_C96_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_C96_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1x1_numaIA_hist_2000_78pfts_c240221.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1x1_numaIA_hist_2000_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_mpasa480_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa480_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_mpasa120_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa120_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne3np4.pg3_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne3np4.pg3_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne120np4.pg3_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne120np4.pg3_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4CONUS.ne30x8_hist_2000_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4CONUS.ne30x8_hist_2000_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1x1_vancouverCAN_hist_2000_78pfts_c240221.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1x1_vancouverCAN_hist_2000_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1x1_mexicocityMEX_hist_2000_78pfts_c240221.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1x1_mexicocityMEX_hist_2000_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1x1_urbanc_alpha_hist_2000_78pfts_c240221.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_1x1_urbanc_alpha_synth_hist_2000_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_360x720cru_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_360x720cru_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_0.9x1.25_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1.9x2.5_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_10x15_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_4x5_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_mpasa480_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa480_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_mpasa120_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa120_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne30np4_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne30np4.pg2_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg2_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne30np4.pg3_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg3_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne3np4.pg3_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne3np4.pg3_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_C96_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_C96_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1x1_smallvilleIA_hist_1850_78pfts_c240221.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_1x1_smallvilleIA_synth_hist_1850_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/surfdata_1x1_cidadinhoBR_hist_2000_78pfts_c240613.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_1x1_cidadinhoBR_synth_hist_2000_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_1x1_brazil_hist_1850_78pfts_c240221.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1x1_brazil_hist_1850_78pfts_c240912.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne3np4.pg3_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne3np4.pg3_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne16np4.pg3_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne16np4.pg3_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne120np4.pg3_hist_1850_78pfts_c240216.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne120np4.pg3_hist_1850_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_1979_78pfts_c240425.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_1979_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_1979_78pfts_c240425.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_1979_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_ne0np4CONUS.ne30x8_hist_1979_78pfts_c240425.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4CONUS.ne30x8_hist_1979_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_0.9x1.25_PtVeg_nourb_1850_16pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_PtVeg_nourb_1850_16pfts_c240908.nc -lnd/clm2/surfdata_esmf/NEON/16PFT_mixed/surfdata_1x1_NEON_${NEONSITE}_hist_2000_16pfts_c240206.nc +lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/16PFT_mixed/surfdata_1x1_NEON_${NEONSITE}_hist_2000_16pfts_c240912.nc -lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_${NEONSITE}_hist_2000_78pfts_c240206.nc +lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_${NEONSITE}_hist_2000_78pfts_c240912.nc @@ -2050,45 +2028,45 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_360x720cru_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_360x720cru_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_1x1_brazil_SSP2-4.5_1850-2100_78pfts_c240221.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1x1_brazil_SSP2-4.5_1850-2100_78pfts_c240912.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_mpasa120_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_mpasa120_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne3np4.pg3_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne3np4.pg3_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne16np4.pg3_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne16np4.pg3_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne30np4.pg3_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne30np4.pg3_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_C96_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_C96_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_1x1_smallvilleIA_SSP2-4.5_1850-1855_78pfts_c240221.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/landuse.timeseries_1x1_smallvilleIA_synth_1850-1855_78pfts_c240908.nc @@ -2097,57 +2075,57 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_0.9x1.25_SSP1-2.6_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP1-2.6_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240216.nc + >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_360x720cru_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_360x720cru_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_1x1_brazil_SSP2-4.5_1850-2100_78pfts_c240221.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1x1_brazil_SSP2-4.5_1850-2100_78pfts_c240912.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_mpasa120_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_mpasa120_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne3np4.pg3_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne3np4.pg3_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne16np4.pg3_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne16np4.pg3_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne30np4.pg3_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne30np4.pg3_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_C96_SSP2-4.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_C96_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240425.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240425.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240425.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_0.9x1.25_SSP3-7.0_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP3-7.0_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_0.9x1.25_SSP4-6.0_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP4-6.0_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_0.9x1.25_SSP5-8.5_1850-2100_78pfts_c240216.nc +>lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP5-8.5_1850-2100_78pfts_c240908.nc diff --git a/bld/namelist_files/namelist_defaults_fire_emis.xml b/bld/namelist_files/namelist_defaults_fire_emis.xml index 54e67424d5..ad74eafd16 100644 --- a/bld/namelist_files/namelist_defaults_fire_emis.xml +++ b/bld/namelist_files/namelist_defaults_fire_emis.xml @@ -17,6 +17,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 'bc_a1 = BC','pom_a1 = 1.4*OC','SO2 = SO2' -lnd/clm2/firedata/fire_emis_factors_c140116.nc +lnd/clm2/firedata/fire_emission_factors_78PFTs_c20240624.nc diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index d2347121c1..417444914e 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -577,7 +577,7 @@ Only works when running with a non-stub glacier model. + valid_values="multiple,virtual,single_at_atm_topo,UNSET" > Behavior of each glacier region (GLACIER_REGION in surface dataset). First item corresponds to GLACIER_REGION with ID 0 in the surface dataset, second to GLACIER_REGION with ID 1, etc. @@ -590,12 +590,21 @@ Allowed values are: 'single_at_atm_topo': glacier landunits in these grid cells have a single column, whose elevation matches the atmosphere's topographic height (so that there is no adjustment due to downscaling) -Behavior of 'virtual' is required in the region where we have an ice sheet model +'UNSET': place-holder for non-existent regions +Most (if not all) of the region where there is an ice sheet model should have a behavior +of 'virtual': This behavior is needed to compute surface mass balance (SMB) in all +elevation classes for the sake of vertical downscaling, and is needed to allow two-way +feedbacks of glacier areas. You are allowed to have gridcells with non-virtual behavior in +this domain, but this should be minimized: SMB cannot be computed there, and CLM subgrid +areas will not remain in sync with the GLC model. (Within the icemask - i.e., the active +glc domain - you are NOT allowed to have gridcells with non-virtual behavior that also +have glacier_region_melt_behavior='replaced_by_ice': within the icemask, you're only +allowed to have non-virtual behavior in places where you are not computing SMB). + valid_values="replaced_by_ice,remains_in_place,UNSET" > Treatment of ice melt for each glacier region (GLACIER_REGION in surface dataset). First item corresponds to GLACIER_REGION with ID 0 in the surface dataset, second to GLACIER_REGION with ID 1, etc. @@ -604,17 +613,18 @@ Allowed values are: this results in positive liquid runoff and negative ice runoff 'remains_in_place': any melted ice remains in place as liquid until it refreezes; thus, ice melt does not result in any runoff -IMPORTANT NOTE: Regions with the 'remains_in_place' behavior also do not -compute SMB (because negative SMB would be pretty much meaningless in -those regions). Thus, you cannot use this behavior where GLC is -operating. -Regions with the 'replaced_by_ice' behavior also compute SMB for the -vegetated column. +'UNSET': place-holder for non-existent regions +IMPORTANT NOTE: Regions with the 'remains_in_place' behavior also do not compute SMB +(because negative SMB would be pretty much meaningless in those regions). Thus, most (if +not all) of the region where there is an ice sheet model should have the 'replaced_by_ice' +behavior; the SMB sent to the GLC model will be 0 in any gridcells with the +'remains_in_place' behavior. +Regions with the 'replaced_by_ice' behavior also compute SMB for the vegetated column. + valid_values="remains_ice,melted,UNSET" > Treatment of ice runoff for each glacier region (GLACIER_REGION in surface dataset). First item corresponds to GLACIER_REGION with ID 0 in the surface dataset, second to GLACIER_REGION with ID 1, etc. @@ -625,7 +635,13 @@ Allowed values are: 'melted': ice runoff generated by the CLM physics (primarily due to snow capping) is melted (generating a negative sensible heat flux) and runs off as liquid; this is appropriate in regions that have little iceberg calving in reality. This can be important to avoid unrealistic - cooling of the ocean and consequent runaway sea ice growth. + cooling of the ocean and consequent runaway sea ice growth. This option cannot be + combined with glacier_region_melt_behavior='replaced_by_ice': While there is nothing + fundamentally wrong with this combination, it can result in problematic, non-physical + fluxes (particularly, a large positive sensible heat flux during glacial melt in + regions where the ice sheet is not fully dynamic and two-way-coupled; see + https://github.com/ESCOMP/ctsm/issues/423 for details). +'UNSET': place-holder for non-existent regions Only applies when melt_non_icesheet_ice_runoff is .true. diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 5424c54352..3480243371 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -42,7 +42,7 @@ sub make_env_run { my %settings = @_; # Set default settings - my %env_vars = ( DIN_LOC_ROOT=>"MYDINLOCROOT", GLC_TWO_WAY_COUPLING=>"FALSE", LND_SETS_DUST_EMIS_DRV_FLDS=>"TRUE", NEONSITE=>"" ); + my %env_vars = ( DIN_LOC_ROOT=>"MYDINLOCROOT", GLC_TWO_WAY_COUPLING=>"FALSE", LND_SETS_DUST_EMIS_DRV_FLDS=>"TRUE", NEONSITE=>"", PLUMBER2SITE=>"" ); # Set any settings that came in from function call foreach my $item ( keys(%settings) ) { $env_vars{$item} = $settings{$item}; @@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3349; +my $ntests = 3994; if ( defined($opts{'compare'}) ) { - $ntests += 2007; + $ntests += 2437; } plan( tests=>$ntests ); @@ -393,9 +393,67 @@ sub cat_and_create_namelistinfile { my $namelistfile = "temp.namelistinfile_$site"; &cat_and_create_namelistinfile( $neondefaultfile, $neonsitefile, $namelistfile ); # + # Now run the site for both bgc and non-FATES + # + foreach my $bgc ( "bgc", "fates") { + if ( ($bgc eq "bgc") or ($site ne "STER" and $site ne "KONA")) { + my $options = "--res CLM_USRDAT --clm_usr_name NEON --no-megan --bgc $bgc --use_case 2018_control --infile $namelistfile"; + eval{ system( "$bldnml -envxml_dir . $options > $tempfile 2>&1 " ); }; + is( $@, '', "options: $options" ); + $cfiles->checkfilesexist( "$options", $mode ); + $cfiles->shownmldiff( "default", $mode ); + if ( defined($opts{'compare'}) ) { + $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); + $cfiles->dodiffonfile( "lnd_in", "$options", $mode ); + $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); + } + if ( defined($opts{'generate'}) ) { + $cfiles->copyfiles( "$options", $mode ); + } + } + } + system( "/bin/rm $namelistfile" ); + &cleanup(); +} +print "\n===============================================================================\n"; +print "Test the PLUMBER2 sites\n"; +print "=================================================================================\n"; +my $phys = "clm6_0"; +$mode = "-phys $phys"; +&make_config_cache($phys); +my $plumdir = "../../cime_config/usermods_dirs/PLUMBER2"; +foreach my $site ( + "AR-SLu", "AU-Emr", "AU-TTE", "CA-NS1", "CA-SF3", "CN-HaM", "DE-Obe", "ES-ES1", "FR-Gri", "IE-Dri", "IT-LMa", "IT-SRo", "RU-Fyo", "US-Aud", "US-Ho1", "US-Ne2", "US-Syv", "ZM-Mon", + "AT-Neu", "AU-Gin", "AU-Tum", "CA-NS2", "CH-Cha", "CN-Qia", "DE-Seh", "ES-ES2", "FR-Hes", "IT-Amp", "IT-Mal", "JP-SMF", "RU-Zot", "US-Bar", "US-KS2", "US-Ne3", "US-Ton", + "AU-ASM", "AU-GWW", "AU-Whr", "CA-NS4", "CH-Dav", "CZ-wet", "DE-SfN", "ES-LgS", "FR-LBr", "IT-BCi", "IT-MBo", "NL-Ca1", "SD-Dem", "US-Bkg", "US-Los", "US-NR1", "US-Tw4", + "AU-Cow", "AU-How", "AU-Wrr", "CA-NS5", "CH-Fru", "DE-Bay", "DE-Tha", "ES-LMa", "FR-Lq1", "IT-CA1", "IT-Noe", "NL-Hor", "SE-Deg", "US-Blo", "US-Me2", "US-PFa", "US-Twt", + "AU-Cpr", "AU-Lit", "AU-Ync", "CA-NS6", "CH-Oe1", "DE-Wet", "ES-VDA", "FR-Lq2", "IT-CA2", "IT-Non", "NL-Loo", "UK-Gri", "US-Bo1", "US-Me4", "US-Prr", "US-UMB", + "AU-Ctr", "AU-Otw", "BE-Bra", "CA-NS7", "CN-Cha", "DE-Geb", "DK-Fou", "FI-Hyy", "FR-Pue", "IT-CA3", "IT-PT1", "PL-wet", "UK-Ham", "US-Cop", "US-Me6", "US-SP1", "US-Var", + "AU-Cum", "AU-Rig", "BE-Lon", "CA-Qcu", "CN-Cng", "DE-Gri", "DK-Lva", "FI-Kaa", "GF-Guy", "IT-Col", "IT-Ren", "PT-Esp", "UK-PL3", "US-FPe", "US-MMS", "US-SP2", "US-WCr", + "AU-DaP", "AU-Rob", "BE-Vie", "CA-Qfo", "CN-Dan", "DE-Hai", "DK-Ris", "FI-Lom", "HU-Bug", "IT-Cpz", "IT-Ro1", "PT-Mi1", "US-AR1", "US-GLE", "US-MOz", "US-SP3", "US-Whs", + "AU-DaS", "AU-Sam", "BR-Sa3", "CA-SF1", "CN-Din", "DE-Kli", "DK-Sor", "FI-Sod", "ID-Pag", "IT-Isp", "IT-Ro2", "PT-Mi2", "US-AR2", "US-Goo", "US-Myb", "US-SRG", "US-Wkg", + "AU-Dry", "AU-Stp", "BW-Ma1", "CA-SF2", "CN-Du2", "DE-Meh", "DK-ZaH", "FR-Fon", "IE-Ca1", "IT-Lav", "IT-SR2", "RU-Che", "US-ARM", "US-Ha1", "US-Ne1", "US-SRM", "ZA-Kru" + ) { + &make_env_run( PLUMBER2SITE=>"$site" ); + # + # Concatonate default usermods and specific sitetogether expanding env variables while doing that + # + if ( ! -d "$plumdir/$site" ) { + print "PLUMBER2 directory is not there: $plumdir/$site\n"; + die "ERROR:: PLUMBER2 site does not exist: $site\n"; + } + my $plumdefaultfile = "$plumdir/defaults/user_nl_clm"; + my $plumsitefile = "$plumdir/$site/user_nl_clm"; + if ( ! -f $plumsitefile ) { + $plumsitefile = undef; + } + $ENV{'PLUMBER2'} = $site; + my $namelistfile = "temp.namelistinfile_$site"; + &cat_and_create_namelistinfile( $plumdefaultfile, $plumsitefile, $namelistfile ); + # # Now run the site # - my $options = "--res CLM_USRDAT --clm_usr_name NEON --no-megan --bgc bgc --use_case 2018_control --infile $namelistfile"; + my $options = "--res CLM_USRDAT --clm_usr_name PLUMBER2 --no-megan --bgc sp --infile $namelistfile"; eval{ system( "$bldnml -envxml_dir . $options > $tempfile 2>&1 " ); }; is( $@, '', "options: $options" ); $cfiles->checkfilesexist( "$options", $mode ); diff --git a/cime_config/SystemTests/lvg.py b/cime_config/SystemTests/lvg.py index 4b990313f5..d73f4e707b 100644 --- a/cime_config/SystemTests/lvg.py +++ b/cime_config/SystemTests/lvg.py @@ -32,12 +32,12 @@ def _case_one_setup(self): append_to_user_nl_files( caseroot=self._get_caseroot(), component="clm", - contents="glacier_region_behavior = 'single_at_atm_topo', 'virtual', 'virtual', 'multiple'", + contents="glacier_region_behavior = 'single_at_atm_topo', 'UNSET', 'virtual', 'multiple'", ) def _case_two_setup(self): append_to_user_nl_files( caseroot=self._get_caseroot(), component="clm", - contents="glacier_region_behavior = 'single_at_atm_topo', 'virtual', 'virtual', 'virtual'", + contents="glacier_region_behavior = 'single_at_atm_topo', 'UNSET', 'virtual', 'virtual'", ) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index e18b15a26e..36245661c0 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -29,7 +29,7 @@ - + FAIL CDEPS/#243 @@ -144,7 +144,7 @@ - + FAIL #2653 diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index d1c3171c98..0eb3d5012d 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -31,7 +31,7 @@ - + @@ -40,6 +40,7 @@ + @@ -90,7 +91,7 @@ - + @@ -98,6 +99,7 @@ + @@ -193,80 +195,76 @@ - + + - + + - + + - + + - + + - + + - + + - @@ -349,22 +347,24 @@ - + + - + + @@ -623,112 +623,124 @@ - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + - + + @@ -914,29 +926,14 @@ - - - - - - - - - - - - - - - - - + + @@ -1263,22 +1260,6 @@ - - - - - - - - - - - - - - - - @@ -1578,13 +1559,14 @@ - + + @@ -1998,6 +1980,7 @@ + @@ -2023,33 +2006,36 @@ - + + - + + - + + - + @@ -2058,17 +2044,18 @@ - + + - + @@ -2077,7 +2064,7 @@ - + @@ -2087,7 +2074,7 @@ - + @@ -2096,7 +2083,7 @@ - + @@ -2105,13 +2092,14 @@ - + + @@ -2132,13 +2120,14 @@ - + + @@ -2416,15 +2405,6 @@ - - - - - - - - - @@ -2550,7 +2530,7 @@ - + @@ -2558,6 +2538,7 @@ + @@ -3169,7 +3150,7 @@ - + @@ -3602,7 +3583,6 @@ - diff --git a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/include_user_mods index fe0e18cf88..1e4ddf5337 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStreams/include_user_mods @@ -1 +1,2 @@ ../default +../nofireemis diff --git a/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm index 91df3e2e61..8bd9f01335 100644 --- a/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm @@ -26,5 +26,4 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS', 'FATES_NEP', 'FATES_HET_RESP', 'FATES_FIRE_CLOSS', 'FATES_FIRE_FLUX_EL', 'FATES_CBALANCE_ERROR', 'FATES_ERROR_EL', 'FATES_LEAF_ALLOC', 'FATES_SEED_ALLOC', 'FATES_STEM_ALLOC', 'FATES_FROOT_ALLOC', -'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC', -'FATES_PATCHAREA_LU', 'FATES_DISTURBANCE_RATE_MATRIX_LULU' +'FATES_CROOT_ALLOC', 'FATES_STORE_ALLOC' diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm index a426c775b0..92434df000 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdAllVars/user_nl_clm @@ -26,7 +26,7 @@ hist_fincl1 = 'FATES_TLONGTERM', 'FATES_MORTALITY_CROWNSCORCH_SZPF','FATES_MORTALITY_CAMBIALBURN_SZPF','FATES_MORTALITY_TERMINATION_SZPF', 'FATES_MORTALITY_LOGGING_SZPF','FATES_MORTALITY_FREEZING_SZPF','FATES_MORTALITY_SENESCENCE_SZPF', 'FATES_MORTALITY_AGESCEN_SZPF','FATES_MORTALITY_AGESCEN_ACPF','FATES_MORTALITY_CANOPY_SZPF', -'FATES_M3_MORTALITY_CANOPY_SZPF','FATES_M3_MORTALITY_USTORY_SZPF','FATES_C13DISC_SZPF', +'FATES_M3_MORTALITY_CANOPY_SZPF','FATES_M3_MORTALITY_USTORY_SZPF', 'FATES_STOREC_CANOPY_SZPF','FATES_LEAFC_CANOPY_SZPF','FATES_LAI_CANOPY_SZPF','FATES_CROWNAREA_CANOPY_SZPF', 'FATES_CROWNAREA_USTORY_SZPF','FATES_NPLANT_CANOPY_SZPF','FATES_MORTALITY_USTORY_SZPF','FATES_STOREC_USTORY_SZPF', 'FATES_LEAFC_USTORY_SZPF','FATES_LAI_USTORY_SZPF','FATES_NPLANT_USTORY_SZPF','FATES_CWD_ABOVEGROUND_DC', diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLUH2/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdLUH2/user_nl_clm index e25490ffbb..55650230a4 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLUH2/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLUH2/user_nl_clm @@ -7,3 +7,5 @@ use_fates_nocomp = .true. use_fates_fixed_biogeog = .true. use_fates_sp = .false. use_fates_potentialveg = .false. +hist_fincl1 = 'FATES_PATCHAREA_LU', 'FATES_DISTURBANCE_RATE_MATRIX_LULU', +'FATES_TRANSITION_MATRIX_LULU' diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands new file mode 100644 index 0000000000..c97c0dfea7 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands @@ -0,0 +1,3 @@ +#!/bin/bash + +./xmlchange CLM_BLDNML_OPTS="-i-clm_demand -flanduse_timeseries" --append diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm index b27a74031c..f718010b07 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm @@ -1,2 +1 @@ -flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_4x5_hist_16_CMIP6_1850-2015_c230620.nc' fates_harvest_mode = 'landuse_timeseries' diff --git a/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm index 4fc6fc2373..d27565d98f 100644 --- a/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/Hillslope/user_nl_clm @@ -6,6 +6,6 @@ hillslope_transmissivity_method = 'LayerSum' hillslope_pft_distribution_method = 'PftLowlandUpland' hillslope_soil_profile_method = 'Uniform' -fsurdat = '$DIN_LOC_ROOT/lnd/clm2/testdata/surfdata_10x15_hist_2000_78pfts_c240216.synthetic_hillslopes.nc' +fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_10x15_hist_2000_78pfts_c240905.synthetic_hillslopes3.nc' use_ssre = .false. diff --git a/cime_config/testdefs/testmods_dirs/clm/SNICARFRC/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/SNICARFRC/include_user_mods index fe0e18cf88..1e4ddf5337 100644 --- a/cime_config/testdefs/testmods_dirs/clm/SNICARFRC/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/SNICARFRC/include_user_mods @@ -1 +1,2 @@ ../default +../nofireemis diff --git a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm index 4bfc0520f8..d51360c82b 100644 --- a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm @@ -1,2 +1,2 @@ use_soil_matrixcn = .true. -paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c240814.nc' +paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c240822.nc' diff --git a/cime_config/testdefs/testmods_dirs/clm/collapse_pfts_78_to_16_decStart_f10/README b/cime_config/testdefs/testmods_dirs/clm/collapse_pfts_78_to_16_decStart_f10/README index dbd0696317..f19dd1893e 100644 --- a/cime_config/testdefs/testmods_dirs/clm/collapse_pfts_78_to_16_decStart_f10/README +++ b/cime_config/testdefs/testmods_dirs/clm/collapse_pfts_78_to_16_decStart_f10/README @@ -4,22 +4,6 @@ new combination do_transient_crops = .true. and use_crop = .false. while exercising the collapse2gencrop branch ability to collapse the full crop data to clm's generic crops. -According to the file -bld/namelist_files/namelist_defaults_ctsm.xml -the following two files used in this test -are default files for the following options: - -fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_10x15_hist_1850_78pfts_c240216.nc' -hgrid="10x15" sim_year="1850" use_crop=".false." irrigate=".true." -hgrid="10x15" sim_year="1850" use_crop=".true." - -flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240216.nc' --hgrid="10x15" sim_year_range="1850-2000" use_crop=".true." --hgrid="10x15" rcp="8.5" sim_year_range="1850-2100" use_crop=".true." --hgrid="10x15" rcp="6" sim_year_range="1850-2100" use_crop=".true." --hgrid="10x15" rcp="4.5" sim_year_range="1850-2100" use_crop=".true." --hgrid="10x15" rcp="2.6" sim_year_range="1850-2100" use_crop=".true." - This test includes the settings of the decStart test so as to also test the end-of-year transition since it's an IHist case and transient vegetation gets updated every new year. diff --git a/cime_config/testdefs/testmods_dirs/clm/collapse_pfts_78_to_16_decStart_f10/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/collapse_pfts_78_to_16_decStart_f10/user_nl_clm deleted file mode 100644 index d7be01280b..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/collapse_pfts_78_to_16_decStart_f10/user_nl_clm +++ /dev/null @@ -1,2 +0,0 @@ -fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_10x15_hist_1850_78pfts_c240216.nc' -flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240216.nc' diff --git a/cime_config/testdefs/testmods_dirs/clm/f09_dec1990Start_GU_LULCC/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/f09_dec1990Start_GU_LULCC/user_nl_clm index 0dbc0b4942..e9040ca841 100644 --- a/cime_config/testdefs/testmods_dirs/clm/f09_dec1990Start_GU_LULCC/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/f09_dec1990Start_GU_LULCC/user_nl_clm @@ -1,5 +1,2 @@ - ! Specify a dataset that has non-zero Gross Unrepresented Land Use change fields on it - ! And turn it on - flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240216.nc' - fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/surfdata_0.9x1.25_hist_1850_78pfts_c240216.nc' + ! Turn on Gross Unrepresented Land Use do_grossunrep = .true. diff --git a/cime_config/testdefs/testmods_dirs/clm/nofire/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/nofire/include_user_mods new file mode 100644 index 0000000000..dbad2e75e6 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/nofire/include_user_mods @@ -0,0 +1 @@ +../nofireemis diff --git a/cime_config/testdefs/testmods_dirs/clm/nofire/shell_commands b/cime_config/testdefs/testmods_dirs/clm/nofire/shell_commands index fe06fd1042..bbe1216f7d 100644 --- a/cime_config/testdefs/testmods_dirs/clm/nofire/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/nofire/shell_commands @@ -1,5 +1,4 @@ -./xmlchange CLM_BLDNML_OPTS="-no-fire_emis" --append ./xmlchange BFBFLAG="TRUE" diff --git a/cime_config/testdefs/testmods_dirs/clm/nofireemis/shell_commands b/cime_config/testdefs/testmods_dirs/clm/nofireemis/shell_commands new file mode 100644 index 0000000000..2cef76cc58 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/nofireemis/shell_commands @@ -0,0 +1,3 @@ +./xmlchange CLM_BLDNML_OPTS="-no-fire_emis" --append + + diff --git a/cime_config/testdefs/testmods_dirs/clm/o3lombardozzi2015/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/o3lombardozzi2015/include_user_mods index fe0e18cf88..1e4ddf5337 100644 --- a/cime_config/testdefs/testmods_dirs/clm/o3lombardozzi2015/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/o3lombardozzi2015/include_user_mods @@ -1 +1,2 @@ ../default +../nofireemis diff --git a/cime_config/testdefs/testmods_dirs/clm/pauseResume/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/pauseResume/include_user_mods index fe0e18cf88..1e4ddf5337 100644 --- a/cime_config/testdefs/testmods_dirs/clm/pauseResume/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/pauseResume/include_user_mods @@ -1 +1,2 @@ ../default +../nofireemis diff --git a/cime_config/testdefs/testmods_dirs/clm/prescribed/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/prescribed/include_user_mods index fe0e18cf88..1e4ddf5337 100644 --- a/cime_config/testdefs/testmods_dirs/clm/prescribed/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/prescribed/include_user_mods @@ -1 +1,2 @@ ../default +../nofireemis diff --git a/cime_config/testdefs/testmods_dirs/clm/pts/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/pts/include_user_mods index fe0e18cf88..1e4ddf5337 100644 --- a/cime_config/testdefs/testmods_dirs/clm/pts/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/pts/include_user_mods @@ -1 +1,2 @@ ../default +../nofireemis diff --git a/cime_config/testdefs/testmods_dirs/clm/smallville_dynlakes_monthly/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/smallville_dynlakes_monthly/user_nl_clm index c86418dabd..6223cc203f 100644 --- a/cime_config/testdefs/testmods_dirs/clm/smallville_dynlakes_monthly/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/smallville_dynlakes_monthly/user_nl_clm @@ -6,7 +6,7 @@ do_transient_lakes = .true. ! Key points are that lake area starts as 0, increases after the first year, then decreases after the second year. ! PCT_CROP is also changed so that PCT_LAKE + PCT_CROP <= 100. (Here, PCT_CROP increases and decreases at the same time as PCT_LAKE in order to exercise the simultaneous increase or decrease of two landunits, but that isn't a critical part of this test.) ! Note that the use of this file means that this testmod can only be used with the 1x1_smallvilleIA grid. -flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_1x1_smallvilleIA_SSP2-4.5_1850-1855_78pfts_dynLakes_c240221.nc' +flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/landuse.timeseries_1x1_smallvilleIA_synth_SSP2-4.5_1850-1855_78pfts_dynLakes_c240912.nc' ! NOTE slevis (2024/2/23) Adding option for tests to pass. In the long term ! ensure that subset_data generates fsurdat and landuse files consistent with diff --git a/cime_config/testdefs/testmods_dirs/clm/smallville_dynurban_monthly/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/smallville_dynurban_monthly/user_nl_clm index a5bdb76ac3..958265cffc 100644 --- a/cime_config/testdefs/testmods_dirs/clm/smallville_dynurban_monthly/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/smallville_dynurban_monthly/user_nl_clm @@ -7,7 +7,7 @@ do_transient_urban = .true. ! Medium density urban is set to zero to test the memory-saving behavior of PCT_URBAN_MAX. ! PCT_CROP is also changed so that PCT_URBAN + PCT_CROP <= 100. (Here, PCT_CROP increases and decreases at the same time as PCT_URBAN in order to exercise the simultaneous increase or decrease of two landunits, but that isn't a critical part of this test.) ! Note that the use of this file means that this testmod can only be used with the 1x1_smallvilleIA grid. -flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.2.0/landuse.timeseries_1x1_smallvilleIA_SSP2-4.5_1850-1855_78pfts_dynUrban_c240221.nc' +flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/landuse.timeseries_1x1_smallvilleIA_synth_SSP2-4.5_1850-1855_78pfts_dynUrban_c240912.nc' ! NOTE slevis (2024/2/23) Adding option for tests to pass. In the long term ! ensure that subset_data generates fsurdat and landuse files consistent with diff --git a/cime_config/testdefs/testmods_dirs/clm/waccmx_offline/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/waccmx_offline/include_user_mods index fe0e18cf88..1e4ddf5337 100644 --- a/cime_config/testdefs/testmods_dirs/clm/waccmx_offline/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/waccmx_offline/include_user_mods @@ -1 +1,2 @@ ../default +../nofireemis diff --git a/cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_clm b/cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_clm index 1a9847a69b..e49d110d51 100644 --- a/cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_clm +++ b/cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_clm @@ -18,9 +18,6 @@ ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable !---------------------------------------------------------------------------------- -flanduse_timeseries = ' ' ! This isn't needed for a non transient case, but will be once we start using transient compsets -fsurdat = "$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/NEON/16PFT_mixed/surfdata_1x1_NEON_${NEONSITE}_hist_2000_16pfts_c240206.nc" - ! h1 output stream hist_fincl2 = 'FATES_AUTORESP','FCEV','FCTR','FGEV','FIRA','FSA','FSH','FATES_GPP','FATES_GPP_PF','H2OSOI', 'SNOW_DEPTH','TBOT','TSOI','SOILC_vr','FATES_NPP','FATES_NPP_PF','FATES_VEGC','FATES_VEGC_PF' diff --git a/cime_config/usermods_dirs/NEON/defaults/user_nl_clm b/cime_config/usermods_dirs/NEON/defaults/user_nl_clm index b73da1f33e..f0e7142990 100644 --- a/cime_config/usermods_dirs/NEON/defaults/user_nl_clm +++ b/cime_config/usermods_dirs/NEON/defaults/user_nl_clm @@ -18,9 +18,6 @@ ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable !---------------------------------------------------------------------------------- -flanduse_timeseries = ' ' ! This isn't needed for a non transient case, but will be once we start using transient compsets -fsurdat = "$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_${NEONSITE}_hist_2000_78pfts_c240206.nc" - ! h1 output stream hist_fincl2 = 'AR','ELAI','FCEV','FCTR','FGEV','FIRA','FSA','FSH','GPP','H2OSOI', 'HR','SNOW_DEPTH','TBOT','TSOI','SOILC_vr','FV','NET_NMIN_vr' diff --git a/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_clm b/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_clm index fe23065798..5216afb381 100644 --- a/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_clm +++ b/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_clm @@ -19,6 +19,6 @@ !---------------------------------------------------------------------------------- flanduse_timeseries = ' ' ! This isn't needed for a non transient case, but will be once we start using transient compsets -fsurdat = "$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/PLUMBER2/surfdata_1x1_PLUMBER2_${PLUMBER2SITE}_hist_2000_16pfts_c240326.nc" +fsurdat = "$DIN_LOC_ROOT/lnd/clm2/surfdata_esmf/PLUMBER2/ctsm5.3.0/surfdata_1x1_PLUMBER2_${PLUMBER2SITE}_hist_2000_16pfts_c240912.nc" ! custom namelist changes for each site / case diff --git a/cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm b/cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm index 3486d7abfb..9aeba5c9d3 100644 --- a/cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm +++ b/cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm @@ -5,5 +5,5 @@ ! This differs from the default in that it turns on virtual columns over Antarctica ! This is desired so that we have the output needed to drive a later offline CISM Antarctica simulation ! However, this increases the cost of CLM by about 10% -glacier_region_behavior = 'single_at_atm_topo', 'virtual', 'virtual', 'virtual' +glacier_region_behavior = 'single_at_atm_topo', 'UNSET', 'virtual', 'virtual' diff --git a/doc/ChangeLog b/doc/ChangeLog index 3499c7d720..d11efad6b3 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,453 @@ =============================================================== +Tag name: ctsm5.3.0 +Originator(s): multiple (see below) +Date: Wed 25 Sep 2024 01:22:06 AM MDT +One-line Summary: Update surface datasets, CN Matrix, CLM60: excess ice on, explicit A/C on, crop calendars, Sturm snow, Leung dust emissions, prigent roughness data + +Purpose and description of changes since ctsm5.2.005 +---------------------------------------------------- + +Bring in updates needed for the CESM3.0 science capability/functionality "chill". Most importantly bringing +in: CN Matrix to speed up spinup for the BGC model, updated surface datasets, updated Leung 2023 dust emissions, +explicit Air Conditioning for the Urban model, updates to crop calendars. For clm6_0 physics these options are now +default turned on in addition to Sturm snow, and excess ice. + +Changes to CTSM Infrastructure: +=============================== + + - manage_externals removed and replaced by git-fleximod + - Ability to handle CAM7 in LND_TUNING_MODE + +Changes to CTSM Answers: +======================== + + Changes to defaults for clm6_0 physics: + - Urban explicit A/C turned on + - Snow thermal conductivity is now Sturm_1997 + - New IC file for f09 1850 + - New crop calendars + - Dust emissions is now Leung_2023 + - Excess ice is turned on + - Updates to MEGAN for BVOC's + - Updates to BGC fire method + + Changes for all physics versions: + + - Parameter files updated + - FATES parameter file updated + - Glacier region 1 is now undefined + - Update in FATES transient Land use + - Pass active glacier (CISM) runoff directly to river model (MOSART) + - Add the option for using matrix for Carbon/Nitrogen BGC spinup + +New surface datasets: +===================== + +- With new surface datasets the following GLC fields have region "1" set to UNSET: + glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior +- Updates to allow creating transient landuse timeseries files going back to 1700. +- Fix an important bug on soil fields that was there since ctsm5.2.0. This results in mksurfdata_esmf now giving identical answers with a change in number of processors, as it should. +- Add in creation of ne0np4.POLARCAP.ne30x4 surface datasets. +- Add version to the surface datasets. +- Remove the --hires_pft option from mksurfdata_esmf as we don't have the datasets for it. +- Remove VIC fields from surface datasets. + +New input datasets to mksurfdata_esmf: +====================================== + +- Updates in PFT/LAI/soil-color raw datasets (now from the TRENDY2024 timeseries that ends in 2023), as well as two fire datasets (AG fire, peatland), and the glacier behavior dataset. + +Contributors (alphabetical order by github handle) +------------ + + @adrifoster + @billsacks + @cathyxinchangli + @chrislxj + @dmleung + @ekluzek + @Face2sea + @fang-bowen + @glemieux + @HuiWangWanderInGitHub + @jedwards + @jenniferholm + @jfkok + @KateC + @keerzhang1 + @lawrencepj1 + @lifang0209 + @linniahawkins + @mvdebolskiy + @mvertens + @olyson + @rgknox + @samsrabin + @slevis-lmwg + @TeaganKing + @wwieder + +Significant changes to scientifically-supported configurations since ctsm5.2.005 +-------------------------------------------------------------------------------- + +glacier_behavior namelist items changed for clm4_5 and clm5_0 physics +parameter and surface datasets updated for all physics options + +Notes of particular relevance for users for ctsm5.2.005 to ctsm5.3.0 +-------------------------------------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): + With the updated surface datasets all finidat files being used will need to + be run with use_init_interp = TRUE + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + New namelist items or options: + fire_method -- new options: li2024gswpfrc,li2024crujra + + new fire options: + max_rh30_affecting_fuel + defo_fire_precip_thresh_bet + defo_fire_precip_thresh_bdt + nonborpeat_fire_precip_denom + borpeat_fire_soilmoist_denom + + new fates options: + fates_harvest_mode + use_fates_lupft + use_fates_potentialveg + flandusepftdat + + new physics options: + hillslope_fsat_equals_zero + urban_explicit_ac + use_prigent_roughness + stream_fldfilename_prigentroughness + stream_meshfile_prigentroughness + excess_ice_coldstart_temp + excess_ice_coldstart_depth + + new cropcal options: + stream_year_last_cropcal_swindows + model_year_align_cropcal_swindows + stream_year_first_cropcal_cultivar_gdds + stream_year_last_cropcal_cultivar_gdds + model_year_align_cropcal_cultivar_gdds + stream_fldFileName_gdd20_baseline + stream_gdd20_seasons + flush_gdd20 + allow_invalid_gdd20_season_inputs + stream_fldFileName_gdd20_season_start + stream_fldFileName_gdd20_season_end + + cropcal options with names changed: + stream_year_first_cropcal => cropcals_rx + stream_year_last_cropcal => cropcals_rx_adapt + model_year_align_cropcal => stream_year_first_cropcal_swindows + + new CN matrix options: + use_matrixcn + use_soil_matrixcn + hist_wrt_matrixcn_diag + spinup_matrixcn + nyr_forcing + nyr_sasu + iloop_avg + + Namelist items removed: + use_fates_logging + use_dynroot + + Changes to XML options: + + LND_TUNING_MODE: New forcing options for cam4.0, cam5.0, and cam7.0 + CLM_BLDNML_OPTS: "-bgc cn" option removed + CLM_ACCELERATED_SPINUP: sasu option added + LND_SETS_DUST_EMIS_DRV_FLDS: New option to determine if CAM or CTSM set dust emission options + PLUMBER2SITE: New option to run for PLUMBER2 tower site locations + +Changes made to namelist defaults (e.g., changed parameter values): + +Changes to the datasets (e.g., parameter, surface or initial files): + parameter files updated + surface datasets updated + many finidat files updated + +Things being deprecated (which will be removed): + Running with VIC hydrology being deprecated with testing removed + mkprocdata_map was removed + test/tools testing framework was removed + +Testing summary: release testing (regular ctsm_sci fates mosart rtm mksurfdata_esmf python) +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS (1710 namelists differ from ctsm5.2.005) + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) + derecho ----- OK + izumi ------- OK + + any other testing (give details below): + + mksurfdata_esmf + derecho ---- run "make all" to create all datasets (completes in 6 hours) + (crop-global-SSP2-4.5-ne30 was longest at 6 hr) + + ctsm_sci + derecho ---- OK + + mosart + derecho ---- OK + izumi ------ PASS + + rtm + derecho ---- OK + + +Simulations to go with ctsm5.3.0: +--------------------------------- + + https://github.com/NCAR/LMWG_dev/issues/69 + https://github.com/NCAR/LMWG_dev/issues/65 + +Other details +------------- + +List git submodules: + +fates = sci.1.78.2_api.36.0.0 +cism = cismwrap_2_2_002 +rtm = rtm1_0_80 +mosart = mosart1.1.02 +mizuRoute = cesm-coupling.n02_v2.1.2 +ccs_config = ccs_config_cesm1.0.0 +cime = cime6.0.246 +cmeps = cmeps0.14.77 +cdeps = cdeps1.0.48 +share = share1.0.19 + +=============================================================== +=============================================================== +Tag name: ctsm5.2.029 +Originator(s): multiple (see contributors below) +Date: Wed 25 Sep 2024 01:22:06 AM MDT +One-line Summary: Update surface datasets: double tag of ctsm5.3.0 + +Purpose and description of changes +---------------------------------- + +New surface datasets because of updates in PFT/LAI/soil-color datasets, as well as two fire datasets (AG fire, pearland and the glacier behavior dataset. Also bring in an updated "PPE informed, hand-tuned" parameter file. And turn on Li2024 fire method. Also updates to allow creating transient landuse timeseries files going back to 1700. Fix an important bug on soil fields that was there since ctsm5.2.0. This results in mkaurfdata_esmf giving identical answers with a change in number of processors. Add in creation of ne0np4.POLARCAP.ne30x4 surface datasets. + +Asides: Remove VIC fields from surface datasets and testing. Add version to the surface datasets. Update the fire emissions factor dataset for the fire emissions testing in CTSM. Remove the --hires_pft option from mksurfdata_esmf as we don't have the datasets for it. Also delete mkprocdata_map. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[X] clm6_0 + +[X] clm5_1 + +[X] clm5_0 + +[X] ctsm5_0-nwp + +[X] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #2723 -- Version string on CTSM surface datasets to check for compatability + Partly addressed #2752 -- NEON surface datasets are defined in two places -- should just be one in namelist_defaults_ctsm.xml + Partly addressed #2672 -- Excess ice testing + Fixes #2720 -- Make polarcap surface datasets in ctsm5.3.0, remove VR 1850 datasets + Fixes #2452 -- Run mksurfdata_esmf with the new vegetation raw data + Fixes #2570 -- Historical configuration for CLM6 + Fixes #2618 -- Update fire variables on surface dataset + Fixes #423 -- Update fire variables on surface dataset + Fixes #2734 -- Update fire emissions factors + Fixes #2744 -- Soil level clm surface input data for clm5.2.0 have missing values in large domains + Fixes #2502 -- fsurdat: PCT_SAND, PCT_CLAY, ORGANIC differ with different PE layouts on derecho + Fixes #2748 -- Update hillslope datasets for 5.3 + Fixes #2773 -- Deprecate and remove mkprocdata_map + +Contributors +------------ + @slevis-lmwg @ekluzek @lawrencepj1 @wwieder @adrifoster @samsrabin @billsacks @lifang0209 @linniahawkins @olyson + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): + New surface datasets means initial condition files created without ctsm5.3.0 surface + datasets will need to be interpolated + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + With new surface datasets the following GLC fields have region "1" set to UNSET: + glacier_region_behavior, glacier_region_melt_behavior, glacier_region_ice_runoff_behavior + For mksurfdata_esmf, the --vic and --hires_pft options were removed + +Changes made to namelist defaults (e.g., changed parameter values): + glacier_region_behavior updated so that region ID 1 is UNSET + +Changes to the datasets (e.g., parameter, surface or initial files): + parameter file updated + surface datasets updatd + f09 1850 finidat file updated (also used for 2000) + fire emissions factor file updated + +Changes to documentation: + Technical Note documentation on glacier region updated + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + Region 1 for glacier region is now undefined on purpose + +Changes to tests or testing: + VIC tests removed + +Testing summary: release testing (regular ctsm_sci fates mosart rtm mksurfdata_esmf python) +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS (1433 namelists differ compared to ctsm5.2.028) + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +Answer changes +-------------- + +Changes answers relative to baseline: Yes! New surface datasets so answers change for ALL simulations! + + Summarize any changes to answers, i.e., + - what code configurations: ALL + - what platforms/compilers: ALL + - nature of change (roundoff; larger than roundoff/same climate; new climate): + new climate + + If this tag changes climate describe the run(s) done to evaluate the new + climate (put details of the simulations in the experiment database) + - casename: slevis ctsm52026_f09_pSASU + + URL for LMWG diagnostics output used to validate new climate: + https://github.com/NCAR/LMWG_dev/issues/65 + + +Other details +------------- +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + #2500 -- ctsm5.3.0: New pft/lai/glc-behavior/soilcolor/fire datasets + +=============================================================== +=============================================================== +Tag name: ctsm5.2.028 +Originator(s): rgknox (Ryan Knox, LBNL, rgknox@lbl.gov) + glemieux (Gregory Lemieux, LBNL, glemieux@lbl.gov) +Date: Thu 05 Sep 2024 02:47:14 PM MDT +One-line Summary: FATES history flushing update + +Purpose and description of changes +---------------------------------- + +This updates the way in which FATES history output is flushed during model initialization +utilizing a new FATES-side subroutine, flush_all_hvars. This update also makes corrections +to a subset of FATES testmods as well as expands the FATES test list by duplicating two +existing tests to run on different compilers for better coverage. The FATES submodule tag +has been updated to the latest scientific tag as well. + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: +Fixes #2657 Add FATES_TRANSITIONS_MATRIX_LULU to FatesColdLUH2 testmods + +Notes of particular relevance for developers: +--------------------------------------------- +Changes to tests or testing: + +Adds nvhpc and gnu FatesSatColdPhen smoke tests to the fates list to expand compiler +coverage. + +Testing summary: +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) + derecho ----- OK + izumi ------- OK + +Answer changes +-------------- + +Changes answers relative to baseline: Yes, for FATES tests only + +Changes are consistent with differences in FATES_EFFECT_WSPEED due to NGEET/fates#1215 + +Other details +------------- +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + + FATES: sci.1.77.2_api.36.0.0 -> sci.1.78.2_api.36.0.0 + +Pull Requests that document the changes (include PR ids): + https://github.com/ESCOMP/ctsm/pull/2594 + +=============================================================== +=============================================================== Tag name: ctsm5.2.027 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) Date: Wed 28 Aug 2024 09:13:22 PM MDT @@ -16,7 +465,7 @@ Bring b4b-dev branch to main CTSM development. Update cs.status parsing script to make expected BASELINE fails more obvious -Fix some issues with finding IC files for certain lnd_tuning_modes: all for cam7, +Fix some issues with finding IC files for certain lnd_tuning_modes: all for cam7, clm5_0_cam6.0, and clm6_0_cam6.0 Significant changes to scientifically-supported configurations diff --git a/doc/ChangeSum b/doc/ChangeSum index fdf253760f..ebbab3ce01 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,8 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.3.0 multiple 09/24/2024 Update surface datasets, CN Matrix, CLM60: excess ice on, explicit A/C on, crop calendars, Sturm snow, Leung dust emissions, prigent roughness data + ctsm5.2.029 multiple 09/24/2024 New surface datasets: double tag of ctsm5.3.0 + ctsm5.2.028 rgknox 09/05/2024 FATES history flushing update ctsm5.2.027 erik 08/28/2024 Merge b4b-dev ctsm5.2.026 slevis 08/23/2024 Turn on excess ice, explicit AC, Leung_2023 for clm6 ctsm5.2.025 samrabin 08/23/2024 Minor fixes to li2024 fire methods diff --git a/README.NUOPC_driver.md b/doc/README.NUOPC_driver.md similarity index 100% rename from README.NUOPC_driver.md rename to doc/README.NUOPC_driver.md diff --git a/doc/source/tech_note/Glacier/CLM50_Tech_Note_Glacier.rst b/doc/source/tech_note/Glacier/CLM50_Tech_Note_Glacier.rst index 3e510561bb..9ed8fe280e 100644 --- a/doc/source/tech_note/Glacier/CLM50_Tech_Note_Glacier.rst +++ b/doc/source/tech_note/Glacier/CLM50_Tech_Note_Glacier.rst @@ -58,7 +58,7 @@ It is also possible to run CESM with an evolving ice sheet. In this case, CLM re Glacier regions and their behaviors ----------------------------------- -The world's glaciers and ice sheets are broken down into a number of different regions (four by default) that differ in three respects: +The world's glaciers and ice sheets are broken down into a number of different regions (three by default) that differ in three respects: #. Whether the gridcell's glacier land unit contains: @@ -80,7 +80,7 @@ The world's glaciers and ice sheets are broken down into a number of different r b. Ice runoff from snow capping is melted (generating a negative sensible heat flux) and runs off as liquid. This matches the behavior for non-glacier columns. This is appropriate in regions that have little iceberg calving in reality. This can be important to avoid unrealistic cooling of the ocean and consequent runaway sea ice growth. -The default behaviors for the world's glacier and ice sheet regions are described in :numref:`Table Glacier region behaviors`. Note that the standard CISM grid covers Greenland plus enough surrounding area to allow for ice sheet growth and to have a regular rectangular grid. We need to have the "replaced by ice" melt behavior within the CISM domain in order to compute SMB there, and we need virtual elevation classes in that domain in order to compute SMB for all elevation classes and to facilitate glacial advance and retreat in the two-way-coupled case. However, this domain is split into Greenland itself and areas outside Greenland so that ice runoff in the Canadian archipelago (which is inside the CISM domain) is melted before reaching the ocean, to avoid runaway sea ice growth in that region. +The default behaviors for the world's glacier and ice sheet regions are described in :numref:`Table Glacier region behaviors`. Note that the Greenland region stops at the edge of Greenland as defined by CISM. This means that, by default, SMB is not computed for grid cells outside Greenland but within the CISM domain. (This treatment of the non-Greenland portion of the CISM domain as being the same as the world's mountain glaciers rather than like Greenland itself is mainly for the sake of avoiding unrealistic fluxes from the Canadian archipelago that can potentially result in runaway sea ice growth in that region.) .. _Table Glacier region behaviors: @@ -93,13 +93,6 @@ The default behaviors for the world's glacier and ice sheet regions are describe | Greenland | Virtual | Replaced by | Remains ice | | | | ice | | +---------------+---------------+---------------+---------------+ - | Inside | Virtual | Replaced by | Melted | - | standard CISM | | ice | | - | grid but | | | | - | outside | | | | - | Greenland | | | | - | itself | | | | - +---------------+---------------+---------------+---------------+ | Antarctica | Multiple | Replaced by | Remains ice | | | | ice | | +---------------+---------------+---------------+---------------+ @@ -109,7 +102,11 @@ The default behaviors for the world's glacier and ice sheet regions are describe .. note:: - In regions that have both the ``Glacial melt = Replaced by ice`` and the ``Ice runoff = Melted`` behaviors (by default, this is just the region inside the standard CISM grid but outside Greenland itself): During periods of glacial melt, a negative ice runoff is generated (due to the ``Glacial melt = Replaced by ice`` behavior); this negative ice runoff is converted to a negative liquid runoff plus a positive sensible heat flux (due to the ``Ice runoff = Melted`` behavior). We recommend that you limit the portion of the globe with both of these behaviors combined, in order to avoid having too large of an impact of this non-physical behavior. +It is possible to have non-virtual, non-SMB-computing areas within the CISM domain (as is the case for the portion of CISM's Greenland domain outside of Greenland itself). However, these areas will send 0 SMB and will not be able to adjust to CISM-dictated changes in glacier area. Therefore, it is best to set up the glacier regions and their behaviors so that as much of the CISM domain as possible is covered by virtual, SMB-computing areas. + +.. note:: + + The combination of the ``Glacial melt = Replaced by ice`` and the ``Ice runoff = Melted`` behaviors results in particularly non-physical behavior: During periods of glacial melt, a negative ice runoff is generated (due to the ``Glacial melt = Replaced by ice`` behavior); this negative ice runoff is converted to a negative liquid runoff plus a positive sensible heat flux (due to the ``Ice runoff = Melted`` behavior). The net result is zero runoff but a positive sensible heat flux generated from glacial melt. Because of how physically unrealistic this is, CLM does not allow this combination of behaviors. .. _Multiple elevation class scheme: diff --git a/doc/source/users_guide/using-clm-tools/building-the-clm-tools.rst b/doc/source/users_guide/using-clm-tools/building-the-clm-tools.rst index 013af36a1c..c84d2a136d 100644 --- a/doc/source/users_guide/using-clm-tools/building-the-clm-tools.rst +++ b/doc/source/users_guide/using-clm-tools/building-the-clm-tools.rst @@ -6,103 +6,9 @@ .. todo:: Update the below, as domain files aren't needed with nuopc. +The tools **cprnc** and **gen_domain** use the CIME configure/build system which is described in the next section. -The CLM FORTRAN tools all have similar makefiles, and similar options for building. The tools ``cprnc`` and ``gen_domain`` use the CIME configure/build system which is described in the next section. - -.. todo:: - Remove references to mkprocdata_map? - -The Makefiles (for ``mksurfdata_esmf`` and ``mkprocdata_map``) use GNU Make extensions and thus require that you use GNU make to use them. They also auto detect the type of platform you are on, using "uname -s" and set the compiler, compiler flags and such accordingly. There are also environment variables that can be set to set things that must be customized. All the tools use NetCDF and hence require the path to the NetCDF libraries and include files. On some platforms (such as Linux) multiple compilers can be used, and hence there are env variables that can be set to change the FORTRAN and/or "C" compilers used. The tools also allow finer control, by also allowing the user to add compiler flags they choose, for both FORTRAN and "C", as well as picking the compiler, linker and and add linker options. Finally the tools allow you to turn optimization on (which is off by default but on for ``mksurfdata_esmf``) with the OPT flag so that the tool will run faster. - -Options used by all: ``mksurfdata_esmf`` - -- ``LIB_NETCDF`` -- sets the location of the NetCDF library. -- ``INC_NETCDF`` -- sets the location of the NetCDF include files. -- ``USER_FC`` -- sets the name of the FORTRAN compiler. - -Options used by: ``mkprocdata_map``, and ``mksurfdata_esmf`` - -- ``MOD_NETCDF`` -- sets the location of the NetCDF FORTRAN module. -- ``USER_LINKER`` -- sets the name of the linker to use. -- ``USER_CPPDEFS`` -- adds any CPP defines to use. -- ``USER_CFLAGS`` -- add any "C" compiler flags to use. -- ``USER_FFLAGS`` -- add any FORTRAN compiler flags to use. -- ``USER_LDFLAGS`` -- add any linker flags to use. -- ``USER_CC`` -- sets the name of the "C" compiler to use. -- ``OPT`` -- set to TRUE to compile the code optimized (TRUE or FALSE) -- ``SMP`` -- set to TRUE to turn on shared memory parallelism (i.e. OpenMP) (TRUE or FALSE) -- ``Filepath`` -- list of directories to build source code from. -- ``Srcfiles`` -- list of source code filenames to build executable from. -- ``Makefile`` -- customized makefile options for this particular tool. -- ``mkDepends`` -- figure out dependencies between source files, so make can compile in order.. -- ``Makefile.common`` -- General tool Makefile that should be the same between all tools. - -More details on each environment variable. - -``LIB_NETCDF`` - This variable sets the path to the NetCDF library file (``libnetcdf.a``). If not set it defaults to ``/usr/local/lib``. In order to use the tools you need to build the NetCDF library and be able to link to it. In order to build the model with a particular compiler you may have to compile the NetCDF library with the same compiler (or at least a compatible one). - -``INC_NETCDF`` - This variable sets the path to the NetCDF include directory (in order to find the include file ``netcdf.inc``). if not set it defaults to ``/usr/local/include``. - -``MOD_NETCDF`` - This variable sets the path to the NetCDF module directory (in order to find the NetCDF FORTRAN-90 module file when NetCDF is used with a FORTRAN-90 ``use statement``. When not set it defaults to the ``LIB_NETCDF`` value. - -``USER_FC`` - This variable sets the command name to the FORTRAN-90 compiler to use when compiling the tool. The default compiler to use depends on the platform. And for example, on the AIX platform this variable is NOT used - -``USER_LINKER`` - This variable sets the command name to the linker to use when linking the object files from the compiler together to build the executable. By default this is set to the value of the FORTRAN-90 compiler used to compile the source code. - -``USER_CPPDEFS`` - This variable adds additional optional values to define for the C preprocessor. Normally, there is no reason to do this as there are very few CPP tokens in the CLM tools. However, if you modify the tools there may be a reason to define new CPP tokens. - -``USER_CC`` - This variable sets the command name to the "C" compiler to use when compiling the tool. The default compiler to use depends on the platform. And for example, on the AIX platform this variable is NOT used - -``USER_CFLAGS`` - This variable adds additional compiler options for the "C" compiler to use when compiling the tool. By default the compiler options are picked according to the platform and compiler that will be used. - -``USER_FFLAGS`` - This variable adds additional compiler options for the FORTRAN-90 compiler to use when compiling the tool. By default the compiler options are picked according to the platform and compiler that will be used. - -``USER_LDFLAGS`` - This variable adds additional options to the linker that will be used when linking the object files into the executable. By default the linker options are picked according to the platform and compiler that is used. - -``SMP`` - This variable flags if shared memory parallelism (using OpenMP) should be used when compiling the tool. It can be set to either TRUE or FALSE, by default it is set to FALSE, so shared memory parallelism is NOT used. When set to TRUE you can set the number of threads by using the OMP_NUM_THREADS environment variable. Normally, the most you would set this to would be to the number of on-node CPU processors. Turning this on should make the tool run much faster. - -.. warning:: Note, that depending on the compiler answers may be different when SMP is activated. - -``OPT`` - This variable flags if compiler optimization should be used when compiling the tool. It can be set to either ``TRUE`` or ``FALSE``, by default it is set to for both ``mksurfdata_esmf`` and ``mkprocdata_map``. Turning this on should make the tool run much faster. - -.. todo:: - Remove reference to mkprocdata_map above? - -.. warning:: Note, you should expect that answers will be different when ``OPT`` is activated. - -``Filepath`` - All of the tools are stand-alone and don't need any outside code to operate. The Filepath is the list of directories needed to compile and hence is always simply "." the current directory. Several tools use copies of code outside their directory that is in the CESM distribution (either ``csm_share`` code or CLM source code). - -``Srcfiles`` - The ``Srcfiles`` lists the filenames of the source code to use when building the tool. - -``Makefile`` - The ``Makefile`` is the custom GNU Makefile for this particular tool. It will customize the ``EXENAME`` and the optimization settings for this particular tool. - -``Makefile.common`` - The ``Makefile.common`` is the copy of the general GNU Makefile for all the CLM tools. This file should be identical between the different tools. This file has different sections of compiler options for different Operating Systems and compilers. - -``mkDepends`` - The ``mkDepends`` is the copy of the perl script used by the ``Makefile.common`` to figure out the dependencies between the source files so that it can compile in the necessary order. This file should be identical between the different tools. - -.. note:: There are several files that are copies of the original files. By having copies the tools can all be made stand-alone, but any changes to the originals will have to be put into the tool directories as well. - -The ``README.filecopies`` (which can be found in ``$CTSMROOT/tools``) is repeated here. - -.. include:: ../../../../tools/README.filecopies - :literal: +The only CLM FORTRAN tool is mksurfdata_esmf which has it's own build system that takes advantage of the cime build. ================================================================ Building the CLM tools that use the CIME configure/build system diff --git a/doc/source/users_guide/using-clm-tools/what-are-the-clm-tools.rst b/doc/source/users_guide/using-clm-tools/what-are-the-clm-tools.rst index b77893222b..df7988451d 100644 --- a/doc/source/users_guide/using-clm-tools/what-are-the-clm-tools.rst +++ b/doc/source/users_guide/using-clm-tools/what-are-the-clm-tools.rst @@ -21,10 +21,9 @@ The list of generally important scripts and programs are as follows. #. ``mksurfdata_esmf`` to create surface datasets from grid datasets (clm4_0 and |version| versions). -#. ``./mkprocdata_map`` to interpolate output unstructured grids (such as the CAM HOMME dy-core "ne" grids like ne30np4) into a 2D regular lat/long grid format that can be plotted easily. Can be used by either clm4_0 or |version|. - .. todo:: Update the below, as domain files aren't needed with nuopc. +#. *$CIMEROOT/tools/mapping/gen_domain_files/gen_domain* to create a domain file for datm from a mapping file. The domain file is then used by BOTH datm AND CLM to define the grid and land-mask. #. ``$CIMEROOT/tools/mapping/gen_domain_files/gen_domain`` to create a domain file for datm from a mapping file. The domain file is then used by BOTH datm AND CLM to define the grid and land-mask. @@ -32,7 +31,7 @@ The list of generally important scripts and programs are as follows. In the sections to come we will go into detailed description of how to use each of these tools in turn. First, however we will discuss the common environment variables and options that are used by all of the FORTRAN tools. Second, we go over the outline of the entire file creation process for all input files needed by CLM for a new resolution, then we turn to each tool. In the last section we will discuss how to customize files for particular observational sites. -The FORTRAN tools (``mksurfdata_esmf`` and ``mkprocdata_map``) run, with a namelist (``mksurfdata_esmf``) to provide options, or with command line arguments (``mkprocdata_map``). +The FORTRAN tool (``mksurfdata_esmf``) runs, with a namelist and has a namelist builder for it. In the following sections, we will outline how to make these files available for build-namelist so that you can easily create simulations that include them. In the chapter on single-point and regional datasets we also give an alternative way to enter new datasets without having to edit files. @@ -45,30 +44,16 @@ Running FORTRAN tools with namelists ./program < namelist -There is a sample namelist called ``$CTSMROOT/tools/mksurfdata_esmf/gen_mksurfdata_namelist.xml`` that shows you what the namelist should look like. ``mksurfdata_esmf`` also has a script that creates the namelist and runs the program for you. Namelists that you create should be similar to the example namelist. The namelist values are also documented along with the other namelists in the ``$CTSMROOT/bld/namelist_files/namelist_definition_ctsm.xml`` file, with default values in the ``$CTSMROOT/bld/namelist_files/namelist_defaults_ctsm.xml`` file. +**mksurfdata_esmf** also has a script that creates the namelist and runs the program for you. The namelist values are also documented along with the other namelists in the: +:: + + $CTSMROOT/tools/mksurfdata_esmf/gen_mksurfdata_namelist.xml`` file ----------------------------------------------- Running FORTRAN tools with command line options ----------------------------------------------- -.. todo:: - Remove reference to mkprocdata_map? - .. todo:: Update the below, as domain files aren't needed with nuopc. -``gen_domain``, ``mkprocdata_map``, and ``cprnc`` run with command line arguments. The detailed sections below will give you more information on the command line arguments specific to each tool. Also running the tool without any arguments will give you a general synopsis on how to run the tool. - ------------------------------------------ -Running FORTRAN tools built with SMP=TRUE ------------------------------------------ - -When you enable ``SMP=TRUE`` on your build of one of the tools that make use of it, you are using OpenMP for shared memory parallelism (SMP). In SMP loops are run in parallel with different threads run on different processors all of which access the same memory (called on-node). Thus you can only usefully run up to the number of processors that are available on a single-node of the machine you are running on. For example, on the NCAR machine cheyenne there are 36 processors per node, so you can use up to 36 processors. - -.. _using-ncl: - ---------- -Using NCL ---------- - -In the tools directory ``$CTSMROOT/tools/ncl_scripts`` and in a few other locations there are scripts that use NCAR Command Language (NCL). Unlike the FORTRAN tools, you will need to get a copy of NCL in order to use them. You also won't have to build an executable in order to use them, hence no Makefile is provided. NCL is provided for free download as either binaries or source code from: `http://www.ncl.ucar.edu/ `_. The NCL web-site also contains documentation on NCL and it's use. These scripts are stand-alone and at most use environment variables to control how to use them. In some cases there are perl scripts with command line arguments that call the NCL scripts to control what they do. +**gen_domain** and **cprnc** run with command line arguments. The detailed sections below will give you more information on the command line arguments specific to each tool. Also running the tool without any arguments will give you a general synopsis on how to run the tool. diff --git a/python/ctsm/subset_data.py b/python/ctsm/subset_data.py index bc9ce97962..d38aee1308 100644 --- a/python/ctsm/subset_data.py +++ b/python/ctsm/subset_data.py @@ -597,10 +597,6 @@ def setup_files(args, defaults, cesmroot): clmforcingindir, os.path.join(defaults.get("surfdat", "dir")), ), - "mesh_dir": os.path.join( - clmforcingindir, - os.path.join(defaults.get("surfdat", "mesh_dir")), - ), "fluse_dir": os.path.join( clmforcingindir, os.path.join(defaults.get("landuse", "dir")), @@ -608,7 +604,6 @@ def setup_files(args, defaults, cesmroot): "fsurf_in": fsurf_in, "fsurf_out": fsurf_out, "fluse_in": fluse_in, - "mesh_surf": defaults.get("surfdat", "mesh_surf"), "datm_tuple": DatmFiles( dir_input_datm, dir_output_datm, @@ -736,9 +731,6 @@ def subset_region(args, file_dict: dict): specify_fsurf_out=file_dict["fsurf_out"], ) - # if region.create_mesh: - # region.create_mesh_at_reg (file_dict["mesh_dir"], file_dict["mesh_surf"]) - # -- Create CTSM transient landuse data file if region.create_landuse: region.create_landuse_at_reg( diff --git a/python/ctsm/test/test_sys_gen_mksurfdata_namelist.py b/python/ctsm/test/test_sys_gen_mksurfdata_namelist.py index 29745e9d80..c9741daf5c 100755 --- a/python/ctsm/test/test_sys_gen_mksurfdata_namelist.py +++ b/python/ctsm/test/test_sys_gen_mksurfdata_namelist.py @@ -62,7 +62,7 @@ def test_simple_namelist(self): main() self.assertTrue(os.path.exists(self.outfile), "Output surface dataset file should exist") - def test_vic_nocrop_inlandwet_glc_namelist(self): + def test_nocrop_inlandwet_glc_namelist(self): """ Test a namelist with several options on """ @@ -75,7 +75,6 @@ def test_vic_nocrop_inlandwet_glc_namelist(self): "1850", "--res", "1.9x2.5", - "--vic", "--nocrop", "--inlandwet", "--glc", @@ -99,7 +98,6 @@ def test_hires_namelist(self): "mpasa15", "--glc-nec", "10", - "--hires_pft", "--hires_soitex", ] ) diff --git a/python/ctsm/test/test_unit_subset_data.py b/python/ctsm/test/test_unit_subset_data.py index 143b632e8c..a918fb35f0 100755 --- a/python/ctsm/test/test_unit_subset_data.py +++ b/python/ctsm/test/test_unit_subset_data.py @@ -48,7 +48,7 @@ def test_inputdata_setup_files_basic(self): files = setup_files(self.args, self.defaults, self.cesmroot) self.assertEqual( files["fsurf_in"], - "surfdata_0.9x1.25_hist_2000_16pfts_c240216.nc", + "surfdata_0.9x1.25_hist_2000_16pfts_c240908.nc", "fsurf_in filename not whats expected", ) self.assertEqual( diff --git a/python/ctsm/test/testinputs/default_data.cfg b/python/ctsm/test/testinputs/default_data.cfg index d736f2e933..24aa811fee 100644 --- a/python/ctsm/test/testinputs/default_data.cfg +++ b/python/ctsm/test/testinputs/default_data.cfg @@ -15,16 +15,16 @@ precname = CLMGSWP3v1.Precip tpqwname = CLMGSWP3v1.TPQW [surfdat] -dir = lnd/clm2/surfdata_esmf/ctsm5.2.0 -surfdat_16pft = surfdata_0.9x1.25_hist_2000_16pfts_c240216.nc -surfdat_78pft = surfdata_0.9x1.25_hist_2000_78pfts_c240216.nc +dir = lnd/clm2/surfdata_esmf/ctsm5.3.0 +surfdat_16pft = surfdata_0.9x1.25_hist_2000_16pfts_c240908.nc +surfdat_78pft = surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc mesh_dir = share/meshes/ mesh_surf = fv0.9x1.25_141008_ESMFmesh.nc [landuse] -dir = lnd/clm2/surfdata_esmf/ctsm5.2.0 -landuse_16pft = landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240216.nc -landuse_78pft = landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240216.nc +dir = lnd/clm2/surfdata_esmf/ctsm5.3.0 +landuse_16pft = landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc +landuse_78pft = landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc [domain] file = share/domains/domain.lnd.fv0.9x1.25_gx1v7.151020.nc diff --git a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py index 6c38efdd0d..5de67adb12 100755 --- a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py +++ b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py @@ -42,6 +42,7 @@ "crop-global-hist-low-res", "crop-global-hist-ne16", "crop-global-hist-ne30", + "crop-global-hist-f09", "crop-global-SSP1-1.9-f09", "crop-global-SSP1-2.6-f09", "crop-global-SSP2-4.5-f09", @@ -198,6 +199,7 @@ def main(): "low_res_no_crop": ["4x5", "10x15"], "ultra_hi_res_no_crop": ["mpasa15", "mpasa3p75"], "standard_res": ["360x720cru", "0.9x1.25", "1.9x2.5", "C96", "mpasa120"], + "standard_res_no_f09": ["360x720cru", "1.9x2.5", "C96", "mpasa120"], "low_res": ["4x5", "10x15", "ne3np4.pg3"], "mpasa480": ["mpasa480"], "nldas_res": ["0.125nldas2"], @@ -209,11 +211,13 @@ def main(): "ne0np4.ARCTICGRIS.ne30x8", "ne0np4.ARCTIC.ne30x4", "ne0np4CONUS.ne30x8", + "ne0np4.POLARCAP.ne30x4", ], "ne120": [ "ne0np4.ARCTICGRIS.ne30x8", "ne0np4.ARCTIC.ne30x4", "ne0np4CONUS.ne30x8", + "ne0np4.POLARCAP.ne30x4", "ne120np4.pg3", ], } @@ -243,11 +247,11 @@ def main(): "5x5_amazon", ), "crop-global-present": ( - "--start-year 2000 --end-year 2000 --vic --res", + "--start-year 2000 --end-year 2000 --res", "standard_res", ), "crop-global-present-low-res": ( - "--start-year 2000 --end-year 2000 --vic --res", + "--start-year 2000 --end-year 2000 --res", "low_res", ), "crop-global-present-ne16": ( @@ -267,7 +271,6 @@ def main(): "mpasa480", ), "crop-global-present-nldas": ( - # TODO slevis: --hirespft uses old data for now, so keep out "--start-year 2000 --end-year 2000 --res", "nldas_res", ), @@ -296,21 +299,25 @@ def main(): "mpasa480", ), "crop-global-hist": ( - "--start-year 1850 --end-year 2015 --nosurfdata --res", - "standard_res", + "--start-year 1850 --end-year 2023 --nosurfdata --res", + "standard_res_no_f09", ), "crop-global-hist-low-res": ( - "--start-year 1850 --end-year 2015 --nosurfdata --res", + "--start-year 1850 --end-year 2023 --nosurfdata --res", "low_res", ), "crop-global-hist-ne16": ( - "--start-year 1850 --end-year 2015 --nosurfdata --res", + "--start-year 1850 --end-year 2023 --nosurfdata --res", "ne16", ), "crop-global-hist-ne30": ( - "--start-year 1850 --end-year 2015 --nosurfdata --res", + "--start-year 1850 --end-year 2023 --nosurfdata --res", "ne30", ), + "crop-global-hist-f09": ( + "--start-year 1700 --end-year 2023 --res", + "f09", + ), "crop-global-SSP1-1.9-f09": ( "--start-year 1850 --end-year 2100 --nosurfdata --ssp-rcp SSP1-1.9 --res", "f09", diff --git a/python/ctsm/toolchain/gen_mksurfdata_namelist.py b/python/ctsm/toolchain/gen_mksurfdata_namelist.py index 361616419f..da9420871b 100755 --- a/python/ctsm/toolchain/gen_mksurfdata_namelist.py +++ b/python/ctsm/toolchain/gen_mksurfdata_namelist.py @@ -166,16 +166,6 @@ def get_parser(): dest="input_path", default="/glade/campaign/cesm/cesmdata/inputdata/", ) - parser.add_argument( - "--vic", - help=""" - Flag for adding the fields required for the VIC model. - [default: %(default)s] - """, - action="store_true", - dest="vic_flag", - default=False, - ) parser.add_argument( "--inlandwet", help=""" @@ -196,19 +186,6 @@ def get_parser(): dest="glc_flag", default=False, ) - parser.add_argument( - "--hires_pft", - help=""" - If you want to use the high-resolution pft dataset rather - than the default lower resolution dataset. - (Low resolution is at quarter-degree, high resolution at 3-minute) - [Note: hires only available for 1850 and 2005.] - [default: %(default)s] - """, - action="store_true", - dest="hres_pft", - default=False, - ) parser.add_argument( "--hires_soitex", help=""" @@ -273,13 +250,12 @@ def main(): input_path = args.input_path nocrop_flag = args.crop_flag nosurfdata_flag = args.surfdata_flag - vic_flag = args.vic_flag inlandwet = args.inlandwet glc_flag = args.glc_flag potveg = args.potveg_flag glc_nec = args.glc_nec - hires_pft, hires_soitex = process_hires_options(args, start_year, end_year) + hires_soitex = process_hires_options(args) if force_model_mesh_file is not None: open_mesh_file(force_model_mesh_file, force_model_mesh_nx, force_model_mesh_ny) @@ -310,7 +286,6 @@ def main(): # create attribute list for parsing xml file attribute_list = { - "hires_pft": hires_pft, "hires_soitex": hires_soitex, "pft_years": pft_years, "pft_years_ssp": pft_years_ssp, @@ -400,7 +375,6 @@ def main(): force_model_mesh_file, force_model_mesh_nx, force_model_mesh_ny, - vic_flag, rawdata_files, landuse_fname, mksrf_ftopostats_override, @@ -413,7 +387,6 @@ def main(): # ------------------- write_nml_outdata( nosurfdata_flag, - vic_flag, inlandwet, glc_flag, hostname, @@ -436,43 +409,31 @@ def main(): print(f"Successfully created input namelist file {nlfname}") -def process_hires_options(args, start_year, end_year): +def process_hires_options(args): """ Process options related to hi-res """ - if args.hres_pft: - if (start_year == 1850 and end_year == 1850) or (start_year == 2005 and end_year == 2005): - hires_pft = "on" - else: - error_msg = ( - "ERROR: for --hires_pft you must set both start-year " - "and end-year to 1850 or to 2005" - ) - sys.exit(error_msg) - else: - hires_pft = "off" - if args.hres_soitex: hires_soitex = "on" else: hires_soitex = "off" - return hires_pft, hires_soitex + return hires_soitex def check_ssp_years(start_year, end_year): """ Check years associated with SSP period """ - if int(start_year) > 2015: + if int(start_year) > 2023: error_msg = ( - "ERROR: if start-year > 2015 must add an --ssp_rcp " + "ERROR: if start-year > 2023 must add an --ssp_rcp " "argument that is not none: valid opts for ssp-rcp " f"are {valid_opts}" ) sys.exit(error_msg) - elif int(end_year) > 2015: + elif int(end_year) > 2023: error_msg = ( - "ERROR: if end-year > 2015 must add an --ssp-rcp " + "ERROR: if end-year > 2023 must add an --ssp-rcp " "argument that is not none: valid opts for ssp-rcp " f"are {valid_opts}" ) @@ -537,6 +498,8 @@ def determine_pft_years(start_year, end_year, potveg): pft_years_ssp = "-999" if potveg: pft_years = "PtVg" + elif int(start_year) == 1700 and int(end_year) == 1700: + pft_years = "1700" elif int(start_year) == 1850 and int(end_year) == 1850: pft_years = "1850" elif int(start_year) == 2000 and int(end_year) == 2000: @@ -545,21 +508,21 @@ def determine_pft_years(start_year, end_year, potveg): pft_years = "2005" elif int(start_year) >= 850 and int(end_year) <= 1849: pft_years = "0850-1849" - elif int(start_year) >= 1850 and int(start_year) <= 2100 and int(end_year) <= 2015: - pft_years = "1850-2015" - elif int(start_year) >= 1850 and int(start_year) <= 2100 and int(end_year) <= 2100: - pft_years = "1850-2015" - pft_years_ssp = "2016-2100" - elif int(start_year) >= 2016 and int(start_year) <= 2100 and int(end_year) <= 2100: + elif int(start_year) >= 1700 and int(start_year) <= 2100 and int(end_year) <= 2023: + pft_years = "1700-2023" + elif int(start_year) >= 1700 and int(start_year) <= 2100 and int(end_year) <= 2100: + pft_years = "1700-2023" + pft_years_ssp = "2024-2100" + elif int(start_year) >= 2023 and int(start_year) <= 2100 and int(end_year) <= 2100: pft_years = "-999" - pft_years_ssp = "2016-2100" + pft_years_ssp = "2024-2100" else: error_msg = ( f"ERROR: start_year is {start_year} and end_year is " f"{end_year}; expected start/end-year options are: " - "- 1850, 2000, 2005 for time-slice options " + "- 1700, 1850, 2000, 2005 for time-slice options " "- in the range from 850 to 1849 " - "- in the range from 1850 to 2100 " + "- in the range from 1700 to 2100 " "- TODO in the range from 2101 to 2300 " "- OR user must set the potveg_flag " ) @@ -571,7 +534,6 @@ def determine_pft_years(start_year, end_year, potveg): def write_nml_outdata( nosurfdata_flag, - vic_flag, inlandwet, glc_flag, hostname, @@ -602,7 +564,6 @@ def write_nml_outdata( nlfile.write(f" numpft = {num_pft} \n") nlfile.write(f" no_inlandwet = .{str(not inlandwet).lower()}. \n") nlfile.write(f" outnc_3dglc = .{str(glc_flag).lower()}. \n") - nlfile.write(f" outnc_vic = .{str(vic_flag).lower()}. \n") nlfile.write(" outnc_large_files = .false. \n") nlfile.write(" outnc_double = .true. \n") nlfile.write(f" logname = '{logname}' \n") @@ -615,7 +576,6 @@ def write_nml_rawinput( force_model_mesh_file, force_model_mesh_nx, force_model_mesh_ny, - vic_flag, rawdata_files, landuse_fname, mksrf_ftopostats_override, @@ -641,11 +601,11 @@ def write_nml_rawinput( for key, value in rawdata_files.items(): if key == "mksrf_ftopostats" and mksrf_ftopostats_override != "": nlfile.write(f" mksrf_ftopostats_override = '{mksrf_ftopostats_override}' \n") - elif "_fvic" not in key and "mksrf_fvegtyp" not in key and "mksrf_fgrid" not in key: + elif "mksrf_fvegtyp" not in key and "mksrf_fgrid" not in key: # write everything else nlfile.write(f" {key} = '{value}' \n") - if start_year <= 2015: + if start_year <= 2023: mksrf_fvegtyp = rawdata_files["mksrf_fvegtyp"] mksrf_fvegtyp_mesh = rawdata_files["mksrf_fvegtyp_mesh"] mksrf_fhrvtyp = rawdata_files["mksrf_fvegtyp"] @@ -690,12 +650,6 @@ def write_nml_rawinput( nlfile.write(f" mksrf_fpctlak = '{mksrf_fpctlak}' \n") nlfile.write(f" mksrf_furban = '{mksrf_furban}' \n") - if vic_flag: - mksrf_fvic = rawdata_files["mksrf_fvic"] - nlfile.write(f" mksrf_fvic = '{mksrf_fvic}' \n") - mksrf_fvic_mesh = rawdata_files["mksrf_fvic_mesh"] - nlfile.write(f" mksrf_fvic_mesh = '{mksrf_fvic_mesh}' \n") - nlfile.write(f" mksrf_fdynuse = '{landuse_fname} ' \n") return must_run_download_input_data @@ -714,7 +668,7 @@ def handle_transient_run( with open(landuse_fname, "w", encoding="utf-8") as landuse_file: for year in range(start_year, end_year + 1): year_str = str(year) - if year <= 2015: + if year <= 2023: file1 = rawdata_files["mksrf_fvegtyp"] file2 = rawdata_files["mksrf_fvegtyp_urban"] file3 = rawdata_files["mksrf_fvegtyp_lake"] @@ -832,16 +786,15 @@ def determine_input_rawdata(start_year, input_path, attribute_list): max_match_child = child2 if max_match_child is None: - # TODO slevis: Are these if-statements backwards? - # For years greater than 2015 - mksrf_fvegtyp_ssp must have a match - if start_year <= 2015: + # For years greater than 2023 - mksrf_fvegtyp_ssp must have a match + if start_year > 2023: if "mksrf_fvegtyp_ssp" not in child1.tag: error_msg = f"ERROR: {child1.tag} has no matches" sys.exit(error_msg) else: continue else: - # For years less than 2015 - mksrf_fvegtyp must have a match + # For years less than 2023 - mksrf_fvegtyp must have a match if "mksrf_fvegtyp" not in child1.tag: error_msg = f"ERROR: {child1.tag} has no matches" sys.exit(error_msg) diff --git a/src/biogeochem/FireEmisFactorsMod.F90 b/src/biogeochem/FireEmisFactorsMod.F90 index e97082c0b8..de4b8280ec 100644 --- a/src/biogeochem/FireEmisFactorsMod.F90 +++ b/src/biogeochem/FireEmisFactorsMod.F90 @@ -11,6 +11,8 @@ module FireEmisFactorsMod use shr_kind_mod, only : r8 => shr_kind_r8 use abortutils, only : endrun use clm_varctl, only : iulog + use clm_varpar, only : maxveg + use pftconMod, only : nc3crop ! implicit none private @@ -21,7 +23,6 @@ module FireEmisFactorsMod public :: fire_emis_factors_get ! !PRIVATE MEMBERS: - integer :: npfts ! number of plant function types ! type emis_eff_t real(r8), pointer :: eff(:) ! emissions efficiency factor @@ -52,7 +53,6 @@ subroutine fire_emis_factors_get( comp_name, factors, molecwght ) ! Method for getting FireEmis information for a named compound ! ! !USES: - use pftconMod , only : nc3crop ! !ARGUMENTS: character(len=*),intent(in) :: comp_name ! FireEmis compound name real(r8), intent(out) :: factors(:) ! vegetation type factors for the compound of interest @@ -73,9 +73,11 @@ subroutine fire_emis_factors_get( comp_name, factors, molecwght ) call endrun(errmes) endif - factors(:npfts) = comp_factors_table( ndx )%eff(:npfts) - if ( size(factors) > npfts )then - factors(npfts+1:) = comp_factors_table( ndx )%eff(nc3crop) + factors(:maxveg) = comp_factors_table( ndx )%eff(:maxveg) + ! If fire emissions factor file only includes natural PFT's, but this is a crop case + ! Copy the generic crop factors to the crop CFT's from generic crop + if ( size(factors) > nc3crop )then + factors(nc3crop+1:) = comp_factors_table( ndx )%eff(nc3crop) end if molecwght = comp_factors_table( ndx )%wght @@ -96,7 +98,7 @@ subroutine fire_emis_factors_init( filename ) use ncdio_pio, only : ncd_pio_openfile,ncd_inqdlen use pio, only : pio_inq_varid,pio_get_var,file_desc_t,pio_closefile use fileutils , only : getfil - use clm_varpar , only : mxpft + use clm_varpar, only : mxpft ! ! !ARGUMENTS: character(len=*),intent(in) :: filename ! FireEmis factors input file @@ -126,16 +128,20 @@ subroutine fire_emis_factors_init( filename ) call ncd_inqdlen( ncid, dimid, n_comps, name='Comp_Num') call ncd_inqdlen( ncid, dimid, n_pfts, name='PFT_Num') - npfts = n_pfts - if ( npfts /= mxpft .and. npfts /= 16 )then - call endrun('Number of PFTs on fire emissions file is NOT correct. Its neither the total number of PFTS nor 16') + if ( (n_pfts < maxveg) .and. (n_pfts < nc3crop) )then + write(iulog,*) ' n_pfts = ', n_pfts, ' maxveg = ', maxveg, ' nat_pft = ', nc3crop + call endrun('Number of PFTs on the fire emissions file is less than the number of natural PFTs from the surface dataset') + end if + if ( n_pfts > mxpft )then + write(iulog,*) ' n_pfts = ', n_pfts, ' mxpft = ', mxpft + call endrun('Number of PFTs on the fire emissions file is more than the max number of PFTs from the surface dataset with crops') end if ierr = pio_inq_varid(ncid,'Comp_EF', comp_ef_vid) ierr = pio_inq_varid(ncid,'Comp_Name',comp_name_vid) ierr = pio_inq_varid(ncid,'Comp_MW', comp_mw_vid) - allocate( comp_factors(n_pfts) ) + allocate( comp_factors(maxveg) ) allocate( comp_names(n_comps) ) allocate( comp_molecwghts(n_comps) ) @@ -146,7 +152,7 @@ subroutine fire_emis_factors_init( filename ) call bld_hash_table_indices( comp_names ) do i=1,n_comps start=(/i,1/) - count=(/1,npfts/) + count=(/1,min(n_pfts,maxveg)/) ierr = pio_get_var( ncid, comp_ef_vid, start, count, comp_factors ) call enter_hash_data( trim(comp_names(i)), comp_factors, comp_molecwghts(i) ) diff --git a/src/fates b/src/fates index e372f0b6cd..e06e0dfcaf 160000 --- a/src/fates +++ b/src/fates @@ -1 +1 @@ -Subproject commit e372f0b6cdf46f76f888ee6ac92d9a3572464e8b +Subproject commit e06e0dfcaf6347993d47dc29944e952d3e4412f7 diff --git a/src/main/clm_initializeMod.F90 b/src/main/clm_initializeMod.F90 index 340a799908..bf9a97ae58 100644 --- a/src/main/clm_initializeMod.F90 +++ b/src/main/clm_initializeMod.F90 @@ -58,7 +58,7 @@ subroutine initialize1(dtime) use clm_varcon , only: clm_varcon_init use landunit_varcon , only: landunit_varcon_init use clm_varctl , only: fsurdat, version - use surfrdMod , only: surfrd_get_num_patches, surfrd_get_nlevurb + use surfrdMod , only: surfrd_get_num_patches, surfrd_get_nlevurb, surfrd_compat_check use controlMod , only: control_init, control_print, NLFilename use ncdio_pio , only: ncd_pio_init use initGridCellsMod , only: initGridCells @@ -100,6 +100,7 @@ subroutine initialize1(dtime) call control_init(dtime) call ncd_pio_init() + call surfrd_compat_check(fsurdat) call surfrd_get_num_patches(fsurdat, actual_maxsoil_patches, actual_numpft, actual_numcft) call surfrd_get_nlevurb(fsurdat, actual_nlevurb) diff --git a/src/main/glc2lndMod.F90 b/src/main/glc2lndMod.F90 index 2d0dbb5791..c2e6290300 100644 --- a/src/main/glc2lndMod.F90 +++ b/src/main/glc2lndMod.F90 @@ -35,7 +35,7 @@ module glc2lndMod ! Public data ! ------------------------------------------------------------------------ - ! Where we should do runoff routing that is appropriate for having a dynamic icesheet underneath. + ! Where we should do SMB-related runoff routing that is appropriate for having a dynamic icesheet underneath. real(r8), pointer :: glc_dyn_runoff_routing_grc (:) => null() ! ------------------------------------------------------------------------ @@ -383,32 +383,32 @@ subroutine check_glc2lnd_icemask(this, bounds) if (this%icemask_grc(g) > 0._r8) then - ! Ensure that icemask is a subset of has_virtual_columns. This is needed because - ! we allocated memory based on has_virtual_columns, so it is a problem if the - ! ice sheet tries to expand beyond the area defined by has_virtual_columns. - if (.not. this%glc_behavior%has_virtual_columns_grc(g)) then - write(iulog,'(a)') subname//' ERROR: icemask must be a subset of has_virtual_columns.' - write(iulog,'(a)') 'Ensure that the glacier_region_behavior namelist item is set correctly.' - write(iulog,'(a)') '(It should specify "virtual" for the region corresponding to the GLC domain.)' - write(iulog,'(a)') 'If glacier_region_behavior is set correctly, then you can fix this problem' - write(iulog,'(a)') 'by modifying GLACIER_REGION on the surface dataset.' - write(iulog,'(a)') '(Expand the region that corresponds to the GLC domain' - write(iulog,'(a)') '- i.e., the region specified as "virtual" in glacier_region_behavior.)' - call endrun(subgrid_index=g, subgrid_level=subgrid_level_gridcell, msg=errMsg(sourcefile, __LINE__)) - end if - - ! Ensure that icemask is a subset of melt_replaced_by_ice. This is needed - ! because we only compute SMB in the region given by melt_replaced_by_ice - ! (according to the logic for building the do_smb filter), and we need SMB - ! everywhere inside the icemask. - if (.not. this%glc_behavior%melt_replaced_by_ice_grc(g)) then - write(iulog,'(a)') subname//' ERROR: icemask must be a subset of melt_replaced_by_ice.' - write(iulog,'(a)') 'Ensure that the glacier_region_melt_behavior namelist item is set correctly.' - write(iulog,'(a)') '(It should specify "replaced_by_ice" for the region corresponding to the GLC domain.)' - write(iulog,'(a)') 'If glacier_region_behavior is set correctly, then you can fix this problem' - write(iulog,'(a)') 'by modifying GLACIER_REGION on the surface dataset.' - write(iulog,'(a)') '(Expand the region that corresponds to the GLC domain' - write(iulog,'(a)') '- i.e., the region specified as "replaced_by_ice" in glacier_region_melt_behavior.)' + ! Ensure that, within the icemask, there are no points that have (non-virtual + ! and compute-SMB). This is important for two reasons: + ! + ! (1) To ensure that, in grid cells where we're producing SMB, we have SMB for + ! all elevation classes, so that the downscaling / vertical interpolation + ! can be done correctly. + ! + ! (2) To avoid conservation issues, we want to ensure that, in grid cells where + ! we're producing SMB and are dynamically coupled to the ice sheet (if 2-way + ! coupling is enabled), glacier areas are remaining in-sync with glc. (Note + ! that has_virtual_columns_grc dictates where we're able to keep glacier + ! areas in sync with glc.) (In principle, I think this one could check + ! icemask_coupled_fluxes rather than icemask; we check icemask because we + ! needed to check icemask for the other reason anyway; this is okay because + ! icemask_coupled_fluxes is a subset of icemask.) + if (this%glc_behavior%melt_replaced_by_ice_grc(g) .and. & + .not. this%glc_behavior%has_virtual_columns_grc(g)) then + write(iulog,'(a)') subname//' ERROR: Within the icemask, there cannot be any points that have' + write(iulog,'(a)') '(non-virtual and compute-SMB).' + write(iulog,'(a)') 'Ensure that GLACIER_REGION on the surface dataset and the namelist items,' + write(iulog,'(a)') 'glacier_region_behavior and glacier_region_melt_behavior are all set correctly:' + write(iulog,'(a)') 'Typically, the region encompassing the active GLC domain should specify' + write(iulog,'(a)') 'glacier_region_behavior="virtual" and glacier_region_melt_behavior="replaced_by_ice".' + write(iulog,'(a)') '(But it is also okay for part of the GLC domain to have' + write(iulog,'(a)') 'glacier_region_melt_behavior="remains_in_place"; this part of the domain can have' + write(iulog,'(a)') 'any setting for glacier_region_behavior.)' call endrun(subgrid_index=g, subgrid_level=subgrid_level_gridcell, msg=errMsg(sourcefile, __LINE__)) end if @@ -437,10 +437,12 @@ subroutine check_glc2lnd_icemask_coupled_fluxes(this, bounds) do g = bounds%begg, bounds%endg - ! Ensure that icemask_coupled_fluxes is a subset of icemask. Although there - ! currently is no code in CLM that depends on this relationship, it seems helpful - ! to ensure that this intuitive relationship holds, so that code developed in the - ! future can rely on it. + ! Ensure that icemask_coupled_fluxes is a subset of icemask. This is helpful to + ! ensure that the consistency checks that are done on glc behaviors within the + ! icemask (in check_glc2lnd_icemask) also apply within the icemask_coupled_fluxes + ! region. Other than that convenience, there currently is no code in CLM that + ! depends on this relationship, but it seems helpful to ensure that this intuitive + ! relationship holds, so that code developed in the future can rely on it. if (this%icemask_coupled_fluxes_grc(g) > 0._r8 .and. this%icemask_grc(g) == 0._r8) then write(iulog,*) subname//' ERROR: icemask_coupled_fluxes must be a subset of icemask.' call endrun(subgrid_index=g, subgrid_level=subgrid_level_gridcell, msg=errMsg(sourcefile, __LINE__)) @@ -477,70 +479,73 @@ subroutine update_glc2lnd_dyn_runoff_routing(this, bounds) ! where CISM is running in diagnostic-only mode and therefore is not sending a calving flux - ! we have glc_dyn_runoff_routing = 0, and the snowcap flux goes to the runoff model. ! This is needed to conserve water correctly in the absence of a calving flux. + ! + ! In places where we are not computing SMB, we also have glc_dyn_runoff_routing = 0. + ! Currently glc_dyn_runoff_routing is only used where we're computing SMB, but if it + ! were ever used elsewhere, it seems best to have it set to 0 there: this seems + ! consistent with the fact that we zero out the SMB flux sent to GLC in that region. + ! (However, it's possible that, once we start actually using glc_dyn_runoff_routing + ! for some purpose outside the do_smb filter, we'll discover that this logic should + ! be changed.) do g = bounds%begg, bounds%endg - ! Set glc_dyn_runoff_routing_grc(g) to a value in the range [0,1]. - ! - ! This value gives the grid cell fraction that is deemed to be coupled to the - ! dynamic ice sheet model. For this fraction of the grid cell, snowcap fluxes are - ! sent to the ice sheet model. The remainder of the grid cell sends snowcap fluxes - ! to the runoff model. - ! - ! Note: The coupler (in prep_glc_mod.F90) assumes that the fraction coupled to the - ! dynamic ice sheet model is min(lfrac, Sg_icemask_l), where lfrac is the - ! "frac" component of fraction_lx, and Sg_icemask_l is obtained by mapping - ! Sg_icemask_g from the glc to the land grid. Here, ldomain%frac is - ! equivalent to lfrac, and this%icemask_grc is equivalent to Sg_icemask_l. - ! However, here we use icemask_coupled_fluxes_grc, so that we route all snow - ! capping to runoff in areas where the ice sheet is not generating calving - ! fluxes. In addition, here we need to divide by lfrac, because the coupler - ! multiplies by it later (and, for example, if lfrac = 0.1 and - ! icemask_coupled_fluxes = 1, we want all snow capping to go to the ice - ! sheet model, not to the runoff model). - ! - ! Note: In regions where CLM overlaps the CISM domain, this%icemask_grc(g) typically - ! is nearly equal to ldomain%frac(g). So an alternative would be to simply set - ! glc_dyn_runoff_routing_grc(g) = icemask_grc(g). - ! The reason to cap glc_dyn_runoff_routing at lfrac is to avoid sending the - ! ice sheet model a greater mass of water (in the form of snowcap fluxes) - ! than is allowed to fall on a CLM grid cell that is part ocean. - - ! TODO(wjs, 2017-05-08) Ideally, we wouldn't have this duplication in logic - ! between the coupler and CLM. The best solution would be to have the coupler - ! itself do the partitioning of the snow capping flux between the ice sheet model - ! and the runoff model. A next-best solution would be to have the coupler send a - ! field to CLM telling it what fraction of snow capping should go to the runoff - ! model in each grid cell. - - if (ldomain%frac(g) == 0._r8) then - ! Avoid divide by 0; note that, in this case, the amount going to runoff isn't - ! important for system-wide conservation, so we could really choose anything we - ! want. - this%glc_dyn_runoff_routing_grc(g) = this%icemask_coupled_fluxes_grc(g) - else - this%glc_dyn_runoff_routing_grc(g) = & - min(ldomain%frac(g), this%icemask_coupled_fluxes_grc(g)) / & - ldomain%frac(g) - end if - - if (this%glc_dyn_runoff_routing_grc(g) > 0.0_r8) then - - ! Ensure that glc_dyn_runoff_routing is a subset of melt_replaced_by_ice. This - ! is needed because glacial melt is only sent to the runoff stream in the region - ! given by melt_replaced_by_ice (because the latter is used to create the do_smb - ! filter, and the do_smb filter controls where glacial melt is computed). - if (.not. this%glc_behavior%melt_replaced_by_ice_grc(g)) then - write(iulog,'(a)') subname//' ERROR: icemask_coupled_fluxes must be a subset of melt_replaced_by_ice.' - write(iulog,'(a)') 'Ensure that the glacier_region_melt_behavior namelist item is set correctly.' - write(iulog,'(a)') '(It should specify "replaced_by_ice" for the region corresponding to the GLC domain.)' - write(iulog,'(a)') 'If glacier_region_behavior is set correctly, then you can fix this problem' - write(iulog,'(a)') 'by modifying GLACIER_REGION on the surface dataset.' - write(iulog,'(a)') '(Expand the region that corresponds to the GLC domain' - write(iulog,'(a)') '- i.e., the region specified as "replaced_by_ice" in glacier_region_melt_behavior.)' - call endrun(subgrid_index=g, subgrid_level=subgrid_level_gridcell, msg=errMsg(sourcefile, __LINE__)) + if (this%glc_behavior%melt_replaced_by_ice_grc(g)) then + ! As noted in the comments at the top of this routine, we only set + ! glc_dyn_runoff_routing where we are computing SMB + + ! Set glc_dyn_runoff_routing_grc(g) to a value in the range [0,1]. + ! + ! This value gives the grid cell fraction that is deemed to be coupled to the + ! dynamic ice sheet model. For this fraction of the grid cell, snowcap fluxes are + ! sent to the ice sheet model. The remainder of the grid cell sends snowcap fluxes + ! to the runoff model. + ! + ! Note: The coupler (in prep_glc_mod.F90) assumes that the fraction coupled to the + ! dynamic ice sheet model is min(lfrac, Sg_icemask_l), where lfrac is the + ! "frac" component of fraction_lx, and Sg_icemask_l is obtained by mapping + ! Sg_icemask_g from the glc to the land grid. Here, ldomain%frac is + ! equivalent to lfrac, and this%icemask_grc is equivalent to Sg_icemask_l. + ! However, here we use icemask_coupled_fluxes_grc, so that we route all snow + ! capping to runoff in areas where the ice sheet is not generating calving + ! fluxes. In addition, here we need to divide by lfrac, because the coupler + ! multiplies by it later (and, for example, if lfrac = 0.1 and + ! icemask_coupled_fluxes = 1, we want all snow capping to go to the ice + ! sheet model, not to the runoff model). + ! + ! Note: In regions where CLM overlaps the CISM domain, this%icemask_grc(g) typically + ! is nearly equal to ldomain%frac(g). So an alternative would be to simply set + ! glc_dyn_runoff_routing_grc(g) = icemask_grc(g). + ! The reason to cap glc_dyn_runoff_routing at lfrac is to avoid sending the + ! ice sheet model a greater mass of water (in the form of snowcap fluxes) + ! than is allowed to fall on a CLM grid cell that is part ocean. + + ! TODO(wjs, 2017-05-08) Ideally, we wouldn't have this duplication in logic + ! between the coupler and CLM. The best solution would be to have the coupler + ! itself do the partitioning of the snow capping flux between the ice sheet model + ! and the runoff model. A next-best solution would be to have the coupler send a + ! field to CLM telling it what fraction of snow capping should go to the runoff + ! model in each grid cell. + + if (ldomain%frac(g) == 0._r8) then + ! Avoid divide by 0; note that, in this case, the amount going to runoff isn't + ! important for system-wide conservation, so we could really choose anything we + ! want. + this%glc_dyn_runoff_routing_grc(g) = this%icemask_coupled_fluxes_grc(g) + else + this%glc_dyn_runoff_routing_grc(g) = & + min(ldomain%frac(g), this%icemask_coupled_fluxes_grc(g)) / & + ldomain%frac(g) end if + + else ! .not. this%glc_behavior%melt_replaced_by_ice_grc(g) + ! As noted in the comments at the top of this routine, we set + ! glc_dyn_runoff_routing to 0 where we are not computing SMB. (This assumes that + ! gridcells where we compute SMB are the same as gridcells for which + ! melt_replaced_by_ice is true.) + this%glc_dyn_runoff_routing_grc(g) = 0._r8 end if + end do end subroutine update_glc2lnd_dyn_runoff_routing @@ -578,8 +583,15 @@ subroutine update_glc2lnd_fracs(this, bounds) if (glc_do_dynglacier) then do g = bounds%begg, bounds%endg - ! Values from GLC are only valid within the icemask, so we only update CLM's areas there - if (this%icemask_grc(g) > 0._r8) then + ! Values from GLC are only valid within the icemask, so we only update CLM's + ! areas there. Also, we only update areas where the glacier region behavior is + ! 'virtual', because that's the only region where we are guaranteed to have all + ! of the elevation classes we need in order to remain in sync. (Note that, for + ! conservation purposes, it's important that we update areas in all regions + ! where we're fully-two-way-coupled to the icesheet and we're computing SMB; + ! this requirement is checked in check_glc2lnd_icemask.) (This conditional + ! should be kept consistent with the conditional in update_glc2lnd_topo.) + if (this%icemask_grc(g) > 0._r8 .and. this%glc_behavior%has_virtual_columns_grc(g)) then ! Set total ice landunit area area_ice = sum(this%frac_grc(g, 1:maxpatch_glc)) @@ -623,7 +635,7 @@ subroutine update_glc2lnd_fracs(this, bounds) msg="at least one glc column has non-zero area from cpl but has no slot in memory") end if ! error end if ! area_ice > 0 - end if ! this%icemask_grc(g) > 0 + end if ! this%icemask_grc(g) > 0 .and. this%glc_behavior%has_virtual_columns_grc(g) end do ! g end if ! glc_do_dynglacier @@ -667,8 +679,12 @@ subroutine update_glc2lnd_topo(this, bounds, topo_col, needs_downscaling_col) l = col%landunit(c) g = col%gridcell(c) - ! Values from GLC are only valid within the icemask, so we only update CLM's topo values there - if (this%icemask_grc(g) > 0._r8) then + ! Values from GLC are only valid within the icemask, so we only update CLM's + ! topo values there. Also, consistently with the conditional in + ! update_glc2lnd_fracs, we only update topo values where the glacier region + ! behavior is 'virtual': it could be problematic to update topo values in a + ! grid cell where we're not updating areas. + if (this%icemask_grc(g) > 0._r8 .and. this%glc_behavior%has_virtual_columns_grc(g)) then if (lun%itype(l) == istice) then ice_class = col_itype_to_ice_class(col%itype(c)) else diff --git a/src/main/glcBehaviorMod.F90 b/src/main/glcBehaviorMod.F90 index 0476fe3ecb..8076f8fcaf 100644 --- a/src/main/glcBehaviorMod.F90 +++ b/src/main/glcBehaviorMod.F90 @@ -72,9 +72,10 @@ module glcBehaviorMod logical, allocatable, public :: allow_multiple_columns_grc(:) ! If melt_replaced_by_ice_grc(g) is true, then any glacier ice melt in gridcell g - ! runs off and is replaced by ice. Note that SMB cannot be computed in gridcell g if - ! melt_replaced_by_ice_grc(g) is false, since we can't compute a sensible negative - ! smb in that case. + ! runs off and is replaced by ice. This flag is also used to determine where we + ! compute SMB: We compute SMB in all grid cells for which melt_replaced_by_ice_grc is + ! true. (SMB cannot be computed in gridcells where melt_replaced_by_ice_grc is false, + ! since we can't compute a sensible negative SMB in that case.) logical, allocatable, public :: melt_replaced_by_ice_grc(:) ! If ice_runoff_melted_grc(g) is true, then ice runoff generated by the @@ -310,6 +311,7 @@ subroutine InitFromInputs(this, begg, endg, & call translate_glacier_region_behavior call translate_glacier_region_melt_behavior call translate_glacier_region_ice_runoff_behavior + call check_behaviors call this%InitAllocate(begg, endg) @@ -405,7 +407,7 @@ subroutine translate_glacier_region_behavior glacier_region_behavior(i) = BEHAVIOR_SINGLE_AT_ATM_TOPO case (behavior_str_unset) write(iulog,*) ' ERROR: glacier_region_behavior not specified for ID ', i - write(iulog,*) 'You probably need to extend the glacier_region_behavior namelist array' + write(iulog,*) 'You may need to extend the glacier_region_behavior namelist array.' call endrun(msg=' ERROR: glacier_region_behavior not specified for ID '// & errMsg(sourcefile, __LINE__)) case default @@ -436,7 +438,7 @@ subroutine translate_glacier_region_melt_behavior glacier_region_melt_behavior(i) = MELT_BEHAVIOR_REMAINS_IN_PLACE case (behavior_str_unset) write(iulog,*) ' ERROR: glacier_region_melt_behavior not specified for ID ', i - write(iulog,*) 'You probably need to extend the glacier_region_melt_behavior namelist array' + write(iulog,*) 'You may need to extend the glacier_region_melt_behavior namelist array.' call endrun(msg=' ERROR: glacier_region_melt_behavior not specified for ID '// & errMsg(sourcefile, __LINE__)) case default @@ -467,7 +469,7 @@ subroutine translate_glacier_region_ice_runoff_behavior glacier_region_ice_runoff_behavior(i) = ICE_RUNOFF_BEHAVIOR_MELTED case (behavior_str_unset) write(iulog,*) ' ERROR: glacier_region_ice_runoff_behavior not specified for ID ', i - write(iulog,*) 'You probably need to extend the glacier_region_ice_runoff_behavior namelist array' + write(iulog,*) 'You may need to extend the glacier_region_ice_runoff_behavior namelist array.' call endrun(msg=' ERROR: glacier_region_ice_runoff_behavior not specified for ID '// & errMsg(sourcefile, __LINE__)) case default @@ -481,7 +483,28 @@ subroutine translate_glacier_region_ice_runoff_behavior end do end subroutine translate_glacier_region_ice_runoff_behavior - end subroutine InitFromInputs + subroutine check_behaviors + ! Check the various behaviors for validity / consistency + integer :: i + + do i = min_glacier_region_id, max_glacier_region_id + if (glacier_region_melt_behavior(i) == MELT_BEHAVIOR_REPLACED_BY_ICE .and. & + glacier_region_ice_runoff_behavior(i) == ICE_RUNOFF_BEHAVIOR_MELTED) then + write(iulog,*) ' ERROR: Bad glacier region behavior combination for ID ', i + write(iulog,*) 'You cannot combine glacier_region_melt_behavior = "replaced_by_ice"' + write(iulog,*) 'with glacier_region_ice_runoff_behavior = "melted".' + write(iulog,*) 'While there is nothing fundamentally wrong with this combination,' + write(iulog,*) 'it can result in problematic, non-physical fluxes (particularly,' + write(iulog,*) 'a large positive sensible heat flux during glacial melt in regions' + write(iulog,*) 'where the icesheet is not fully dynamic and two-way-coupled;' + write(iulog,*) 'see https://github.com/ESCOMP/ctsm/issues/423 for details).' + call endrun(msg=' ERROR: Bad glacier region behavior combination '// & + errMsg(sourcefile, __LINE__)) + end if + end do + end subroutine check_behaviors + + end subroutine InitFromInputs !----------------------------------------------------------------------- diff --git a/src/main/lnd2glcMod.F90 b/src/main/lnd2glcMod.F90 index 27fa7639d7..26359ff261 100644 --- a/src/main/lnd2glcMod.F90 +++ b/src/main/lnd2glcMod.F90 @@ -169,10 +169,28 @@ subroutine update_lnd2glc(this, bounds, num_do_smb_c, filter_do_smb_c, & character(len=*), parameter :: subname = 'update_lnd2glc' !------------------------------------------------------------------------------ - ! Initialize to reasonable defaults + ! Initialize to reasonable defaults. These values will be sent for gridcells / + ! columns outside the do_smb filter. + ! NOTE(wjs, 2018-07-03) qice should be 0 outside the do_smb filter to ensure conservation this%qice_grc(bounds%begg : bounds%endg, :) = 0._r8 + + ! NOTE(wjs, 2018-07-03) tsrf can be anything outside the do_smb filter; 0 deg C seems + ! as reasonable as anything (based on input from Bill Lipscomb and Gunter Leguy) this%tsrf_grc(bounds%begg : bounds%endg, :) = tfrz + + ! NOTE(wjs, 2018-07-03) The topo values outside the do_smb filter could matter for + ! gridcells where we compute SMB for some but not all elevation classes (possibly + ! because we haven't even allocated memory for some elevation classes - i.e., if we're + ! not using the 'virtual' behavior in that gridcell). In glc2lndMod, we ensure that + ! this cannot occur for gridcells within the icemask (i.e., within the icemask, we + ! ensure that there are no points that have (non-virtual and compute-SMB)), so this + ! isn't a conservation issue, but it could still be important, e.g., for generating + ! appropriate forcings for a later dlnd-driven T compset. I'm not sure what is "right" + ! here. We've historically used 0 for this, and maybe that's as good as anything, + ! because it may lead to the 0 SMB values being ignored for the sake of vertical + ! interpolation, but I'm not sure about this. But maybe it would be better to use + ! topo at the center of each elevation class? this%topo_grc(bounds%begg : bounds%endg, :) = 0._r8 ! Fill the lnd->glc data on the clm grid diff --git a/src/main/surfrdMod.F90 b/src/main/surfrdMod.F90 index 12212e2160..88d43a09cc 100644 --- a/src/main/surfrdMod.F90 +++ b/src/main/surfrdMod.F90 @@ -7,7 +7,7 @@ module surfrdMod ! ! !USES: #include "shr_assert.h" - use shr_kind_mod , only : r8 => shr_kind_r8 + use shr_kind_mod , only : r8 => shr_kind_r8, r4 => shr_kind_r4 use shr_log_mod , only : errMsg => shr_log_errMsg use abortutils , only : endrun use clm_varpar , only : nlevsoifl @@ -27,6 +27,7 @@ module surfrdMod save ! ! !PUBLIC MEMBER FUNCTIONS: + public :: surfrd_compat_check ! Check that this surface dataset is compatible public :: surfrd_get_data ! Read surface dataset and determine subgrid weights public :: surfrd_get_num_patches ! Read surface dataset to determine maxsoil_patches and numcft public :: surfrd_get_nlevurb ! Read surface dataset to determine nlevurb @@ -45,6 +46,70 @@ module surfrdMod contains + !----------------------------------------------------------------------- + subroutine surfrd_compat_check ( lfsurdat ) + ! + ! !DESCRIPTION: + ! Check compatability for this surface dataset and abort with an error if it's not + ! + ! !USES: + use ncdio_pio, only : check_att + ! !ARGUMENTS: + character(len=*), intent(in) :: lfsurdat ! surface dataset filename + ! !LOCAL VARIABLES: + type(file_desc_t) :: ncid ! netcdf id + logical :: exists ! If attribute or variable was found on the file + integer :: status ! Status return code + real(r4) :: version ! Version number on the dataset + ! NOTE: Only increment the expected_version when surface datasets are incompatible with the previous version + ! If datasets are just updated data and backwards compatble leave the expected version alone + real(r4), parameter :: expected_version = 5.3_r4 + character(len=50) :: description + character(len=*), parameter :: version_name = 'Dataset_Version' + + call ncd_pio_openfile (ncid, trim(lfsurdat), 0) + call check_att(ncid, pio_global, version_name, exists) + if (exists) then + status = pio_get_att(ncid, pio_global, version_name, version) + else + ! For a few previous versions guess on the compatability version based on existence of variables + call check_var( ncid, 'PCT_OCEAN', exists) + if (exists) then + version = 5.2_r4 + else + call check_var( ncid, 'CONST_HARVEST_SH1', exists) + if (exists) then + version = 5.0_r4 + else + call check_var( ncid, 'GLACIER_REGION', exists) + if (exists) then + version = 4.5_r4 + else + ! This is a version before the main clm4_5 dataseta so marking it as 0 for unknown + version = 0.0_r4 + end if + end if + end if + end if + call ncd_pio_closefile(ncid) + if ( (version /= expected_version) )then + if ( version < expected_version )then + description = 'older' + if ( version == 0.0_r4 ) description = trim(description)//' than 4.5' + else if ( version > expected_version )then + description = 'newer' + end if + if ( masterproc )then + write(iulog,*) 'Input surface dataset is: ', trim(lfsurdat) + write(iulog,'(3a)') 'This surface dataset is ', trim(description), ' and incompatible with this version of CTSM' + write(iulog,'(a,f3.1,a,f3.1)') 'Dataset version = ', version, ' Version expected = ', expected_version + write(iulog,*) errMsg(sourcefile, __LINE__) + end if + call endrun(msg="ERROR: Incompatible surface dataset") + end if + + end subroutine surfrd_compat_check + !----------------------------------------------------------------------- subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat, actual_numcft) ! diff --git a/src/main/test/glcBehavior_test/test_glcBehavior.pf b/src/main/test/glcBehavior_test/test_glcBehavior.pf index ff104458b1..37271d2f98 100644 --- a/src/main/test/glcBehavior_test/test_glcBehavior.pf +++ b/src/main/test/glcBehavior_test/test_glcBehavior.pf @@ -170,7 +170,7 @@ contains call glc_behavior%InitFromInputs(bounds%begg, bounds%endg, & glacier_region_map = [0], & glacier_region_behavior_str = ['single_at_atm_topo'], & - glacier_region_melt_behavior_str = ['replaced_by_ice'], & + glacier_region_melt_behavior_str = ['remains_in_place'], & glacier_region_ice_runoff_behavior_str = ['melted']) @assertTrue(glc_behavior%ice_runoff_melted_grc(bounds%begg)) diff --git a/src/main/test/topo_test/test_topo.pf b/src/main/test/topo_test/test_topo.pf index 196ce34763..82c3b2cb90 100644 --- a/src/main/test/topo_test/test_topo.pf +++ b/src/main/test/topo_test/test_topo.pf @@ -251,13 +251,33 @@ contains expected_filter = col_filter_empty(bounds) call this%topo%Init(bounds) - ! Need icemask 0, because we can't have single_at_atm_topo inside the icemask - call this%do_UpdateTopo(glc_behavior, icemask_grc = grc_array(0._r8)) + call this%do_UpdateTopo(glc_behavior, icemask_grc = grc_array(1._r8)) filter = this%topo%DownscaleFilterc(bounds) @assertTrue(filter == expected_filter) end subroutine downscaleFilter_afterUpdate_doesNotContain_singleAtAtmTopo + @Test + subroutine downscaleFilter_afterUpdate_contains_vegInsideIcemaskAndVirtual(this) + ! We expect the downscaleFilter to contain vegetated points if they are both (1) + ! inside the icemask, and (2) in the 'virtual' region - because topo is updated in + ! that region. + class(TestTopo), intent(inout) :: this + type(glc_behavior_type) :: glc_behavior + type(filter_col_type) :: filter + type(filter_col_type) :: expected_filter + + call setup_single_veg_patch(pft_type = 1) + glc_behavior = create_glc_behavior_all_virtual() + expected_filter = col_filter_from_index_array(bounds, [bounds%begc]) + + call this%topo%Init(bounds) + call this%do_UpdateTopo(glc_behavior, icemask_grc = grc_array(1._r8)) + filter = this%topo%DownscaleFilterc(bounds) + + @assertTrue(filter == expected_filter) + end subroutine downscaleFilter_afterUpdate_contains_vegInsideIcemaskAndVirtual + @Test subroutine downscaleFilter_afterUpdate_doesNotContain_vegOutsideIcemask(this) class(TestTopo), intent(inout) :: this @@ -266,8 +286,6 @@ contains type(filter_col_type) :: expected_filter call setup_single_veg_patch(pft_type = 1) - ! Use 'virtual' behavior, to make sure that we're not accidentally trying to - ! downscale vegetation over virtual columns. glc_behavior = create_glc_behavior_all_virtual() expected_filter = col_filter_empty(bounds) @@ -279,7 +297,10 @@ contains end subroutine downscaleFilter_afterUpdate_doesNotContain_vegOutsideIcemask @Test - subroutine downscaleFilter_afterUpdate_contains_vegInsideIcemask(this) + subroutine downscaleFilter_afterUpdate_doesNotContain_vegNonVirtual(this) + ! Since topo is only updated in the 'virtual' region, we expect the downscale filter + ! to NOT include vegetated points outside the 'virtual' region, because topo + ! shouldn't be updated for those vegetated points. class(TestTopo), intent(inout) :: this type(glc_behavior_type) :: glc_behavior type(filter_col_type) :: filter @@ -287,14 +308,36 @@ contains call setup_single_veg_patch(pft_type = 1) glc_behavior = create_glc_behavior_all_multiple() - expected_filter = col_filter_from_index_array(bounds, [bounds%begc]) + expected_filter = col_filter_empty(bounds) call this%topo%Init(bounds) call this%do_UpdateTopo(glc_behavior, icemask_grc = grc_array(1._r8)) filter = this%topo%DownscaleFilterc(bounds) @assertTrue(filter == expected_filter) - end subroutine downscaleFilter_afterUpdate_contains_vegInsideIcemask + end subroutine downscaleFilter_afterUpdate_doesNotContain_vegNonVirtual + + @Test + subroutine topo_changes_for_glcmecInsideIcemaskAndVirtual(this) + class(TestTopo), intent(inout) :: this + type(glc_behavior_type) :: glc_behavior + real(r8), parameter :: topo_orig = 7._r8 + real(r8), parameter :: atm_topo = 23._r8 + + ! our column should get set to this: + real(r8), parameter :: glc_topo = 27._r8 + + call setup_single_ice_column(elev_class = 1) + glc_behavior = create_glc_behavior_all_virtual() + topo_glc_mec(:,:) = topo_orig + + call this%topo%Init(bounds) + call this%do_UpdateTopo(glc_behavior, icemask_grc = grc_array(1._r8), & + atm_topo_grc = grc_array(atm_topo), & + glc_topo = glc_topo) + + @assertEqual(glc_topo, this%topo%topo_col(bounds%begc)) + end subroutine topo_changes_for_glcmecInsideIcemaskAndVirtual @Test subroutine topo_noChange_for_glcmecOutsideIcemask(this) @@ -319,17 +362,17 @@ contains end subroutine topo_noChange_for_glcmecOutsideIcemask @Test - subroutine topo_changes_for_glcmecInsideIcemask(this) + subroutine topo_noChange_for_glcmecNonVirtual(this) class(TestTopo), intent(inout) :: this type(glc_behavior_type) :: glc_behavior real(r8), parameter :: topo_orig = 7._r8 - real(r8), parameter :: atm_topo = 23._r8 - ! our column should get set to this: + ! our column should NOT get set to either of these: + real(r8), parameter :: atm_topo = 23._r8 real(r8), parameter :: glc_topo = 27._r8 call setup_single_ice_column(elev_class = 1) - glc_behavior = create_glc_behavior_all_virtual() + glc_behavior = create_glc_behavior_all_multiple() topo_glc_mec(:,:) = topo_orig call this%topo%Init(bounds) @@ -337,8 +380,8 @@ contains atm_topo_grc = grc_array(atm_topo), & glc_topo = glc_topo) - @assertEqual(glc_topo, this%topo%topo_col(bounds%begc)) - end subroutine topo_changes_for_glcmecInsideIcemask + @assertEqual(topo_orig, this%topo%topo_col(bounds%begc)) + end subroutine topo_noChange_for_glcmecNonVirtual @Test subroutine topo_changes_for_singleAtAtmTopo(this) diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index e3e7644b90..cff7679e9d 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -137,7 +137,6 @@ module CLMFatesInterfaceMod use FatesParametersInterface, only : fates_parameters_type use FatesInterfaceMod , only : DetermineGridCellNeighbors - use FatesIOVariableKindMod, only : group_dyna_simple, group_dyna_complx use FatesHistoryInterfaceMod, only : fates_hist use FatesRestartInterfaceMod, only : fates_restart_interface_type @@ -1241,14 +1240,6 @@ subroutine dynamics_driv(this, nc, bounds_clump, & call this%WrapUpdateFatesSeedInOut(bounds_clump) end if - ! --------------------------------------------------------------------------------- - ! Flush arrays to values defined by %flushval (see registry entry in - ! subroutine define_history_vars() - ! --------------------------------------------------------------------------------- - call fates_hist%flush_hvars(nc,upfreq_in=group_dyna_simple) - - call fates_hist%flush_hvars(nc,upfreq_in=group_dyna_complx) - ! --------------------------------------------------------------------------------- ! Part II: Call the FATES model now that input boundary conditions have been ! provided. @@ -2019,23 +2010,16 @@ subroutine restart( this, bounds_proc, ncid, flag, waterdiagnosticbulk_inst, & this%fates(nc)%sites, & this%fates(nc)%bc_out) + ! ------------------------------------------------------------------------ - ! Update history IO fields that depend on ecosystem dynamics + ! Flush FATES history variables. + ! The flushing process sets all columns outside of FATES perview to + ! the ignore value. This only needs to be done once, because FATES will + ! not overwright values outside the columns that it is in charge of. ! ------------------------------------------------------------------------ - if(fates_history_dimlevel(2)>0) then - call fates_hist%flush_hvars(nc,upfreq_in=group_dyna_simple) - do s = 1,this%fates(nc)%nsites - call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), & - upfreq_in=group_dyna_simple) - end do - if(fates_history_dimlevel(2)>1) then - call fates_hist%flush_hvars(nc,upfreq_in=group_dyna_complx) - do s = 1,this%fates(nc)%nsites - call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), & - upfreq_in=group_dyna_complx) - end do - end if - end if + + call fates_hist%flush_all_hvars(nc) + call fates_hist%update_history_dyn( nc, & this%fates(nc)%nsites, & this%fates(nc)%sites, & @@ -2220,22 +2204,15 @@ subroutine init_coldstart(this, waterstatebulk_inst, waterdiagnosticbulk_inst, & soilbiogeochem_carbonflux_inst, .false.) ! ------------------------------------------------------------------------ - ! Update history IO fields that depend on ecosystem dynamics + ! Flush and zero FATES history variables. + ! The flushing process sets all columns outside of FATES perview to + ! the ignore value. This only needs to be done once, because FATES will + ! not overwright values outside the columns that it is in charge of. + ! We also start off by setting all values on FATES columns to zero. ! ------------------------------------------------------------------------ - if(fates_history_dimlevel(2)>0) then - call fates_hist%flush_hvars(nc,upfreq_in=group_dyna_simple) - do s = 1,this%fates(nc)%nsites - call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), & - upfreq_in=group_dyna_simple) - end do - if(fates_history_dimlevel(2)>1) then - call fates_hist%flush_hvars(nc,upfreq_in=group_dyna_complx) - do s = 1,this%fates(nc)%nsites - call fates_hist%zero_site_hvars(this%fates(nc)%sites(s), & - upfreq_in=group_dyna_complx) - end do - end if - end if + + call fates_hist%flush_all_hvars(nc) + call fates_hist%update_history_dyn( nc, & this%fates(nc)%nsites, & this%fates(nc)%sites, & @@ -3626,9 +3603,6 @@ subroutine wrap_hydraulics_drive(this, bounds_clump, nc, & this%fates(nc)%bc_out(s)%plant_stored_h2o_si end do - - ! Update History Buffers that need to be updated after hydraulics calls - call fates_hist%update_history_hydraulics(nc, & this%fates(nc)%nsites, & this%fates(nc)%sites, & diff --git a/tools/README b/tools/README index 568dc1239b..693e793370 100644 --- a/tools/README +++ b/tools/README @@ -11,8 +11,6 @@ I. General directory structure: crop_calendars --- Regrid and process GGCMI sowing and harvest date files for use in CTSM. mkmapgrids ------- Create regular lat/lon SCRIP grid files - mkprocdata_map --- Convert output unstructured grids into a 2D format that - can be plotted easily site_and_regional Scripts for handling input datasets for site and regional cases. These scripts both help with creation of datasets using the @@ -33,49 +31,6 @@ I. General directory structure: II. Notes on building/running for each of the above tools: - mkprocdata_map has the following files to facilitate building the FORTRAN code: - - README ------- Specific help for using the specific tool and help on specific - files in that directory. - src/Filepath ----- List of directories needed to build the tool - (some files in ../src directories are required). - src/Makefile ----- GNU Makefile to build the tool - (these are identical between tools. - src/Macros.custom Customization of make macros for the particular tool in question - src/Srcfiles ----- List of source files that are needed. - src/Mkdepends ---- Dependency generator program - - To build: - - cd - setenv INC_NETCDF - setenv LIB_NETCDF - gmake - - The process will create a file called "Depends" which has the dependencies - for the build of each file on other files. - - By default some codes may be compiled non-optimized - so that you can use the debugger, and with bounds-checking, and float trapping on. - To speed up do the following... - - gmake OPT=TRUE - - Also some of the tools allow for OpenMP shared memory parallelism - (such as mksurfdata) with - - gmake SMP=TRUE - - To run a program with a namelist: - - ./program < namelist - - To run a program built with SMP=TRUE: - - setenv OMP_NUM_THREADS= - - run normally as above - mksurfdata_esmf has a cime configure and CMake based build using the following files: gen_mksurfdata_build ---- Build mksurfdata_esmf diff --git a/tools/README.testing b/tools/README.testing deleted file mode 100644 index 9c386a3b26..0000000000 --- a/tools/README.testing +++ /dev/null @@ -1,58 +0,0 @@ -tools/README.testing May/23/2011 - -There is automated testing for all of the tools and scripts under this tools directory. -The tests are in the test/tools directory and are any of the scripts -that have "tools" in the name. There are several assumptions made in order for the -testing to work. - - -1.) Executable name is the same as the directory name - -The name of the executable program is the same as the directory name of the tool. - -2.) Build works the same for any Fortran tools - -The build for any Fortran tools should work the same way, with the same options -and required files for it. The files: Makefile, Mkdepends, Filepath and Srcfile -are expected to exist in the tool "src" sub-directory. To make maintaining these files easier -in general the Makefile and Mkdepends files should be kept identical other than -default settings for OPT and SMP and the output executable name. - -Options to the Makefile: - - LIB_NETCDF --- Library directory location of NetCDF. (defaults to /usr/local/lib) - INC_NETCDF --- Include directory location of NetCDF. (defaults to /usr/local/include) - MOD_NETCDF --- Module directory location of NetCDF. (defaults to $LIB_NETCDF) - USER_FC ------ Allow user to override the default Fortran compiler specified in Makefile. - USER_FCTYP --- Allow user to override the default type of Fortran compiler - (Linux and USER_FC=ftn only). - USER_CC ------ Allow user to override the default C compiler specified in Makefile - (Linux only). - USER_LINKER -- Allow user to override the default linker specified in Makefile. - SMP ---------- Shared memory Multi-processing (TRUE or FALSE) [default is FALSE] - OPT ---------- Use optimized options. (TRUE or FALSE) - -3.) Successful completion of the tool ends with "Successfully ..." - -After the tool completes it should have an unique string telling of the -successful completion of the file that is searchable in the log file starting -with "Successfully ". If this string isn't found in the log file, it -will be assumed by the test setup that the test failed. - -4.) NetCDF files are created or modified - -It is assumed that NetCDF files are created and/or modified by the process. And if -NetCDF files are NOT created -- something went wrong. For some scripts that copy files -to other locations this means an "-nomv" option needs to be invoked (and one provided) -so that it leaves the files created in the current directory. - -5.) Namelist examples exist .* namelist files - -To specify options for the running of the tool, sample namelist files -are provided or a sample run options file. These files can EITHER be in the -tool directory OR the ../../test/tools/nl_files directory. - -6.) Specific tests for run scripts - -For tools that have scripts to create namelists and run the tool for you, there -are customized tests to run these tools. diff --git a/tools/mkprocdata_map/README b/tools/mkprocdata_map/README deleted file mode 100644 index 92ffb4856c..0000000000 --- a/tools/mkprocdata_map/README +++ /dev/null @@ -1,151 +0,0 @@ -$CTSMROOT/tools/mkprocdata_map/clm/README Oct 30, 2012 - -This directory contains scripts for regridding CLM output from an -unstructured grid (1-d output using the lndgrid dimension) to a 2-d -(lat/lon) grid. The regridding method is area-conservative. - -The following steps provide a method to create the necessary inputs to -this script, produce an executable, and regrid output: - -In the following instructions, the "original" resolution is the -resolution of the run on an unstructured grid, and the "target" -resolution is the regular lat/lon resolution to which you will regrid -the output. - -(0) Install prerequisites: - - (a) If you do not already have a mapping file from the original - resolution to the target resolution, you will need the - ESMF_RegridWeightGen tool installed on your system. - - (b) The wrapper scripts describe below require the netCDF operators - (NCO). These nco tools (ncks, ncap2, etc.) must be in your path. - -(1) Determine the target resolution. This resolution must be a regular - lat/lon resolution. Generally, this should be a resolution close - to the resolution of the CLM run. For example, when running CLM at - ne30_np4 resolution, a good target resolution is 0.9x1.25 (i.e., - finite volume 1 degree: f09); when running CLM at ne120_np4 - resolution, a good target resolution is 0.23x0.31 (i.e., finitev - volume 1/4 degree: f02). - -(2) Perform a short CLM run at the target resolution, producing at - least one history file. After this run completes, set the - environment variable $TEMPLATE_FILE to point to one of the history - files created by this run. - -(3) Create a conservative mapping file from the original resolution to - the target resolution using the ESMF regrid weight generator. The - basic method for doing this is: - - $ESMF_PATH/bin/ESMF_RegridWeightGen -s $INGRID -d $OUTGRID -m conserve -w $MAP_FILE -i - - where $INGRID gives the path to a SCRIP grid file at the original - resolution, $OUTGRID gives the path to a SCRIP grid file at the - template resolution, and $MAP_FILE gives the name of the mapping - file that will be generated. - - However, you may want to wrap this in a job script to run it on - multiple processors (using mpirun), and you may have to set other - machine-specific environment variables. - -(4) Build the mkprocdata_map tool. From the current directory, do the - following: - - > cd src - > gmake - > cd .. - - By default code compiles optimized so it's reasonably fast. If you want - to use the debugger, with bounds-checking, and float trapping on do the - following: - gmake OPT=FALSE - See Also: See the components/clm/tools/README file for notes about setting - the path for NetCDF. - - This builds the mkprocdata_map executable. However, you generally - will not want to run this executable directly: instead, you should - use one of the wrapper scripts described below. - -(5) Do the regridding using one of the wrapper scripts in this - directory. To determine which script is most appropriate: Do you - need to regrid just one or a few output files, or most/all of the - output files in a directory? - - (a) If you are regridding just one or a few output files, you can - use mkprocdata_map_wrap. Its usage is: - - > mkprocdata_map_wrap -i input_file -o output_file -m $MAP_FILE -t $TEMPLATE_FILE - - where: - - input_file is the CLM history file you want to regrid - - output_file is the name of the regridded file that will be - created - - $MAP_FILE is the ESMF conservative mapping file created in - step (3) - - $TEMPLATE_FILE is a CLM history file at the target resolution, - created in step (2) - - You may also specify the '-l' option to this script. This option - determines whether to determine landfrac and related variables - by regridding the input file (when you don't give the '-l' - option), or by copying these variables from the template file - (when you give the '-l' option). These variables are important - for computing regional and global averages, e.g., as is done in - the land diagnostics package. Each method may be reasonable, - depending on the purposes of the regridding. For example, if you - want regional/global integrals to be as true as possible to the - original run, you should run withOUT the '-l' option; but if you - want to compare regional/global integrals between the original - run and a run at the target resolution, then you may want to run - WITH the '-l' option. - - Run 'mkprocdata_map_wrap -h' for full usage - - (b) If you need to regrid most or all of the output files in a - directory, you can use the convenience script - mkprocdata_map_all. This script runs mkprocdata_map_wrap on all - files matching a given pattern within a directory. Its basic - usage is the following, done from a directory containing many - CLM history files: - - > /path/to/mkprocdata_map_all -p $CASE -m $MAP_FILE -t $TEMPLATE_FILE - - where: - - $CASE is the case name of the original run (this -p argument - is actually more general: it provides the prefix of files on - which mkprocdata_map_wrap should be run; run - 'mkprocdata_map_all -h' for details) - - $MAP_FILE is the ESMF conservative mapping file created in - step (3) - - $TEMPLATE_FILE is a CLM history file at the target resolution, - created in step (2) - - There are a number of additional optional arguments to this - script, including the '-l' option described in (a), above. Run - 'mkprocdata_map_all -h' for full usage. - - ------------------------------------------------------------------------- -Some miscellaneous notes on the scripts contained here ------------------------------------------------------------------------- - -- area vs. area_regridded in the output of mkprocdata_map_wrap and - mkprocdata_map_all: The 'area' variable gives the actual grid cell - area on the destination grid. The 'area_regridded' variable is the - result of performing the regridding procedure on the 'area' variable - in the original source data. This seems to be the wrong way to - regrid areas (e.g., it leads to global totals that do not make - sense). However, area_regridded is left in the regridded files as a - diagnostic. BUT PLEASE USE CAUTION IF USING THIS AREA_REGRIDDED - VALUE, UNLESS YOU KNOW WHAT IT REALLY REPRESENTS! - -- At least as of this writing (Oct 29, 2012), there is insufficient - metadata on the CLM history files to regrid all variables - perfectly. In particular, note that many CLM history variables apply - only over a subset of the grid cell (e.g., over the non-lake portion - of the grid cell). Thus, to regrid these variables appropriately, we - would need to weight each grid cell's value by the portion of the - grid cell over which the field applies. However, doing this would - require metadata about each field that is not currently - available. diff --git a/tools/mkprocdata_map/README.filedescriptions b/tools/mkprocdata_map/README.filedescriptions deleted file mode 100644 index e657e7c7d9..0000000000 --- a/tools/mkprocdata_map/README.filedescriptions +++ /dev/null @@ -1,25 +0,0 @@ -$CTSMROOT/tools/mkprocdata_map/README.filedescriptions Erik Kluzek - 06/08/2018 - -mkprocdata_map_all ------------ Script to run over a list of files -mkprocdata_map_wrap ----------- Main script to actually use -mkprocdata_map_functions.bash - Bash shell functions to use in other scripts -README ------------------------ Description and how to run -src --------------------------- Directory with FORTRAN source code - -Also there are some sample files that can be used for testing under inputdata in - -$DIN_LOC_ROOT/lnd/clm2/test_mkprocdata_map - -See how this is done by looking at the file for testing mkprocdata_map: - -../../test/tools/nl_files/mkprocdata_ne30_to_f19_I2000 - -Which does something like the following: - -./mkprocdata_map_wrap \ --i $DIN_LOC_ROOT/lnd/clm2/test_mkprocdata_map/clm4054_ne30g16_I2000.clm2.h0.2000-01_c170430.nc \ --o ne30output_onf19grid.nc \ --m $DIN_LOC_ROOT/lnd/clm2/test_mkprocdata_map/map_ne30np4_nomask_to_fv1.9x2.5_nomask_aave_da_c121107.nc \ --t $DIN_LOC_ROOT/lnd/clm2/test_mkprocdata_map/clm4054_f19g16_I2000.clm2.h0.2000-01_c170430.nc - diff --git a/tools/mkprocdata_map/mkprocdata_map_all b/tools/mkprocdata_map/mkprocdata_map_all deleted file mode 100755 index 73e8abedf1..0000000000 --- a/tools/mkprocdata_map/mkprocdata_map_all +++ /dev/null @@ -1,202 +0,0 @@ -#!/bin/bash - -# This script runs mkprocdata_map_wrap on all files matching a given -# pattern within a directory. - -# Created by Bill Sacks, 5-26-11 - -# ---------------------------------------------------------------------- -# LOCAL FUNCTIONS DEFINED HERE -# ---------------------------------------------------------------------- - -function Usage { - script_name=`basename $0` - echo "Usage: $script_name -p prefix -m map_file -t template_file [-d] [-e executable-path] [-h] [-i] [-l] [-o output_suffix] [-r diRectory] [-s suffix]" - echo "" - echo "This script runs mkprocdata_map_wrap on all files matching a" - echo "given pattern within a directory." - echo "" - echo "'prefix' gives the prefix of the files on which" - echo "mkprocdata_map_wrap should be run; 'prefix' should NOT contain" - echo "wildcard characters. The prefix is also used to translate" - echo "from input to output file names (see examples below)" - echo "" - echo "'map_file' gives the name (and full path if not in the current" - echo "directory) of the mapping file" - echo "" - echo "'template_file' gives the name (and full path if not in the" - echo "current directory) of the template file, from which we read" - echo "lats, lons and some other variables" - echo "" - echo "The following are optional arguments:" - echo "" - echo "[-d]: Do a test (Dry run): do all error-checking on" - echo " arguments and print commands that would be run, but" - echo " don't actually run commands" - echo "" - echo "[-e executable-path]: Gives the path of the mkprocdata_map executable." - echo " If not specified, the path is determined by the" - echo " default value in mkprocdata_map_wrap." - echo "" - echo "[-h]: Print this help message and exit" - echo "" - echo "[-i]: Ignore (skip) existing output files; if this option is" - echo " not specified, then the script dies with an error if" - echo " any of the desired output files already exist" - echo "" - echo "[-l]: Option passed to mkprocdata_map_wrap: rather than computing" - echo " landfrac and related variables by regridding the input file," - echo " instead copy these variables directly from the template file." - echo "" - echo "[-o output_suffix]: suffix to append to the end of the prefix" - echo " on the output files" - echo " If not specified, '_2d' is used" - echo "" - echo "[-r diRectory]: Do the processing in the given directory." - echo " If not specified, processing is done in the" - echo " current working directory." - echo "" - echo "[-s suffix]: Run mkprocdata_map_wrap on all files matching the" - echo " pattern '\${prefix}\${suffix}'. The suffix can -" - echo " and often will - contain wildcards; but" - echo " remember to enclose 'suffix' in quotes to" - echo " prevent shell expansion." - echo " If not specified, run mkprocdata_map_wrap on all" - echo " files matching '\${prefix}*'" - echo "" - echo "" - echo "Example: $script_name -p Ib14_ne30np4_gx1v6 -m map_ne30np4_to_fv1.9x2.5_aave_da_091230.nc -t Ib19_1.9x2.5_gx1v6.clm2.h0.0001-01.nc" - echo "This will run mkprocdata_map_wrap on all files whose names begin" - echo "with 'Ib14_ne30np4_gx1v6' in the current directory, using the" - echo "mapping file named 'map_ne30np4_to_fv1.9x2.5_aave_da_091230.nc'" - echo "and the template file named 'Ib19_1.9x2.5_gx1v6.clm2.h0.0001-01.nc'" - echo "For an input file named:" - echo " Ib14_ne30np4_gx1v6.clm2.h0.0001-01-06-00000.nc" - echo "The output file will be named:" - echo " Ib14_ne30np4_gx1v6_2d.clm2.h0.0001-01-06-00000.nc" - echo "" - echo "Example: $script_name -o '_remap' -s '*.h0.0001*.nc' -p Ib14_ne30np4_gx1v6 -m map_ne30np4_to_fv1.9x2.5_aave_da_091230.nc -t Ib19_1.9x2.5_gx1v6.clm2.h0.0001-01.nc" - echo "This will run mkprocdata_map_wrap on all files whose names match" - echo "the pattern 'Ib14_ne30np4_gx1v6*.h0.0001*.nc', in the" - echo "current directory, using the mapping file named" - echo "'map_ne30np4_to_fv1.9x2.5_aave_da_091230.nc' and the" - echo "template file named Ib19_1.9x2.5_gx1v6.clm2.h0.0001-01.nc" - echo "For an input file named:" - echo " Ib14_ne30np4_gx1v6.clm2.h0.0001-01-06-00000.nc" - echo "The output file will be named:" - echo " Ib14_ne30np4_gx1v6_remap.clm2.h0.0001-01-06-00000.nc" - echo "" -} - -# ---------------------------------------------------------------------- -# BEGIN MAIN SCRIPT -# ---------------------------------------------------------------------- - -script_dir=`dirname $0` -source $script_dir/mkprocdata_map_functions.bash - -# ---------------------------------------------------------------------- -# Handle command-line arguments -# ---------------------------------------------------------------------- - -# define default values: -# required arguments: -prefix="" -map_file="" -template_file="" -# optional arguments: -directory="." -ignore_existing=0 -output_suffix="_2d" -suffix="*" -dryrun=0 -extra_args="" - -while getopts de:hilm:o:p:r:s:t: opt; do - case $opt in - d) dryrun=1;; - e) extra_args="$extra_args -e $OPTARG";; - h) Usage; exit;; - i) ignore_existing=1;; - l) extra_args="$extra_args -l";; - m) map_file=$OPTARG;; - o) output_suffix=$OPTARG;; - p) prefix=$OPTARG;; - r) directory=$OPTARG;; - s) suffix=$OPTARG;; - t) template_file=$OPTARG;; - \?) Usage; exit 1 - esac -done - -# ---------------------------------------------------------------------- -# Error checking on arguments -# ---------------------------------------------------------------------- - -if [ -z "$prefix" ]; then - echo "Must specify a prefix" - Usage - exit 1 -fi - -check_file_arg "$map_file" "map" -check_file_arg "$template_file" "template" - -# Make sure directory is really a directory -if [ ! -d $directory ]; then - echo "ERROR: $directory is not a directory" - echo "" - Usage - exit 1 -fi - - -# ---------------------------------------------------------------------- -# Change to desired directory -# ---------------------------------------------------------------------- - -olddir=`pwd` -cd $directory - -# ---------------------------------------------------------------------- -# Get list of files matching the given pattern; make sure there really -# are some matching files -# ---------------------------------------------------------------------- - -files=`ls ${prefix}${suffix}` -if [ $? -ne 0 ]; then - echo "ERROR trying to find files matching: ${prefix}${suffix}" - echo "" - Usage - exit 1 -fi - -# ---------------------------------------------------------------------- -# Loop through files matching the given pattern; run mkprocdata_map_wrap for each -# ---------------------------------------------------------------------- - -for infile in $files; do - outfile=${infile/$prefix/${prefix}${output_suffix}} - if [ -e $outfile ]; then - if [ $ignore_existing -eq 0 ]; then - echo "" - echo "ERROR: output file $outfile already exists" - exit 1 - else - echo "" - echo "WARNING: output file $outfile already exists: skipping" - echo "" - fi - - else # outfile does not exist - echo "" - do_cmd "${script_dir}/mkprocdata_map_wrap -i $infile -o $outfile -m $map_file -t $template_file $extra_args" $dryrun - fi -done - -# ---------------------------------------------------------------------- -# Clean up -# ---------------------------------------------------------------------- - -cd $olddir - diff --git a/tools/mkprocdata_map/mkprocdata_map_functions.bash b/tools/mkprocdata_map/mkprocdata_map_functions.bash deleted file mode 100644 index bbc359fb89..0000000000 --- a/tools/mkprocdata_map/mkprocdata_map_functions.bash +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -# This file contains functions used by other bash scripts in this directory. - -# This function echoes the command given by $1 (cmd), then executes it. -# However, if $2 (dryrun) is non-zero, then it only does the echo, not the execution. -# Usage: do_cmd cmd dryrun -# Returns 0 on success, non-zero on failure; if there is an error, the error string is echoed. -function do_cmd { - if [[ $# -ne 2 ]]; then - echo "ERROR in do_cmd: wrong number of arguments: expected 2, received $#" - exit 1 - fi - - local cmd=$1 - local dryrun=$2 - - echo $cmd - if [ $dryrun -eq 0 ]; then - # We use 'eval $cmd' rather than just '$cmd', because the - # latter doesn't work right if the command contains any quoted - # strings (e.g., svn ci -m "this is my message") - eval $cmd - if [ $? -ne 0 ]; then - echo "ERROR in do_cmd: error executing command" - exit 2 - fi - fi - - return 0 -} - -# make sure that the given file name argument was provided, and that -# the file exists; exit the script with a usage message if either of -# these is not true -# -# Usage: check_file_arg filename_arg description -# (description is echoed if there is an error) -# Example: check_file_arg "$input_file" "input" -# (note that $input_file must be in quotes) -function check_file_arg { - local filename=$1 - local description=$2 - - if [ -z "$filename" ]; then - echo "ERROR: Must specify $description file" - Usage - exit 1 - fi - - if [ ! -f $filename ]; then - echo "ERROR: Can't find $description file: $filename" - Usage - exit 1 - fi -} - diff --git a/tools/mkprocdata_map/mkprocdata_map_wrap b/tools/mkprocdata_map/mkprocdata_map_wrap deleted file mode 100755 index 4744b0eacc..0000000000 --- a/tools/mkprocdata_map/mkprocdata_map_wrap +++ /dev/null @@ -1,250 +0,0 @@ -#!/bin/bash - -# This script is a wrapper around mkprocdata_map that runs that -# program and then copies some additional variables from the template -# file to the output file. It also does some additional pre and -# post-processing in order to create some additional variables. - -# Created by Bill Sacks, 5-25-11 - -# ---------------------------------------------------------------------- -# SET PARAMETERS HERE -# ---------------------------------------------------------------------- - -# comma-delimited list of extra variables to copy directly from -# template file; note that these variables should not be written out -# by mkprocdata_map (i.e., everything in this list should be listed in -# the 'ignore_var' function in mkprocdata_map.F90); however, there may -# be some variables in the 'ignore_var' function that are not listed -# here - e.g., variables that we treat specially. -copy_vars="lon,lat" - -# comma-delimited list of extra variables to copy from the template -# file if the -l option is specified -- this option says to copy -# landfrac and related variables. Note that some of these variables -# may be written out by mkprocdata_map, in which case they will be -# overwritten afterwards (slighly less efficient, but that keeps -# things simpler). -landfrac_copy_vars="landfrac,landmask,pftmask" - -# name of the executable; -# expected to be in the same directory as this script unless -e option is given -executable="mkprocdata_map" - -# minimum value for regridded pftmask variable for the output variable to be 1 -pftmask_min="1.e-6" - -# fill value for landmask -landmask_fill=-9999 - -# ---------------------------------------------------------------------- -# LOCAL FUNCTIONS DEFINED HERE -# ---------------------------------------------------------------------- - -function Usage { - script_name=`basename $0` - echo "Usage: $script_name -i input_file -o output_file -m map_file -t template_file [-e executable-path] [-h] [-l]" - echo "" - echo "This script runs mkprocdata_map with the given arguments (-i, -o, -m and -t)," - echo "then copies some additional variables from the template file" - echo "to the output file. It also does some additional pre and" - echo "post-processing in order to create some additional variables." - echo "" - echo "Additional optional arguments:" - echo "" - echo "[-e executable-path]: Gives the path of the mkprocdata_map executable." - echo " If not specified, the executable is assumed to be" - echo " in the same directory as this script." - echo "" - echo "[-h]: Print this help message and exit" - echo "" - echo "[-l]: Rather than computing landfrac and related variables" - echo "by regridding the input file, instead copy these variables" - echo "directly from the template file. The variables this pertains" - echo "to are:" - echo $landfrac_copy_vars -} - -# This function operates on a single variable in a file, changing all -# places where that variable is missing to some new (non-missing) -# value. The _FillValue attribute remains unchanged. -# Usage: change_missing_to_value varname newval infile outfile -# - varname: the name of the variable to change -# - newval: all instances of the missing value will be replaced with -# this new value -# - infile: input file name -# - outfile: output file name (can be the same as infile) -function change_missing_to_value { - if [[ $# -ne 4 ]]; then - echo "ERROR in change_missing_to_value: wrong number of arguments: expected 2, received $#" - exit 1 - fi - - varname=$1 - newval=$2 - infile=$3 - outfile=$4 - - varname_tmp=${varname}_tmp_$$ - - cat > cmds.nco.tmp.$$ <= $pftmask_min)' $output_file $output_file" 0 - do_cmd "ncks -O -x -v pftmask_float $output_file $output_file" 0 - - # --- Calculate landmask from landfrac --- - echo "" - - cat > cmds.nco.tmp.$$ < 0); -landmask_float.change_miss($landmask_fill); -landmask=int(landmask_float); -EOF - - do_cmd "ncap2 -O -S cmds.nco.tmp.$$ $output_file $output_file" 0 - rm cmds.nco.tmp.$$ - - change_missing_to_value landmask 0 $output_file $output_file - - # in the following, note that we need to manually set missing_value, because it doesn't get changed through the .set_miss call in nco: - do_cmd "ncatted -a long_name,landmask,o,c,'land/ocean mask (0.=ocean and 1.=land)' -a missing_value,landmask,o,i,$landmask_fill $output_file" 0 -fi - -echo "Successfully regridded data" diff --git a/tools/mkprocdata_map/src/Filepath b/tools/mkprocdata_map/src/Filepath deleted file mode 100644 index 9c558e357c..0000000000 --- a/tools/mkprocdata_map/src/Filepath +++ /dev/null @@ -1 +0,0 @@ -. diff --git a/tools/mkprocdata_map/src/Makefile b/tools/mkprocdata_map/src/Makefile deleted file mode 100644 index 42f797b3c2..0000000000 --- a/tools/mkprocdata_map/src/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# Makefile for mkprocdata_map - -EXENAME = ../mkprocdata_map - -# Set optimization on by default -ifeq ($(OPT),$(null)) - OPT := TRUE -endif - -include Makefile.common diff --git a/tools/mkprocdata_map/src/Makefile.common b/tools/mkprocdata_map/src/Makefile.common deleted file mode 100644 index ab79f94144..0000000000 --- a/tools/mkprocdata_map/src/Makefile.common +++ /dev/null @@ -1,360 +0,0 @@ -#----------------------------------------------------------------------- -# This Makefile is for building clm tools on AIX, Linux (with pgf90 or -# lf95 compiler), Darwin or IRIX platforms. -# -# These macros can be changed by setting environment variables: -# -# LIB_NETCDF --- Library directory location of netcdf. (defaults to /usr/local/lib) -# INC_NETCDF --- Include directory location of netcdf. (defaults to /usr/local/include) -# MOD_NETCDF --- Module directory location of netcdf. (defaults to $LIB_NETCDF) -# USER_FC ------ Allow user to override the default Fortran compiler specified in Makefile. -# USER_FCTYP --- Allow user to override the default type of Fortran compiler (linux and USER_FC=ftn only). -# USER_CC ------ Allow user to override the default C compiler specified in Makefile (linux only). -# USER_LINKER -- Allow user to override the default linker specified in Makefile. -# USER_CPPDEFS - Additional CPP defines. -# USER_CFLAGS -- Additional C compiler flags that the user wishes to set. -# USER_FFLAGS -- Additional Fortran compiler flags that the user wishes to set. -# USER_LDLAGS -- Additional load flags that the user wishes to set. -# SMP ---------- Shared memory Multi-processing (TRUE or FALSE) [default is FALSE] -# OPT ---------- Use optimized options. -# -#------------------------------------------------------------------------ - -# Set up special characters -null := - -# Newer makes set the CURDIR variable. -CURDIR := $(shell pwd) - -RM = rm - -# Check for the netcdf library and include directories -ifeq ($(LIB_NETCDF),$(null)) - LIB_NETCDF := /usr/local/lib -endif - -ifeq ($(INC_NETCDF),$(null)) - INC_NETCDF := /usr/local/include -endif - -ifeq ($(MOD_NETCDF),$(null)) - MOD_NETCDF := $(LIB_NETCDF) -endif - -# Set user specified Fortran compiler -ifneq ($(USER_FC),$(null)) - FC := $(USER_FC) -endif - -# Set user specified C compiler -ifneq ($(USER_CC),$(null)) - CC := $(USER_CC) -endif - -# Set if Shared memory multi-processing will be used -ifeq ($(SMP),$(null)) - SMP := FALSE -endif - -CPPDEF := $(USER_CPPDEFS) - -# Set optimization on by default -ifeq ($(OPT),$(null)) - OPT := TRUE -endif - -ifeq ($(OPT),TRUE) - CPPDEF := -DOPT -endif - -# Determine platform -UNAMES := $(shell uname -s) - -# Load dependency search path. -dirs := . $(shell cat Filepath) - -# Set cpp search path, include netcdf -cpp_dirs := $(dirs) $(INC_NETCDF) $(MOD_NETCDF) -cpp_path := $(foreach dir,$(cpp_dirs),-I$(dir)) # format for command line - -# Expand any tildes in directory names. Change spaces to colons. -# (the vpath itself is set elsewhere, based on this variable) -vpath_dirs := $(foreach dir,$(cpp_dirs),$(wildcard $(dir))) -vpath_dirs := $(subst $(space),:,$(vpath_dirs)) - -#Primary Target: build the tool -all: $(EXENAME) - -# Get list of files and build dependency file for all .o files -# using perl scripts mkSrcfiles and mkDepends - -SOURCES := $(shell cat Srcfiles) - -OBJS := $(addsuffix .o, $(basename $(SOURCES))) - -# Set path to Mkdepends script; assumes that any Makefile including -# this file is in a sibling of the src directory, in which Mkdepends -# resides -Mkdepends := ../src/Mkdepends - -$(CURDIR)/Depends: $(CURDIR)/Srcfiles $(CURDIR)/Filepath - $(Mkdepends) Filepath Srcfiles > $@ - - -# Architecture-specific flags and rules -#------------------------------------------------------------------------ -# AIX -#------------------------------------------------------------------------ - -ifeq ($(UNAMES),AIX) -CPPDEF += -DAIX -cpre = $(null)-WF,-D$(null) -FPPFLAGS := $(patsubst -D%,$(cpre)%,$(CPPDEF)) -FFLAGS = -c -I$(INC_NETCDF) -q64 -qsuffix=f=f90 -qsuffix=f=f90:cpp=F90 \ - $(FPPFLAGS) -g -qfullpath -qarch=auto -qtune=auto -qsigtrap=xl__trcedump -qsclk=micro - -LDFLAGS = -L$(LIB_NETCDF) -q64 -lnetcdff -lnetcdf -ifneq ($(OPT),TRUE) - FFLAGS += -qinitauto=7FF7FFFF -qflttrap=ov:zero:inv:en -qspillsize=4000 -C -else - FFLAGS += -O2 -qmaxmem=-1 -Q - LDFLAGS += -Q -endif -CFLAGS := -q64 -g $(CPPDEF) -O2 -FFLAGS += $(cpp_path) -CFLAGS += $(cpp_path) - -ifeq ($(SMP),TRUE) - FC = xlf90_r - FFLAGS += -qsmp=omp - LDFLAGS += -qsmp=omp -else - FC = xlf90 -endif - -endif - -#------------------------------------------------------------------------ -# Darwin -#------------------------------------------------------------------------ - -ifeq ($(UNAMES),Darwin) - -# Set the default Fortran compiler -ifeq ($(USER_FC),$(null)) - FC := g95 -endif -ifeq ($(USER_CC),$(null)) - CC := gcc -endif - -CFLAGS := -g -O2 -CPPDEF += -DSYSDARWIN -DDarwin -DLINUX -LDFLAGS := - -ifeq ($(FC),g95) - - CPPDEF += -DG95 - FFLAGS := -c -fno-second-underscore $(CPPDEF) $(cpp_path) -I$(MOD_NETCDF) - ifeq ($(OPT),TRUE) - FFLAGS += -O2 - else - FFLAGS += -g -fbounds-check - endif - -endif - -ifeq ($(FC),gfortran) - - CPPDEF += -DG95 - FFLAGS := -c -fno-second-underscore $(CPPDEF) $(cpp_path) -I$(MOD_NETCDF) \ - -fno-range-check - ifeq ($(OPT),TRUE) - FFLAGS += -O2 - else - FFLAGS += -g -fbounds-check - endif - -endif - -ifeq ($(FC),ifort) - - CPPDEF += -DFORTRANUNDERSCORE - FFLAGS += -c -ftz -g -fp-model precise $(CPPDEF) $(cpp_path) \ - -convert big_endian -assume byterecl -traceback -FR - LDFLAGS += -m64 - - ifneq ($(OPT),TRUE) - FFLAGS += -CB -O0 - else - FFLAGS += -O2 - endif - ifeq ($(SMP),TRUE) - FFLAGS += -qopenmp - LDFLAGS += -qopenmp - endif -endif - -ifeq ($(FC),pgf90) - - CPPDEF += -DFORTRANUNDERSCORE - FFLAGS += -c $(CPPDEF) $(cpp_path) - ifneq ($(OPT),TRUE) - FFLAGS += -g -Ktrap=fp -Mbounds -Kieee - else - FFLAGS += -fast -Kieee - endif - - ifeq ($(SMP),TRUE) - FFLAGS += -mp - LDFLAGS += -mp - endif - -endif - -ifeq ($(CC),icc) - CFLAGS += -m64 -g - ifeq ($(SMP),TRUE) - CFLAGS += -qopenmp - endif -endif -ifeq ($(CC),pgcc) - CFLAGS += -g -fast -endif - -CFLAGS += $(CPPDEF) $(cpp_path) -LDFLAGS += -L$(LIB_NETCDF) -lnetcdf -lnetcdff - -endif - -#------------------------------------------------------------------------ -# Linux -#------------------------------------------------------------------------ - -ifeq ($(UNAMES),Linux) - ifeq ($(USER_FC),$(null)) - FC := ifort - FCTYP := ifort - else - ifeq ($(USER_FC),ftn) - ifneq ($(USER_FCTYP),$(null)) - FCTYP := $(USER_FCTYP) - else - FCTYP := pgf90 - endif - else - FCTYP := $(USER_FC) - endif - endif - CPPDEF += -DLINUX -DFORTRANUNDERSCORE - CFLAGS := $(CPPDEF) - LDFLAGS := $(shell $(LIB_NETCDF)/../bin/nf-config --flibs) - FFLAGS = - - ifeq ($(FCTYP),pgf90) - CC := pgcc - ifneq ($(OPT),TRUE) - FFLAGS += -g -Ktrap=fp -Mbounds -Kieee - else - FFLAGS += -fast -Kieee - CFLAGS += -fast - endif - - ifeq ($(SMP),TRUE) - FFLAGS += -mp - LDFLAGS += -mp - endif - - endif - - ifeq ($(FCTYP),lf95) - ifneq ($(OPT),TRUE) - FFLAGS += -g --chk a,e,s,u -O0 - else - FFLAGS += -O - endif - # Threading only works by putting thread memory on the heap rather than the stack - # (--threadheap). - # As of lf95 version 6.2 the thread stacksize limits are (still) too small to run - # even small - # resolution problems (FV at 10x15 res fails). - ifeq ($(SMP),TRUE) - FFLAGS += --openmp --threadheap 4096 - LDFLAGS += --openmp --threadheap 4096 - endif - endif - ifeq ($(FCTYP),pathf90) - FFLAGS += -extend_source -ftpp -fno-second-underscore - ifneq ($(OPT),TRUE) - FFLAGS += -g -O0 - else - FFLAGS += -O - endif - ifeq ($(SMP),TRUE) - FFLAGS += -mp - LDFLAGS += -mp - endif - endif - ifeq ($(FCTYP),ifort) - - FFLAGS += -ftz -g -fp-model precise -convert big_endian -assume byterecl -traceback -FR - CFLAGS += -m64 -g - LDFLAGS += -m64 - - ifneq ($(OPT),TRUE) - FFLAGS += -CB -O0 - else - FFLAGS += -O2 - endif - ifeq ($(SMP),TRUE) - FFLAGS += -qopenmp - CFLAGS += -qopenmp - LDFLAGS += -qopenmp - endif - endif - FFLAGS += -c -I$(INC_NETCDF) $(CPPDEF) $(cpp_path) - CFLAGS += $(cpp_path) -endif - -#------------------------------------------------------------------------ -# Default rules and macros -#------------------------------------------------------------------------ - -.SUFFIXES: -.SUFFIXES: .F90 .c .o - -# Set the vpath for all file types EXCEPT .o -# We do this for individual file types rather than generally using -# VPATH, because for .o files, we don't want to use files from a -# different build (e.g., in building the unit tester, we don't want to -# use .o files from the main build) -vpath %.F90 $(vpath_dirs) -vpath %.c $(vpath_dirs) -vpath %.h $(vpath_dirs) - -# Append user defined compiler and load flags to Makefile defaults -CFLAGS += $(USER_CFLAGS) -FFLAGS += $(USER_FFLAGS) -LDFLAGS += $(USER_LDFLAGS) - -# Set user specified linker -ifneq ($(USER_LINKER),$(null)) - LINKER := $(USER_LINKER) -else - LINKER := $(FC) -endif - -.F90.o: - $(FC) $(FFLAGS) $< - -.c.o: - $(CC) -c $(CFLAGS) $< - - -$(EXENAME): $(OBJS) - $(LINKER) -o $@ $(OBJS) $(LDFLAGS) - -clean: - $(RM) -f $(OBJS) *.mod Depends - -include $(CURDIR)/Depends diff --git a/tools/mkprocdata_map/src/Mkdepends b/tools/mkprocdata_map/src/Mkdepends deleted file mode 100755 index a75e8fdde0..0000000000 --- a/tools/mkprocdata_map/src/Mkdepends +++ /dev/null @@ -1,327 +0,0 @@ -#!/usr/bin/env perl - -# Generate dependencies in a form suitable for inclusion into a Makefile. -# The source filenames are provided in a file, one per line. Directories -# to be searched for the source files and for their dependencies are provided -# in another file, one per line. Output is written to STDOUT. -# -# For CPP type dependencies (lines beginning with #include) the dependency -# search is recursive. Only dependencies that are found in the specified -# directories are included. So, for example, the standard include file -# stdio.h would not be included as a dependency unless /usr/include were -# one of the specified directories to be searched. -# -# For Fortran module USE dependencies (lines beginning with a case -# insensitive "USE", possibly preceded by whitespace) the Fortran compiler -# must be able to access the .mod file associated with the .o file that -# contains the module. In order to correctly generate these dependencies -# two restrictions must be observed. -# 1) All modules must be contained in files that have the same base name as -# the module, in a case insensitive sense. This restriction implies that -# there can only be one module per file. -# 2) All modules that are to be contained in the dependency list must be -# contained in one of the source files in the list provided on the command -# line. -# The reason for the second restriction is that since the makefile doesn't -# contain rules to build .mod files the dependency takes the form of the .o -# file that contains the module. If a module is being used for which the -# source code is not available (e.g., a module from a library), then adding -# a .o dependency for that module is a mistake because make will attempt to -# build that .o file, and will fail if the source code is not available. -# -# Author: B. Eaton -# Climate Modelling Section, NCAR -# Feb 2001 - -use Getopt::Std; -use File::Basename; - -# Check for usage request. -@ARGV >= 2 or usage(); - -# Process command line. -my %opt = (); -getopts( "t:w", \%opt ) or usage(); -my $filepath_arg = shift() or usage(); -my $srcfile_arg = shift() or usage(); -@ARGV == 0 or usage(); # Check that all args were processed. - -my $obj_dir; -if ( defined $opt{'t'} ) { $obj_dir = $opt{'t'}; } - -open(FILEPATH, $filepath_arg) or die "Can't open $filepath_arg: $!\n"; -open(SRCFILES, $srcfile_arg) or die "Can't open $srcfile_arg: $!\n"; - -# Make list of paths to use when looking for files. -# Prepend "." so search starts in current directory. This default is for -# consistency with the way GNU Make searches for dependencies. -my @file_paths = ; -close(FILEPATH); -chomp @file_paths; -unshift(@file_paths,'.'); -foreach $dir (@file_paths) { # (could check that directories exist here) - $dir =~ s!/?\s*$!!; # remove / and any whitespace at end of directory name - ($dir) = glob $dir; # Expand tildes in path names. -} - -# Make list of files containing source code. -my @src = ; -close(SRCFILES); -chomp @src; - -# For each file that may contain a Fortran module (*.[fF]90 *.[fF]) convert the -# file's basename to uppercase and use it as a hash key whose value is the file's -# basename. This allows fast identification of the files that contain modules. -# The only restriction is that the file's basename and the module name must match -# in a case insensitive way. -my %module_files = (); -my ($f, $name, $path, $suffix, $mod); -my @suffixes = ('\.[fF]90', '\.[fF]' ); -foreach $f (@src) { - ($name, $path, $suffix) = fileparse($f, @suffixes); - ($mod = $name) =~ tr/a-z/A-Z/; - $module_files{$mod} = $name; -} - -# Now make a list of .mod files in the file_paths. If a .o source dependency -# can't be found based on the module_files list above, then maybe a .mod -# module dependency can if the mod file is visible. -my %trumod_files = (); -my ($dir); -my ($f, $name, $path, $suffix, $mod); -my @suffixes = ('\.mod' ); -foreach $dir (@file_paths) { - @filenames = (glob("$dir/*.mod")); - foreach $f (@filenames) { - ($name, $path, $suffix) = fileparse($f, @suffixes); - ($mod = $name) =~ tr/a-z/A-Z/; - $trumod_files{$mod} = $name; - } -} - -#print STDERR "\%module_files\n"; -#while ( ($k,$v) = each %module_files ) { -# print STDERR "$k => $v\n"; -#} - -# Find module and include dependencies of the source files. -my ($file_path, $rmods, $rincs); -my %file_modules = (); -my %file_includes = (); -my @check_includes = (); -foreach $f ( @src ) { - - # Find the file in the seach path (@file_paths). - unless ($file_path = find_file($f)) { - if (defined $opt{'w'}) {print STDERR "$f not found\n";} - next; - } - - # Find the module and include dependencies. - ($rmods, $rincs) = find_dependencies( $file_path ); - - # Remove redundancies (a file can contain multiple procedures that have - # the same dependencies). - $file_modules{$f} = rm_duplicates($rmods); - $file_includes{$f} = rm_duplicates($rincs); - - # Make a list of all include files. - push @check_includes, @{$file_includes{$f}}; -} - -#print STDERR "\%file_modules\n"; -#while ( ($k,$v) = each %file_modules ) { -# print STDERR "$k => @$v\n"; -#} -#print STDERR "\%file_includes\n"; -#while ( ($k,$v) = each %file_includes ) { -# print STDERR "$k => @$v\n"; -#} -#print STDERR "\@check_includes\n"; -#print STDERR "@check_includes\n"; - -# Find include file dependencies. -my %include_depends = (); -while (@check_includes) { - $f = shift @check_includes; - if (defined($include_depends{$f})) { next; } - - # Mark files not in path so they can be removed from the dependency list. - unless ($file_path = find_file($f)) { - $include_depends{$f} = -1; - next; - } - - # Find include file dependencies. - ($rmods, $include_depends{$f}) = find_dependencies($file_path); - - # Add included include files to the back of the check_includes list so - # that their dependencies can be found. - push @check_includes, @{$include_depends{$f}}; - - # Add included modules to the include_depends list. - if ( @$rmods ) { push @{$include_depends{$f}}, @$rmods; } -} - -#print STDERR "\%include_depends\n"; -#while ( ($k,$v) = each %include_depends ) { -# print STDERR (ref $v ? "$k => @$v\n" : "$k => $v\n"); -#} - -# Remove include file dependencies that are not in the Filepath. -my $i, $ii; -foreach $f (keys %include_depends) { - - unless (ref $include_depends{$f}) { next; } - $rincs = $include_depends{$f}; - unless (@$rincs) { next; } - $ii = 0; - $num_incs = @$rincs; - for ($i = 0; $i < $num_incs; ++$i) { - if ($include_depends{$$rincs[$ii]} == -1) { - splice @$rincs, $ii, 1; - next; - } - ++$ii; - } -} - -# Substitute the include file dependencies into the %file_includes lists. -foreach $f (keys %file_includes) { - my @expand_incs = (); - - # Initialize the expanded %file_includes list. - my $i; - unless (@{$file_includes{$f}}) { next; } - foreach $i (@{$file_includes{$f}}) { - push @expand_incs, $i unless ($include_depends{$i} == -1); - } - unless (@expand_incs) { - $file_includes{$f} = []; - next; - } - - # Expand - for ($i = 0; $i <= $#expand_incs; ++$i) { - push @expand_incs, @{ $include_depends{$expand_incs[$i]} }; - } - - $file_includes{$f} = rm_duplicates(\@expand_incs); -} - -#print STDERR "expanded \%file_includes\n"; -#while ( ($k,$v) = each %file_includes ) { -# print STDERR "$k => @$v\n"; -#} - -# Print dependencies to STDOUT. -foreach $f (sort keys %file_modules) { - $f =~ /(.+)\./; - $target = "$1.o"; - if ( defined $opt{'t'} ) { $target = "$opt{'t'}/$1.o"; } - print "$target : $f @{$file_modules{$f}} @{$file_includes{$f}}\n"; -} - -#-------------------------------------------------------------------------------------- - -sub find_dependencies { - - # Find dependencies of input file. - # Use'd Fortran 90 modules are returned in \@mods. - # Files that are "#include"d by the cpp preprocessor are returned in \@incs. - - my( $file ) = @_; - my( @mods, @incs ); - - open(FH, $file) or die "Can't open $file: $!\n"; - - while ( ) { - # Search for "#include" and strip filename when found. - if ( /^#include\s+[<"](.*)[>"]/ ) { - push @incs, $1; - } - # Search for Fortran include dependencies. - elsif ( /^\s*include\s+['"](.*)['"]/ ) { #" for emacs fontlock - push @incs, $1; - } - # Search for module dependencies. - elsif ( /^\s*USE\s+(\w+)/i ) { - ($module = $1) =~ tr/a-z/A-Z/; - # Return dependency in the form of a .o version of the file that contains - # the module. this is from the source list. - if ( defined $module_files{$module} ) { - if ( defined $obj_dir ) { - push @mods, "$obj_dir/$module_files{$module}.o"; - } else { - push @mods, "$module_files{$module}.o"; - } - } - # Return dependency in the form of a .mod version of the file that contains - # the module. this is from the .mod list. only if .o version not found - elsif ( defined $trumod_files{$module} ) { - if ( defined $obj_dir ) { - push @mods, "$obj_dir/$trumod_files{$module}.mod"; - } else { - push @mods, "$trumod_files{$module}.mod"; - } - } - } - } - close( FH ); - return (\@mods, \@incs); -} - -#-------------------------------------------------------------------------------------- - -sub find_file { - -# Search for the specified file in the list of directories in the global -# array @file_paths. Return the first occurance found, or the null string if -# the file is not found. - - my($file) = @_; - my($dir, $fname); - - foreach $dir (@file_paths) { - $fname = "$dir/$file"; - if ( -f $fname ) { return $fname; } - } - return ''; # file not found -} - -#-------------------------------------------------------------------------------------- - -sub rm_duplicates { - -# Return a list with duplicates removed. - - my ($in) = @_; # input arrary reference - my @out = (); - my $i; - my %h = (); - foreach $i (@$in) { - $h{$i} = ''; - } - @out = keys %h; - return \@out; -} - -#-------------------------------------------------------------------------------------- - -sub usage { - ($ProgName = $0) =~ s!.*/!!; # name of program - die < shr_kind_r8 - implicit none - save - - real(R8),parameter :: SHR_CONST_REARTH = 6.37122e6_R8 ! radius of earth ~ m - real(r8),parameter :: re_km = SHR_CONST_REARTH*0.001 ! radius of earth (km) - -end module constMod diff --git a/tools/mkprocdata_map/src/fileutils.F90 b/tools/mkprocdata_map/src/fileutils.F90 deleted file mode 100644 index e1f8e633da..0000000000 --- a/tools/mkprocdata_map/src/fileutils.F90 +++ /dev/null @@ -1,282 +0,0 @@ -module fileutils - -!----------------------------------------------------------------------- -!BOP -! -! !MODULE: fileutils -! -! !DESCRIPTION: -! Module containing file I/O utilities -! -! !USES: -! -! !PUBLIC TYPES: - implicit none - save -! -! !PUBLIC MEMBER FUNCTIONS: - public :: get_filename !Returns filename given full pathname - public :: opnfil !Open local unformatted or formatted file - public :: getfil !Obtain local copy of file - public :: relavu !Close and release Fortran unit no longer in use - public :: getavu !Get next available Fortran unit number -! -! !REVISION HISTORY: -! Created by Mariana Vertenstein -! -! -! !PRIVATE MEMBER FUNCTIONS: None -!EOP -!----------------------------------------------------------------------- - -contains - -!----------------------------------------------------------------------- -!BOP -! -! !IROUTINE: get_filename -! -! !INTERFACE: - character(len=256) function get_filename (fulpath) -! -! !DESCRIPTION: -! Returns filename given full pathname -! -! !ARGUMENTS: - implicit none - character(len=*), intent(in) :: fulpath !full pathname -! -! !REVISION HISTORY: -! Created by Mariana Vertenstein -! -! -! !LOCAL VARIABLES: -!EOP - integer i !loop index - integer klen !length of fulpath character string -!------------------------------------------------------------------------ - - klen = len_trim(fulpath) - do i = klen, 1, -1 - if (fulpath(i:i) == '/') go to 10 - end do - i = 0 -10 get_filename = fulpath(i+1:klen) - - end function get_filename - -!------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: set_filename -! -! !INTERFACE: - character(len=256) function set_filename (rem_dir, loc_fn) -! -! !DESCRIPTION: -! -! !ARGUMENTS: -! - implicit none - character(len=*), intent(in) :: rem_dir !remote directory - character(len=*), intent(in) :: loc_fn !local full path filename -! -! !REVISION HISTORY: -! Created by Mariana Vertenstein -! -! -! !LOCAL VARIABLES: -!EOP - integer :: i !integer -!------------------------------------------------------------------------ - - set_filename = ' ' - do i = len_trim(loc_fn), 1, -1 - if (loc_fn(i:i)=='/') go to 10 - end do - i = 0 -10 set_filename = trim(rem_dir) // loc_fn(i+1:len_trim(loc_fn)) - - end function set_filename - -!------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: getfil -! -! !INTERFACE: - subroutine getfil (fulpath, locfn, iflag) -! -! !DESCRIPTION: -! Obtain local copy of file -! First check current working directory -! Next check full pathname[fulpath] on disk -! Finally check full pathname[fulpath] on archival system -! -! !USES: -! -! !ARGUMENTS: - implicit none - character(len=*), intent(in) :: fulpath !Archival or permanent disk full pathname - character(len=*), intent(out) :: locfn !output local file name - integer, optional, intent(in) :: iflag !0=>abort if file not found 1=>do not abort -! -! !REVISION HISTORY: -! Created by Mariana Vertenstein -! -! -! !LOCAL VARIABLES: -!EOP - integer i !loop index - integer klen !length of fulpath character string - integer ierr !error status - logical lexist !true if local file exists - character(len=len(fulpath)+5) :: fulpath2 !Archival full pathname -!------------------------------------------------------------------------ - - ! get local file name from full name: start at end. look for first "/" - - klen = len_trim(fulpath) - do i = klen, 1, -1 - if (fulpath(i:i).eq.'/') go to 100 - end do - i = 0 -100 locfn = fulpath(i+1:klen) - if (len_trim(locfn) == 0) then - write(6,*)'(GETFIL): local filename has zero length' - stop 1 - else - write(6,*)'(GETFIL): attempting to find local file ',trim(locfn) - endif - - ! first check if file is in current working directory. - - inquire (file=locfn,exist=lexist) - if (lexist) then - write(6,*) '(GETFIL): using ',trim(locfn),' in current working directory' - RETURN - endif - - ! second check for full pathname on disk - - inquire(file=fulpath, exist=lexist) - if (lexist) then - locfn = trim(fulpath) - write(6,*) '(GETFIL): using ',trim(fulpath) - RETURN - else - write(6,*) 'GETFIL: FAILED to get '//trim(fulpath) - stop 1 - end if - - end subroutine getfil - -!------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: opnfil -! -! !INTERFACE: - subroutine opnfil (locfn, iun, form) -! -! !DESCRIPTION: -! Open file locfn in unformatted or formatted form on unit iun -! -! !ARGUMENTS: -! - implicit none - character(len=*), intent(in):: locfn !file name - integer, intent(in):: iun !fortran unit number - character(len=1), intent(in):: form !file format: u = unformatted, - !f = formatted -! -! !REVISION HISTORY: -! Created by Mariana Vertenstein -! -! -! !LOCAL VARIABLES: -!EOP - integer ioe !error return from fortran open - character(len=11) ft !format type: formatted. unformatted -!------------------------------------------------------------------------ - - if (len_trim(locfn) == 0) then - write(6,*)'OPNFIL: local filename has zero length' - stop 1 - endif - if (form=='u' .or. form=='U') then - ft = 'unformatted' - else - ft = 'formatted ' - end if - open (unit=iun,file=locfn,status='unknown',form=ft,iostat=ioe) - if (ioe /= 0) then - write(6,*)'(OPNFIL): failed to open file ',trim(locfn), & - & ' on unit ',iun,' ierr=',ioe - stop 1 - else - write(6,*)'(OPNFIL): Successfully opened file ',trim(locfn),' on unit= ',iun - end if - - end subroutine opnfil - -!------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: getavu -! -! !INTERFACE: - integer function getavu() -! -! !DESCRIPTION: -! Get next available Fortran unit number. -! -! !USES: - use shr_file_mod, only : shr_file_getUnit -! -! !ARGUMENTS: - implicit none -! -! !REVISION HISTORY: -! Created by Gordon Bonan -! Modified for clm2 by Mariana Vertenstein -! -! -! !LOCAL VARIABLES: -!EOP -!------------------------------------------------------------------------ - - getavu = shr_file_getunit() - - end function getavu - -!------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: relavu -! -! !INTERFACE: - subroutine relavu (iunit) -! -! !DESCRIPTION: -! Close and release Fortran unit no longer in use! -! -! !USES: - use shr_file_mod, only : shr_file_freeUnit -! -! !ARGUMENTS: - implicit none - integer, intent(in) :: iunit !Fortran unit number -! -! !REVISION HISTORY: -! Created by Gordon Bonan -! -!EOP -!------------------------------------------------------------------------ - - close(iunit) - call shr_file_freeUnit(iunit) - - end subroutine relavu - -end module fileutils diff --git a/tools/mkprocdata_map/src/fmain.F90 b/tools/mkprocdata_map/src/fmain.F90 deleted file mode 100644 index ba9e593c1d..0000000000 --- a/tools/mkprocdata_map/src/fmain.F90 +++ /dev/null @@ -1,78 +0,0 @@ -program fmain - - use mkprocdata_map, only : mkmap - implicit none - - character(len= 256) :: arg - integer :: n !index - integer :: nargs !number of arguments - integer, external :: iargc !number of arguments function - character(len=256) :: filei !input file - character(len=256) :: fileo !output mapped file - character(len=256) :: fmap !maping file - character(len=256) :: ftemplate !template file, containing lat & lon arrays desired in output file - character(len=256) :: cmdline !input command line - integer, parameter :: inival = -999 !initial value for command-line integers - !---------------------------------------------------- - - filei = ' ' - fileo = ' ' - fmap = ' ' - ftemplate = ' ' - - cmdline = 'mkprocdata_map' - nargs = iargc() - n = 1 - do while (n <= nargs) - arg = ' ' - call getarg (n, arg) - n = n + 1 - - select case (arg) - case ('-i') - call getarg (n, arg) - n = n + 1 - filei = trim(arg) - cmdline = trim(cmdline) // ' -i ' // trim(arg) - case ('-o') - call getarg (n, arg) - n = n + 1 - fileo = trim(arg) - cmdline = trim(cmdline) // ' -o ' // trim(arg) - case ('-m') - call getarg (n, arg) - n = n + 1 - fmap = trim(arg) - cmdline = trim(cmdline) // ' -m ' // trim(arg) - case ('-t') - call getarg (n, arg) - n = n + 1 - ftemplate = trim(arg) - cmdline = trim(cmdline) // ' -t ' // trim(arg) - case default - write (6,*) 'Argument ', arg,' is not known' - call usage_exit (' ') - cmdline = trim(cmdline) // ' ' // trim(arg) - end select - end do - - if (filei == ' ' .or. fileo == ' ' .or. fmap == ' ' & - .or. ftemplate == ' ') then - call usage_exit ('Must specify all the following arguments') - end if - - call mkmap (filei, fileo, fmap, ftemplate) - -end program fmain - - -subroutine usage_exit (arg) - implicit none - character(len=*) :: arg - if (arg /= ' ') write (6,*) arg - write (6,*) 'Usage: mkprocdata_map -i -o -m -t