diff --git a/.ChangeLog_template b/.ChangeLog_template index 8041e07938..5c11f0f6b7 100644 --- a/.ChangeLog_template +++ b/.ChangeLog_template @@ -13,10 +13,10 @@ Purpose of changes Bugs fixed or introduced ------------------------ -Bugs fixed (include bugzilla ID): [If none, remove this line] +Issues fixed (include CCTSM Issue #): [If none, remove this line] CIME Issues fixed (include issue #): [If none, remove this line] -Known bugs introduced in this tag (include bugzilla ID): [If none, remove this line] +Known bugs introduced in this tag (include github issue ID): [If none, remove this line] Notes of particular relevance for users @@ -77,9 +77,6 @@ CLM testing: regular tests (aux_clm): - yellowstone_intel - - yellowstone_pgi --- - yellowstone_gnu --- cheyenne_intel ---- cheyenne_gnu ------ hobart_nag -------- diff --git a/SVN_EXTERNAL_DIRECTORIES b/SVN_EXTERNAL_DIRECTORIES index 40ac793f7f..06d710da44 100644 --- a/SVN_EXTERNAL_DIRECTORIES +++ b/SVN_EXTERNAL_DIRECTORIES @@ -1,2 +1,2 @@ -src/fates https://github.com/NCAR/fates-release/tags/fates_s1.3.0_a1.0.0_rev3 +src/fates https://github.com/NCAR/fates-release/tags/fates_s1.4.1_a3.0.0_rev2 tools/PTCLM https://github.com/ESCOMP/ptclm/tags/PTCLM2_171216c diff --git a/SVN_EXTERNAL_DIRECTORIES.standalone b/SVN_EXTERNAL_DIRECTORIES.standalone index ff91f394af..dc37d702cc 100644 --- a/SVN_EXTERNAL_DIRECTORIES.standalone +++ b/SVN_EXTERNAL_DIRECTORIES.standalone @@ -1,5 +1,4 @@ -cime https://github.com/CESM-Development/cime/tags/billsacks/always_glcmec_n01 -components/clm/tools/gen_domain https://github.com/CESM-Development/cime/tags/billsacks/always_glcmec_n01/tools/mapping/gen_domain_files +cime https://github.com/CESM-Development/cime/tags/clm4518/n02/cime5.4.0-alpha.03 components/cism https://svn-ccsm-models.cgd.ucar.edu/glc/trunk_tags/cism2_1_40 -components/rtm https://github.com/ESCOMP/rtm/tags/rtm1_0_63 -components/mosart https://github.com/ESCOMP/mosart/tags/mosart1_0_28 +components/rtm https://github.com/ESCOMP/rtm/tags/rtm1_0_65 +components/mosart https://github.com/ESCOMP/mosart/tags/mosart1_0_30 diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 01118dab67..4c0d7df810 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -741,7 +741,7 @@ sub setup_cmdl_fates_mode { # The following variables may be set by the user and are compatible with use_fates # no need to set defaults, covered in a different routine - my @list = ( "use_fates_spitfire", "use_vertsoilc", "use_century_decomp", "use_lch4" ); + my @list = ( "use_vertsoilc", "use_century_decomp", "use_lch4" ); foreach my $var ( @list ) { if ( defined($nl->get_value($var)) ) { $nl_flags->{$var} = $nl->get_value($var); @@ -754,15 +754,14 @@ sub setup_cmdl_fates_mode { } } } - -# add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_vertsoilc', 'use_fates'=>$nl_flags->{'use_fates'} ); - - } else { - # we only dis-allow fates_spit_fire with non-fates runs - $var = "use_fates_spitfire"; - if ( defined($nl->get_value($var)) ) { - $log->fatal_error("$var is being set, but can ONLY be set when -bgc fates option is used."); + # dis-allow fates specific namelist items with non-fates runs + my @list = ( "use_fates_spitfire", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", + "use_fates_inventory_init", "fates_inventory_ctrl_filename","use_fates_logging" ); + foreach my $var ( @list ) { + if ( defined($nl->get_value($var)) ) { + $log->fatal_error("$var is being set, but can ONLY be set when -bgc fates option is used.\n"); + } } } } @@ -1244,14 +1243,14 @@ sub setup_cmdl_run_type { if (defined $opts->{$var}) { if ($opts->{$var} eq "default" ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, - 'use_cndv'=>$nl_flags->{'use_cndv'} ); + 'use_cndv'=>$nl_flags->{'use_cndv'}, 'use_fates'=>$nl_flags->{'use_fates'} ); } else { my $group = $definition->get_group_name($var); $nl->set_variable_value($group, $var, quote_string( $opts->{$var} ) ); } } else { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, - 'use_cndv'=>$nl_flags->{'use_cndv'} ); + 'use_cndv'=>$nl_flags->{'use_cndv'}, 'use_fates'=>$nl_flags->{'use_fates'} ); } $nl_flags->{'clm_start_type'} = $nl->get_value($var); } @@ -2339,7 +2338,7 @@ sub setup_logic_initial_conditions { } } else { foreach my $item ( "mask", "maxpft", "irrigate", "glc_nec", "use_crop", "use_cn", "use_cndv", - "use_nitrif_denitrif", "use_vertsoilc", "use_century_decomp" + "use_nitrif_denitrif", "use_vertsoilc", "use_century_decomp", "use_fates" ) { $settings{$item} = $nl_flags->{$item}; } @@ -2381,7 +2380,8 @@ sub setup_logic_initial_conditions { } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $useinitvar, 'use_cndv'=>$nl_flags->{'use_cndv'}, 'phys'=>$physv->as_string(), - 'sim_year'=>$settings{'sim_year'}, 'nofail'=>1 ); + 'sim_year'=>$settings{'sim_year'}, 'nofail'=>1, + 'use_fates'=>$nl_flags->{'use_fates'} ); $settings{$useinitvar} = $nl->get_value($useinitvar); if ( $try > 1 ) { my $group = $definition->get_group_name($useinitvar); @@ -2390,7 +2390,8 @@ sub setup_logic_initial_conditions { if ( &value_is_true($nl->get_value($useinitvar) ) ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, "init_interp_attributes", - 'sim_year'=>$settings{'sim_year'}, 'use_cndv'=>$nl_flags->{'use_cndv'}, + 'sim_year'=>$settings{'sim_year'}, 'use_cndv'=>$nl_flags->{'use_cndv'}, + 'glc_nec'=>$nl_flags->{'glc_nec'}, 'use_fates'=>$nl_flags->{'use_fates'}, 'use_cn'=>$nl_flags->{'use_cn'}, 'nofail'=>1 ); my $attributes_string = remove_leading_and_trailing_quotes($nl->get_value("init_interp_attributes")); foreach my $pair ( split( /\s/, $attributes_string) ) { @@ -3679,8 +3680,23 @@ sub setup_logic_fates { my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_; if ($physv->as_long() >= $physv->as_long("clm4_5") && &value_is_true( $nl_flags->{'use_fates'}) ) { - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_fates_spitfire', 'use_fates'=>$nl_flags->{'use_fates'} ); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_paramfile', 'phys'=>$nl_flags->{'phys'}); + my @list = ( "use_fates_spitfire", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", + "use_fates_inventory_init", "use_fates_logging" ); + foreach my $var ( @list ) { + add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'use_fates'=>$nl_flags->{'use_fates'} ); + } + my $var = "use_fates_inventory_init"; + if ( defined($nl->get_value($var)) ) { + if ( &value_is_true($nl->get_value($var)) ) { + $var = "fates_inventory_ctrl_filename"; + if ( ! defined($nl->get_value($var)) ) { + $log->fatal_error("$var is required when use_fates_inventory_init is set" ); + } elsif ( ! -f "$nl->get_value($var)" ) { + $log->fatal_error("$var does NOT point to a valid filename" ); + } + } + } } } diff --git a/bld/namelist_files/namelist_defaults_clm4_5.xml b/bld/namelist_files/namelist_defaults_clm4_5.xml index 9cc36f3857..d9a498adb4 100644 --- a/bld/namelist_files/namelist_defaults_clm4_5.xml +++ b/bld/namelist_files/namelist_defaults_clm4_5.xml @@ -347,8 +347,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/paramdata/clm5_params.c171117.nc lnd/clm2/paramdata/clm_params.c170913.nc -lnd/clm2/paramdata/fates_params.c170331.nc + + + +lnd/clm2/paramdata/fates_params_2troppftclones.c171018.nc @@ -449,9 +452,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 1850,2000 -.true. -.true. -.false. +.true. +.true. +.false. -hgrid=1.9x2.5 maxpft=79 mask=gx1v6 use_cn=.true. use_nitrif_denitrif=.true. use_vertsoilc=.true. use_crop=.true. irrigate=.false. glc_nec=10 -hgrid=1.9x2.5 maxpft=79 mask=gx1v6 use_cn=.true. use_nitrif_denitrif=.true. use_vertsoilc=.true. use_crop=.true. irrigate=.true. glc_nec=10 @@ -472,7 +475,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). --> -lnd/clm2/initdata_map/clmi.IGM1850GSWCLM50BGCCROP.0481-01-01.1.9x2.5_gx1v6_gl5_simyr1850_c170419.nc @@ -483,12 +486,26 @@ attributes from the config_cache.xml file (with keys converted to upper-case). --> -lnd/clm2/initdata_map/clmi.IGM2000GSWP3CLM50BGCCROPIRR.2011-01-01.1.9x2.5_gx1v6_gl5_simyr2000_c170419.nc + +lnd/clm2/initdata_map/clmi.I2000Clm45Fates.0121-01-01.4x5_mgx3v7_simyr2000_c180122.nc + + +lnd/clm2/initdata_map/clmi.I2000Clm45Fates.0101-01-01.1x1_brazil_simyr2000_c180120.nc + + + lnd/clm2/surfdata_map/surfdata_360x720cru_16pfts_Irrig_CMIP6_simyr2000_c170824.nc @@ -1004,6 +1021,7 @@ lnd/clm2/surfdata_map/surfdata_ne120np4_78pfts_CMIP6_simyr1850_c170824.nc.true. .false. + @@ -2299,6 +2317,12 @@ lnd/clm2/surfdata_map/surfdata_ne120np4_78pfts_CMIP6_simyr1850_c170824.nc.false. .false. -.false. + +.false. +.false. +.false. +.false. +.false. +.false. diff --git a/bld/namelist_files/namelist_defaults_overall.xml b/bld/namelist_files/namelist_defaults_overall.xml index a21a0c006e..20158c7dd4 100644 --- a/bld/namelist_files/namelist_defaults_overall.xml +++ b/bld/namelist_files/namelist_defaults_overall.xml @@ -13,12 +13,14 @@ determine default values for namelists. --> -startup -startup -arb_ic -arb_ic -arb_ic -cold +startup +startup +arb_ic +arb_ic +arb_ic +arb_ic +arb_ic +cold /fs/cgd/csm/inputdata diff --git a/bld/namelist_files/namelist_definition_clm4_5.xml b/bld/namelist_files/namelist_definition_clm4_5.xml index e8318d60c1..ea00f3babe 100644 --- a/bld/namelist_files/namelist_definition_clm4_5.xml +++ b/bld/namelist_files/namelist_definition_clm4_5.xml @@ -582,15 +582,48 @@ set to 3 meaning branch. -Toggle to turn on the ED -(ED = 'on' is EXPERIMENTAL NOT SUPPORTED!) +Toggle to turn on the FATES model +(use_fates= '.true.' is EXPERIMENTAL NOT SUPPORTED!) -Toggle to turn on spit fire (only relevant if ED is being used). +Toggle to turn on spitfire module for modeling fire (only relevant if FATES is being used). + +Toggle to turn on the logging module (only relevant if FATES is being used). + + + +Toggle to turn on plant hydraulics (only relevant if FATES is on). +(use_fates_planthydro=".true." is EXPERIMENTAL NOT SUPPORTED! Nor is it Tested!) + + + +Toggle to turn on Static Stand Structure Mode (only relevant if FATES is being used). +(use_fates_ed_st3=".true." is EXPERIMENTAL NOT SUPPORTED! Nor is it Tested!) + + + +Toggle to turn on prescribed physiology (only relevant if FATES is being used). + + + +Toggle to turn on inventory initialization to startup FATES (only relevant if FATES is being used). +(use_fates_inventory_init=".true." is EXPERIMENTAL NOT SUPPORTED! Nor is it Tested!) + + + +Full pathname to the inventory initialization control file. +(Required, if use_fates_inventory_init=T) + @@ -871,13 +904,13 @@ Maximum nitrification rate constant (1/s) Turn on vertical soil carbon. -Requires the CN or ED model to work (either CN or CNDV). +Requires the CN or FATES model to work (either CN or CNDV). Use parameters for decomposition from the CENTURY Carbon model -Requires the CN or ED model to work (either CN or CNDV). +Requires the CN or FATES model to work (either CN or CNDV). $ntests ); @@ -755,47 +755,62 @@ sub make_env_run { GLC_TWO_WAY_COUPLING=>"TRUE", conopts=>"-phys clm4_0", }, - "useEDContradict" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + "useFATESContradict" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"use_fates=.false.", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm4_5", }, - "useEDContradict2" =>{ options=>"-envxml_dir . -no-megan", + "useFATESContradict2" =>{ options=>"-envxml_dir . -no-megan", namelst=>"use_fates=.true.", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm4_5", }, - "useEDWCN" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + "useFATESWCN" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"use_cn=.true.", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm5_0", }, - "useEDWcreatecrop" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + "useFATESWcreatecrop" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"create_crop_landunit=.true.", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm5_0", }, - "useEDWTransient" =>{ options=>"-bgc fates -use_case 20thC_transient -envxml_dir . -no-megan -res 10x15", + "useFATESWTransient" =>{ options=>"-bgc fates -use_case 20thC_transient -envxml_dir . -no-megan -res 10x15", namelst=>"", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm5_0", }, - "useEDclm40" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + "useFATESclm40" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm4_0", }, - "usespitfireButNOTED" =>{ options=>"-envxml_dir . -no-megan", + "usespitfireButNOTFATES" =>{ options=>"-envxml_dir . -no-megan", namelst=>"use_fates_spitfire=.true.", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm4_5", }, - "useMEGANwithED" =>{ options=>"-bgc fates -envxml_dir . -megan", + "useloggingButNOTFATES" =>{ options=>"-envxml_dir . -no-megan", + namelst=>"use_fates_logging=.true.", + GLC_TWO_WAY_COUPLING=>"FALSE", + conopts=>"-phys clm4_5", + }, + "useinventorybutnotfile" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + namelst=>"use_fates_inventory_init=.true.", + GLC_TWO_WAY_COUPLING=>"FALSE", + conopts=>"-phys clm4_5", + }, + "inventoryfileDNE" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + namelst=>"use_fates_inventory_init=.true., fates_inventory_ctrl_filename='zztop'", + GLC_TWO_WAY_COUPLING=>"FALSE", + conopts=>"-phys clm4_5", + }, + "useMEGANwithFATES" =>{ options=>"-bgc fates -envxml_dir . -megan", namelst=>"", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm4_5", }, - "useHYDSTwithED" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + "useHYDSTwithFATES" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"use_hydrstress=.true.", GLC_TWO_WAY_COUPLING=>"FALSE", conopts=>"-phys clm5_0", diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index c98bf7b72b..5a633daab8 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -104,10 +104,15 @@ 2000_DATM%GSWP3v1_CLM50%SP_SICE_SOCN_RTM%FLOOD_CISM2%NOEVOLVE_SWAV + I2000Clm50Fates 2000_DATM%GSWP3v1_CLM50%FATES_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV + + I2000Clm50FatesCruGs + 2000_DATM%CRUv7_CLM50%FATES_SICE_SOCN_MOSART_SGLC_SWAV + @@ -277,6 +282,7 @@ 2000_DATM%CRU_CLM40%SP_SICE_SOCN_RTM_SGLC_SWAV + diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index a065dba020..2d51f524f2 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -1,15 +1,29 @@ - FAIL ERP_D_Lm9.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_monthly RUN - FAIL SMS_D_Lm13.f10_f10_musgs.I1850Clm50BgcCrop.yellowstone_intel.clm-ciso_monthly RUN - FAIL SMS_D_Lm13.f10_f10_musgs.IHistClm50BgcCrop.yellowstone_intel.clm-ciso_monthly RUN - FAIL NCK_Ld1.f10_f10_musgs.I2000Clm50Sp.cheyenne_intel.clm-default COMPARE_base_multiinst - FAIL NCK_Ld1.f10_f10_musgs.I2000Clm50Sp.yellowstone_intel.clm-default COMPARE_base_multiinst - FAIL ERI_N2_Ld9.f19_g17.I2000Clm50BgcCrop.cheyenne_intel.clm-default RUN - FAIL SMS_Ld5_D_P24x1.f10_f10_musgs.IHistClm50Bgc.hobart_nag.clm-decStart RUN - FAIL ERP_D_P24x1.f10_f10_musgs.IHistClm50Bgc.hobart_nag.clm-decStart RUN - FAIL ERP_D.f10_f10_musgs.IHistClm50Bgc.yellowstone_gnu.clm-decStart RUN - FAIL ERS_Ly5_P72x1.f10_f10_musgs.IHistClm45BgcCrop.cheyenne_intel.clm-cropMonthOutput RUN - FAIL ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropGs.yellowstone_pgi.clm-monthly RUN + FAIL ERP_D_Lm9.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_monthly RUN + FAIL SMS_D_Lm13.f10_f10_musgs.I1850Clm50BgcCrop.cheyenne_intel.clm-ciso_monthly RUN + FAIL SMS_D_Lm13.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_monthly RUN + FAIL ERP_D_Ld10.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_decStart SHAREDLIB_BUILD + FAIL NCK_Ld1.f10_f10_musgs.I2000Clm50Sp.cheyenne_intel.clm-default COMPARE_base_multiinst + FAIL NCK_Ld1.f10_f10_musgs.I2000Clm50Sp.cheyenne_intel.clm-default COMPARE_base_multiinst + FAIL ERI_N2_Ld9.f19_g17.I2000Clm50BgcCrop.cheyenne_intel.clm-default RUN + FAIL SMS_Ld5_D_P48x1.f10_f10_musgs.IHistClm50Bgc.hobart_nag.clm-decStart RUN + FAIL ERP_D_P48x1.f10_f10_musgs.IHistClm50Bgc.hobart_nag.clm-decStart RUN + FAIL ERP_D.f10_f10_musgs.IHistClm50Bgc.cheyenne_gnu.clm-decStart RUN + FAIL ERS_Ly5_P72x1.f10_f10_musgs.IHistClm45BgcCrop.cheyenne_intel.clm-cropMonthOutput RUN + FAIL ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropGs.cheyenne_gnu.clm-monthly RUN + FAIL SMS_D_Ld5.f45_f45_mg37.I2000Clm50Fates.cheyenne_intel.clm-Fates RUN + FAIL SMS_D_Lm6.f45_f45_mg37.I2000Clm50Fates.cheyenne_intel.clm-Fates RUN + FAIL SMS_D_Lm6_P144x1.f45_f45_mg37.I2000Clm50Fates.cheyenne_intel.clm-Fates RUN + FAIL ERP_Ld5.f10_f10_musgs.I2000Clm50Vic.cheyenne_gnu.clm-decStart COMPARE_base_rest + FAIL ERP_Ld9.f45_f45.I2000Clm45Fates.hobart_nag.clm-FatesAllVars COMPARE_base_rest + FAIL ERS_Ld60.f45_f45.I2000Clm45Fates.cheyenne_intel.clm-FatesLogging COMPARE_base_rest + FAIL ERS_Ld60.f45_f45.I2000Clm45Fates.cheyenne_intel.clm-Fates COMPARE_base_rest + FAIL ERS_Ld60.f45_f45.I2000Clm45Fates.cheyenne_intel.clm-FatesNoFire COMPARE_base_rest + FAIL ERS_Ld60.f45_f45.I2000Clm45Fates.cheyenne_intel.clm-FatesPPhys COMPARE_base_rest + FAIL ERS_Ld60.f45_f45.I2000Clm45Fates.cheyenne_intel.clm-FatesST3 COMPARE_base_rest + FAIL ERP_Ld9.f45_f45.I2000Clm45Fates.cheyenne_intel.clm-FatesAllVars COMPARE_base_rest + FAIL ERS_Ld60.f45_f45.I2000Clm45Fates.cheyenne_gnu.clm-Fates COMPARE_base_rest + FAIL ERS_D_Mmpi-serial_Ld5.1x1_brazil.I2000Clm50FatesGs.yellowstone_pgi.clm-fates COMPARE_base_rest diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index dba4c93085..12a0d7361e 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1,1147 +1,1884 @@ - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - - - - - yellowstone - - - - - - - cheyenne - - - cheyenne - - - hobart - - - yellowstone - - - - - - - yellowstone - - - cheyenne - - - - - - - yellowstone - - - - - hobart - - - - - - - yellowstone - - - - - cheyenne - yellowstone - - - - - cheyenne - - - - - yellowstone - - - hobart - - - cheyenne - yellowstone - yellowstone - yellowstone - - - hobart - hobart - - - yellowstone - - - yellowstone - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - hobart - yellowstone - yellowstone - - - - - cheyenne - yellowstone - - - - - - - cheyenne - - - - - ed - - - cheyenne - - - cheyenne - - - - - cheyenne - yellowstone - - - - - cheyenne - - - - - hobart - - - cheyenne - cheyenne - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - - - cheyenne - cheyenne - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - - - cheyenne - yellowstone - - - yellowstone - - - cheyenne - cheyenne - ed - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - - - - - cheyenne - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - - - hobart - - - - - - - cheyenne - yellowstone - - - - - yellowstone - - - cheyenne - yellowstone - yellowstone - yellowstone - - - - - - - cheyenne - yellowstone - - - - - - - cheyenne - yellowstone - - - hobart - - - - - - - hobart - - - hobart - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - - - cheyenne - yellowstone - - - hobart - yellowstone - yellowstone - - - - - yellowstone - yellowstone - - - - - - - cheyenne - cheyenne - janus - yellowstone - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - - - edison - hobart - hobart - hopper - - - - - cheyenne - cheyenne - edison - hopper - janus - yellowstone - - - - - cheyenne - cheyenne - hobart - hobart - janus - janus - yellowstone - - - - - - - hobart - - - - - - - cheyenne - yellowstone - - - - - cheyenne - hobart - yellowstone - - - cheyenne - hobart - yellowstone - yellowstone - yellowstone - - - cheyenne - yellowstone - yellowstone - - - - - cheyenne - yellowstone - yellowstone - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - - - - - cheyenne - hobart - yellowstone - - - - - cheyenne - yellowstone - - - cheyenne - hobart - yellowstone - - - - - - - yellowstone - - - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - - - yellowstone - - - yellowstone - - - cheyenne - - - cheyenne - - - cheyenne - - - hobart - - - hobart - hobart - - - hobart - hobart - - - yellowstone - - - hobart - - - cheyenne - yellowstone - - - - - cheyenne - yellowstone - - - yellowstone - - - - - cheyenne - - - - - - - yellowstone - - - cheyenne - yellowstone - - - hobart - - - cheyenne - yellowstone - - - - - yellowstone - - - - - - - cheyenne - - - - - - - cheyenne - - - - - cheyenne - yellowstone - yellowstone - - - cheyenne - yellowstone - yellowstone - - - cheyenne - yellowstone - - - - - cheyenne - yellowstone - yellowstone - - - hobart - - - cheyenne - cheyenne - yellowstone - yellowstone - yellowstone - yellowstone - - - cheyenne - yellowstone - yellowstone - yellowstone - - - cheyenne - cheyenne - yellowstone - yellowstone - yellowstone - - - hobart - - - cheyenne - cheyenne - cheyenne - cheyenne - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - yellowstone - - - cheyenne - yellowstone - - - hobart - hobart - hobart - hobart - - - cheyenne - cheyenne - yellowstone - yellowstone - yellowstone - yellowstone - - - cheyenne - yellowstone - - - cheyenne - cheyenne - cheyenne - cheyenne - cheyenne - - - hobart - - - cheyenne - yellowstone - yellowstone - yellowstone - - - cheyenne - cheyenne - cheyenne - - - - - cheyenne - cheyenne - yellowstone - yellowstone - yellowstone - - - cheyenne - yellowstone - yellowstone - - - cheyenne - edison - hopper - janus - - - - - cheyenne - yellowstone - - - - - yellowstone - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - - - - - yellowstone - - - cheyenne - - - - - yellowstone - - - - - - - cheyenne - yellowstone - - - yellowstone - - - - - - - cheyenne - yellowstone - - - hobart - - - - - yellowstone - - - cheyenne - yellowstone - - - - - - - cheyenne - yellowstone - - - - - cheyenne - hobart - yellowstone - - - cheyenne - hobart - yellowstone - yellowstone - yellowstone - - - cheyenne - yellowstone - yellowstone - - - - - cheyenne - yellowstone - yellowstone - - - - - cheyenne - yellowstone - - - cheyenne - - - yellowstone - - - - - - - cheyenne - hobart - yellowstone - yellowstone - yellowstone - - - - - cheyenne - yellowstone - - - cheyenne - hobart - yellowstone - yellowstone - - - - - - - cheyenne - yellowstone - - - hobart - - - - - hobart - - - cheyenne - yellowstone - yellowstone - - - hobart - - - cheyenne - yellowstone - - - - - cheyenne - yellowstone - - - - - - - cheyenne - cheyenne - hobart - hobart - yellowstone - yellowstone - yellowstone - - - cheyenne - hobart - yellowstone - yellowstone - yellowstone - yellowstone - - - - - - - hobart - - - yellowstone - - - - - - - cheyenne - yellowstone - - - yellowstone - - - - - cheyenne - yellowstone - - - yellowstone - - - - - cheyenne - yellowstone - - - - - - - ed - hobart - - - - - ed - hobart - - - ed - hobart - - - - - ed - - - - - ed - ed - hobart - - - ed - hobart - - - ed - - - - - ed - - - ed - - - - - ed - - - ed - - - - - ed - - - - - - - ed - hobart - - - - - ed - hobart - - - ed - hobart - - - - - ed - - - - - ed - ed - hobart - - - ed - hobart - - - ed - - - - - ed - - - ed - - - - - ed - - - ed - - - - - ed - - - - - - - hobart - - - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - cheyenne - yellowstone - - - - - - - hobart - - - yellowstone - - - - - - - cheyenne - - - - - - - yellowstone - - - - - - - yellowstone - yellowstone - - - hobart - - - cheyenne - yellowstone - yellowstone - - - hobart - hobart - - - - - yellowstone - - - cheyenne - yellowstone - yellowstone - - - - - - - cheyenne - - - cheyenne - - - cheyenne - yellowstone - - - yellowstone - - - - - - - cheyenne - - - - - - - cheyenne - - - - - cheyenne - yellowstone - - - yellowstone - - - yellowstone - - - - - - - cheyenne - yellowstone - - - - - - - cheyenne - yellowstone - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cime_config/testdefs/testmods_dirs/clm/fates/shell_commands b/cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands similarity index 56% rename from cime_config/testdefs/testmods_dirs/clm/fates/shell_commands rename to cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands index cbe7a32650..d81ed7dbc5 100644 --- a/cime_config/testdefs/testmods_dirs/clm/fates/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands @@ -1,2 +1 @@ ./xmlchange CLM_BLDNML_OPTS="-no-megan" --append -./xmlchange CLM_FORCE_COLDSTART="on" diff --git a/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm new file mode 100644 index 0000000000..487ad09863 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm @@ -0,0 +1,11 @@ +!!finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/iclm45fates-finit-s1.4.0-a3.0.0-1x1br.clm2.r.0111-01-01-00000.nc' +hist_mfilt = 365 +hist_nhtfrq = -24 +hist_empty_htapes = .true. +use_fates_spitfire= .true. +hist_fincl1 = 'NPP','GPP','BTRAN','H2OSOI','TLAI','LITTER_IN','LITTER_OUT', + 'FIRE_AREA','SCORCH_HEIGHT','FIRE_INTENSITY','FIRE_TFC_ROS','fire_fuel_mef', + 'fire_fuel_bulkd','fire_fuel_sav','FIRE_NESTEROV_INDEX','PFTbiomass', + 'PFTleafbiomass','FIRE_ROS','WIND','AREA_TREES','AREA_PLANT', + 'TOTSOMC','TOTLITC','T_SCALAR','NEP','NBP','HR','TOTECOSYSC','NPLANT_SCAG','NPLANT_SCPF', + 'BA_SCLS','NPP_BY_AGE','CWD_AG_CWDSC','PARSUN_Z_CNLF','PARSUN_Z_CNLFPFT','PARSHA_Z_CAN' diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/include_user_mods new file mode 100644 index 0000000000..4c7aa0f2b4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/include_user_mods @@ -0,0 +1 @@ +../Fates diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/shell_commands new file mode 100644 index 0000000000..2a9f09bd75 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/shell_commands @@ -0,0 +1 @@ +./xmlchange CLM_FORCE_COLDSTART="on" diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/user_nl_clm new file mode 100644 index 0000000000..a869310636 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/user_nl_clm @@ -0,0 +1,31 @@ +!finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/iclm45fates-finit-s1.4.0-a3.0.0-f45.clm2.r.0111-01-01-00000.nc' +hist_mfilt = 365 +hist_nhtfrq = -24 +hist_empty_htapes = .false. +use_fates_spitfire= .true. +hist_fincl1 = 'NCL_BY_AGE','NPATCH_BY_AGE','BIOMASS_BY_AGE','NPP_BY_AGE','GPP_BY_AGE','PARSUN_Z_CNLF','PARSHA_Z_CNLF','PARSUN_Z_CNLFPFT', + 'PARSHA_Z_CNLFPFT','PARSUN_Z_CAN','PARSHA_Z_CAN','LAISUN_Z_CNLF','LAISHA_Z_CNLF','LAISUN_Z_CNLFPFT','LAISHA_Z_CNLFPFT', + 'LAISUN_TOP_CAN','LAISHA_TOP_CAN','FABD_SUN_CNLFPFT','FABD_SHA_CNLFPFT','FABI_SUN_CNLFPFT','FABI_SHA_CNLFPFT', + 'FABD_SUN_CNLF','FABD_SHA_CNLF','FABI_SUN_CNLF','FABI_SHA_CNLF','FABD_SUN_TOPLF_BYCANLAYER','FABD_SHA_TOPLF_BYCANLAYER', + 'FABI_SUN_TOPLF_BYCANLAYER','FABI_SHA_TOPLF_BYCANLAYER','TS_NET_UPTAKE_CNLF','YEAR_NET_UPTAKE_CNLF','CROWNAREA_CNLF', + 'MORTALITY_CARBONFLUX_CANOPY','MORTALITY_CARBONFLUX_UNDERSTORY','NPLANT_SCAG','NPLANT_CANOPY_SCAG','NPLANT_UNDERSTORY_SCAG', + 'DDBH_CANOPY_SCAG','DDBH_UNDERSTORY_SCAG','MORTALITY_CANOPY_SCAG','MORTALITY_UNDERSTORY_SCAG','GPP_SCPF','GPP_CANOPY_SCPF', + 'AR_CANOPY_SCPF','GPP_UNDERSTORY_SCPF','AR_UNDERSTORY_SCPF','NPP_SCPF','NPP_LEAF_SCPF','NPP_SEED_SCPF','NPP_FNRT_SCPF', + 'NPP_BGSW_SCPF','NPP_BGDW_SCPF','NPP_AGSW_SCPF','NPP_AGDW_SCPF','NPP_STOR_SCPF','DDBH_SCPF','DDBH_CANOPY_SCPF', + 'DDBH_UNDERSTORY_SCPF','BA_SCPF','NPLANT_SCPF','M1_SCPF','M2_SCPF','M3_SCPF','M4_SCPF','M5_SCPF','M6_SCPF','M7_SCPF', + 'MORTALITY_CANOPY_SCPF','BSTOR_CANOPY_SCPF','BLEAF_CANOPY_SCPF','NPLANT_CANOPY_SCPF','MORTALITY_UNDERSTORY_SCPF', + 'BSTOR_UNDERSTORY_SCPF','BLEAF_UNDERSTORY_SCPF','NPLANT_UNDERSTORY_SCPF','CWD_AG_CWDSC','CWD_BG_CWDSC','CWD_AG_IN_CWDSC', + 'CWD_BG_IN_CWDSC','CWD_AG_OUT_CWDSC','CWD_BG_OUT_CWDSC','AR_SCPF','AR_GROW_SCPF','AR_MAINT_SCPF','AR_DARKM_SCPF','AR_AGSAPM_SCPF', + 'AR_CROOTM_SCPF','AR_FROOTM_SCPF','DDBH_CANOPY_SCLS','DDBH_UNDERSTORY_SCLS','YESTERDAYCANLEV_CANOPY_SCLS', + 'YESTERDAYCANLEV_UNDERSTORY_SCLS','BA_SCLS','DEMOTION_RATE_SCLS','PROMOTION_RATE_SCLS','NPLANT_CANOPY_SCLS', + 'MORTALITY_CANOPY_SCLS','NPLANT_UNDERSTORY_SCLS','MORTALITY_UNDERSTORY_SCLS','TRIMMING_CANOPY_SCLS','TRIMMING_UNDERSTORY_SCLS', + 'CROWN_AREA_CANOPY_SCLS','CROWN_AREA_UNDERSTORY_SCLS','LEAF_MD_CANOPY_SCLS','ROOT_MD_CANOPY_SCLS','CARBON_BALANCE_CANOPY_SCLS', + 'SEED_PROD_CANOPY_SCLS','DBALIVEDT_CANOPY_SCLS','DBDEADDT_CANOPY_SCLS','DBSTOREDT_CANOPY_SCLS','STORAGE_FLUX_CANOPY_SCLS', + 'NPP_LEAF_CANOPY_SCLS','NPP_FROOT_CANOPY_SCLS','NPP_BSW_CANOPY_SCLS','NPP_BDEAD_CANOPY_SCLS','NPP_BSEED_CANOPY_SCLS', + 'NPP_STORE_CANOPY_SCLS','RDARK_CANOPY_SCLS','LIVESTEM_MR_CANOPY_SCLS','LIVECROOT_MR_CANOPY_SCLS','FROOT_MR_CANOPY_SCLS', + 'RESP_G_CANOPY_SCLS','RESP_M_CANOPY_SCLS','LEAF_MD_UNDERSTORY_SCLS','ROOT_MD_UNDERSTORY_SCLS','CARBON_BALANCE_UNDERSTORY_SCLS', + 'SEED_PROD_UNDERSTORY_SCLS','DBALIVEDT_UNDERSTORY_SCLS','DBDEADDT_UNDERSTORY_SCLS','DBSTOREDT_UNDERSTORY_SCLS', + 'STORAGE_FLUX_UNDERSTORY_SCLS','NPP_LEAF_UNDERSTORY_SCLS','NPP_FROOT_UNDERSTORY_SCLS','NPP_BSW_UNDERSTORY_SCLS', + 'NPP_BDEAD_UNDERSTORY_SCLS','NPP_BSEED_UNDERSTORY_SCLS','NPP_STORE_UNDERSTORY_SCLS','RDARK_UNDERSTORY_SCLS', + 'LIVESTEM_MR_UNDERSTORY_SCLS','LIVECROOT_MR_UNDERSTORY_SCLS','FROOT_MR_UNDERSTORY_SCLS','RESP_G_UNDERSTORY_SCLS', + 'RESP_M_UNDERSTORY_SCLS' diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/include_user_mods new file mode 100644 index 0000000000..4c7aa0f2b4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/include_user_mods @@ -0,0 +1 @@ +../Fates diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/shell_commands new file mode 100644 index 0000000000..2a9f09bd75 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/shell_commands @@ -0,0 +1 @@ +./xmlchange CLM_FORCE_COLDSTART="on" diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/user_nl_clm new file mode 100644 index 0000000000..144569c412 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/user_nl_clm @@ -0,0 +1,6 @@ +hist_fincl1 = 'NPP','GPP','BTRAN','H2OSOI','TLAI','LITTER_IN','LITTER_OUT', + 'FIRE_AREA','SCORCH_HEIGHT','FIRE_INTENSITY','FIRE_TFC_ROS','fire_fuel_mef', + 'fire_fuel_bulkd','fire_fuel_sav','FIRE_NESTEROV_INDEX','PFTbiomass', + 'PFTleafbiomass','FIRE_ROS','WIND','AREA_TREES','AREA_PLANT', + 'TOTSOMC','TOTLITC','T_SCALAR','NEP','NBP','HR','TOTECOSYSC','NPLANT_SCAG','NPLANT_SCPF', + 'BA_SCLS','NPP_BY_AGE','CWD_AG_CWDSC','PARSUN_Z_CNLF','PARSUN_Z_CNLFPFT','PARSHA_Z_CAN' diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesLogging/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesLogging/include_user_mods new file mode 100644 index 0000000000..4c7aa0f2b4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesLogging/include_user_mods @@ -0,0 +1 @@ +../Fates diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesLogging/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesLogging/user_nl_clm new file mode 100644 index 0000000000..3b74a4fd37 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesLogging/user_nl_clm @@ -0,0 +1 @@ +use_fates_logging= .true. diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/include_user_mods new file mode 100644 index 0000000000..4c7aa0f2b4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/include_user_mods @@ -0,0 +1 @@ +../Fates diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/user_nl_clm new file mode 100644 index 0000000000..dfdb775ec5 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/user_nl_clm @@ -0,0 +1 @@ +use_fates_spitfire= .false. diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/include_user_mods new file mode 100644 index 0000000000..4c7aa0f2b4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/include_user_mods @@ -0,0 +1 @@ +../Fates diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/user_nl_clm new file mode 100644 index 0000000000..9da01bc3fe --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/user_nl_clm @@ -0,0 +1 @@ +use_fates_ed_prescribed_phys= .true. diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesST3/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesST3/include_user_mods new file mode 100644 index 0000000000..4c7aa0f2b4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesST3/include_user_mods @@ -0,0 +1 @@ +../Fates diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesST3/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesST3/user_nl_clm new file mode 100644 index 0000000000..eca76c4b9c --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesST3/user_nl_clm @@ -0,0 +1 @@ +use_fates_ed_st3= .true. diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesShortList/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesShortList/include_user_mods new file mode 100644 index 0000000000..4c7aa0f2b4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesShortList/include_user_mods @@ -0,0 +1 @@ +../Fates diff --git a/cime_config/testdefs/testmods_dirs/clm/fates/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesShortList/user_nl_clm similarity index 69% rename from cime_config/testdefs/testmods_dirs/clm/fates/user_nl_clm rename to cime_config/testdefs/testmods_dirs/clm/FatesShortList/user_nl_clm index 4dab7ec39e..f9d31eecbb 100644 --- a/cime_config/testdefs/testmods_dirs/clm/fates/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesShortList/user_nl_clm @@ -1,8 +1,5 @@ -hist_mfilt = 365 -hist_nhtfrq = -24 -hist_empty_htapes = .true. hist_fincl1 = 'NPP','GPP','BTRAN','H2OSOI','TLAI','LITTER_IN','LITTER_OUT', 'FIRE_AREA','SCORCH_HEIGHT','FIRE_INTENSITY','FIRE_TFC_ROS','fire_fuel_mef', 'fire_fuel_bulkd','fire_fuel_sav','FIRE_NESTEROV_INDEX','PFTbiomass', 'PFTleafbiomass','FIRE_ROS','WIND','AREA_TREES','AREA_PLANT', - 'TOTSOMC','TOTLITC','T_SCALAR','NEP','NBP','TOTECOSYSC' + 'TOTSOMC','TOTLITC','T_SCALAR','NEP','NBP','HR','TOTECOSYSC' diff --git a/doc/ChangeLog b/doc/ChangeLog index ce20db0ca6..9aa280dfc1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,291 @@ =============================================================== +Tag name: clm4_5_18_r272 +Originator(s): erik (Erik Kluzek) +Date: Thu Jan 25 01:17:01 MST 2018 +One-line Summary: Bring in latest FATES release version to CLM trunk: fates_s1.4.1_a3.0.0_rev2 + +Purpose of changes +------------------ + +Bring in the latest version of FATES from NGEET/fates-release and the associated interface +changes in CLM from NGEET/fates-clm. The new version is 1.4.1 for science and version 3.0 of +the API updated from 1.3.0 for science and 1.0.0 for the API. + + +Bugs fixed or introduced +------------------------ + +Issues fixed (include CCTSM Issue #): #219 + #219 -- Options listed incorrectly in testlist_clm.xml + +Known bugs introduced in this tag (include github issue ID): (or found) + #216 -- PE layout for hcru_hcru needs to be increased so that it can run + #213 -- CPLHIST case is matching the wrong CLM_NML_USE_CASE + #212 -- Can't use a non-fates restart file to interpolate to a simulation with fates + #211 -- Can't handle interpolating from a fates restart file because of the cohort dimension + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): Simple FATES initial-condition + files were added for present day at f45 and 1x1_brazil. FATES IC can't be interpolated from + so you either have to have an exact match or do a cold start. + +Changes to CLM's user interface (e.g., new/renamed XML or namelist variables): New FATES namelist items: + use_fates_planthydro, use_fates_ed_st3, use_fates_ed_prescribed_phys, + use_fates_inventory_init, fates_inventory_ctrl_filename,use_fates_logging + +Changes made to namelist defaults (e.g., changed parameter values): when FATES on, non-fates finidat + files won't be matched + +Changes to the datasets (e.g., parameter, surface or initial files): New fates param file + and finidat files for f45 and 1x1_brazil + +Substantial timing or memory changes: None + +Notes of particular relevance for developers: (including Code reviews and testing) +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + +Changes to tests or testing: ed test list removed and updated fates list added in + with new version=2.0 format, fates test list now sets machine/compiler rather than + using generic "fates" for both. + +Code reviewed by: self, rgknox, ckoven + +Did you follow the steps in .CLMTrunkChecklist: yes + +CLM testing: regular + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - PASS (33 fates namelist tests are different) + + unit-tests (components/clm/src): + + cheyenne - PASS + + regular tests (aux_clm): + + cheyenne_intel ---- OK + cheyenne_gnu ------ OK + hobart_nag -------- OK + hobart_pgi -------- OK + hobart_intel ------ OK + +CLM tag used for the baseline comparisons: clm4_5_18_r271 + + +Answer changes +-------------- + +Changes answers relative to baseline: Only simulations with fates on + + Summarize any changes to answers, i.e., + - what code configurations: Only "-bgc fates" + - what platforms/compilers: All + - nature of change: new climate, fates science updated from 1.3.0 to 1.4.1 + +Detailed list of changes +------------------------ + +List any svn externals directories updated (cime, rtm, mosart, cism, etc.): rtm, mosart, fates + rtm to rtm1_0_65 + mosart to mosart1_0_30 + fates to fates_s1.4.1_a3.0.0_rev2 + +List all files eliminated: + + fates test directory changed to one capitolized to be similar to new tests added + D components/clm/cime_config/testdefs/testmods_dirs/clm/fates/user_nl_clm + D components/clm/cime_config/testdefs/testmods_dirs/clm/fates/shell_commands + +List all files added and what they do: + + New tests for exercising more Fates options, all are based on the Fates test-mod + and add a few changes on top of it + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesShortList/user_nl_clm ------- Short list of hist_fincl1 + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesShortList/include_user_mods + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesST3/user_nl_clm ------------- use_fates_ed_st3=T + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesST3/include_user_mods + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/user_nl_clm --------- Long list of FATES variables + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/include_user_mods + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesAllVars/shell_commands ----- Cold-start + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesLogging/user_nl_clm -------- use_fates_logging=T + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesLogging/include_user_mods + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/user_nl_clm -------- Longer list of hist_fincl1 + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/include_user_mods + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesColdDef/shell_commands ----- Cold-start + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/user_nl_clm ---------- use_fates_ed_prescribed_phys=T + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesPPhys/include_user_mods + A components/clm/cime_config/testdefs/testmods_dirs/clm/Fates/user_nl_clm -------------- Moved from fates directory, longer + hist_fincl1 list + A components/clm/cime_config/testdefs/testmods_dirs/clm/Fates/shell_commands ----------- Moved from fates directory, no longer + a cold-start + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/user_nl_clm -------- use_fates_spitfire=F + A components/clm/cime_config/testdefs/testmods_dirs/clm/FatesNoFire/include_user_mods + +List all existing files that have been modified, and describe the changes: + + M components/clm/bld/CLMBuildNamelist.pm - Handle new FATES namelist items, send + use_fates down for setting of finidat, if use_fates_inventory_init=T, make + sure fates_inventory_ctrl_filename is set + + M components/clm/bld/unit_testers/build-namelist_test.pl - Change ED to FATES, test new FATES features + + M components/clm/bld/namelist_files/namelist_defaults_overall.xml -- clm_start_type is arb_ic when use_fates=T + M components/clm/bld/namelist_files/namelist_definition_clm4_5.xml - Update fates var descriptsion, and add + new namelist items: use_fates_logging, use_fates_planthydro, use_fates_ed_st3, use_fates_ed_prescribed_phys, + use_fates_inventory_init, fates_inventory_ctrl_filename, remove use of ED for FATES + M components/clm/bld/namelist_files/namelist_defaults_clm4_5.xml --- Update fates_paramfile, use_init_interp=T + only if use_fates=F, add use_fates=F to init_interp_attributes, add use_fates setting for finidat files, + and add new f45 and 1x1_brazil FATES finidat files, by default new use_fates_* options are False. + + M components/clm/cime_config/config_compsets.xml ------------- Add a stub-GLC FATES compset: I2000Clm50FatesCruGs + M components/clm/cime_config/testdefs/ExpectedTestFails.xml -- Many new expected fails for #221 and NGEET/fates#315 + M components/clm/cime_config/testdefs/testlist_clm.xml ------- Remove "ed" test-category, new "fates" test category + Move to after rather than nested inside (issue #219). + + M components/clm/src/utils/clmfates_paraminterfaceMod.F90 - Add write about dimension shape on abort + M components/clm/src/utils/clmfates_interfaceMod.F90 ------ New interface control variables, add call to + FatesReportParameters, use_fates_plant_hydro=>use_fates_planthydro, fix restart_map, zero_site=>init_site_vars + use numpft_ed + + M components/clm/src/main/decompInitMod.F90 --------- Set gi rather than ci for cohorts + M components/clm/src/main/subgridMod.F90 ------------ Add call subgrid_get_info_cohort, change subgrid_get_info_natveg call + M components/clm/src/main/histFileMod.F90 ----------- Change some of the parameter names, EDTypesMod interfaces get moved + to FatesInterfaceMod, nlevsclass_ed=>nlevsclass, maxpft=>numpft_ed, + M components/clm/src/main/controlMod.F90 ------------ Add new fates flags to namelist and broadcast/print them + M components/clm/src/main/clm_varctl.F90 ------------ New FATES flags, change ED=>FATES and some formatting + M components/clm/src/main/initGridCellsMod.F90 ------ ncohorts=>npatches + M components/clm/src/main/initVerticalMod.F90 ------- Remove call to ed_hist_scpfmaps + M components/clm/src/main/readParamsMod.F90 --------- Remove call to FatesReadParameters + M components/clm/src/biogeophys/CanopyFluxesMod.F90 - Add blank line + M components/clm/src/biogeophys/OzoneMod.F90 -------- Comment out setting of o3* variables to spval + + M components/clm/src/CMakeLists.txt -- Add fates/main to unit-test directories + +=============================================================== +=============================================================== +Tag name: clm4_5_18_r271 +Originator(s): erik (Erik Kluzek) +Date: Sat Jan 20 20:27:00 MST 2018 +One-line Summary: Update testlist to v2 and remove yellowstone + +Purpose of changes +------------------ + +Redo the testlist in version 2 format and remove yellowstone from it. Also update mosart and rtm with updated +test lists. The new testlist format also allows wallclock times to be set (and they are) so that they can run +in the queue faster. Change some files that referenced bugzilla ID's to github issue #'s. Update tools testing +for gen_domain to use version under cime/tools rather than the copy under clm. + +Bugs fixed or introduced +------------------------ + +Known bugs introduced in this tag (include github issue ID): + #216 -- PE layout for hcru_hcru + #213 -- CPLHIST case is matching the wrong CLM_NML_USE_CASE + #212 -- Can't use a non-fates restart file to interpolate to a simulation with fates + #211 -- Can't handle interpolating from a fates restart file because of the cohort dimension + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): None + +Changes to CLM's user interface (e.g., new/renamed XML or namelist variables): None + +Changes made to namelist defaults (e.g., changed parameter values): None + +Changes to the datasets (e.g., parameter, surface or initial files): None + +Substantial timing or memory changes: None + +Notes of particular relevance for developers: (including Code reviews and testing) +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + MEMLEAK, TPUTCOMP and MEMCOMP tests now seem to be robust and can be trusted. + +Changes to tests or testing: Test list completely redone + +Code reviewed by: self + +Did you follow the steps in .CLMTrunkChecklist: yes + +CLM testing: regular + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - PASS + + unit-tests (components/clm/src): + + cheyenne - PASS + + tools-tests (components/clm/test/tools): + + cheyenne - OK + + PTCLM testing (components/clm/tools/shared/PTCLM/test): + + cheyenne - OK + + regular tests (aux_clm): + + cheyenne_intel ---- OK + cheyenne_gnu ------ OK + hobart_nag -------- OK + hobart_pgi -------- PASS + hobart_intel ------ PASS + +CLM tag used for the baseline comparisons: clm4_5_18_r270 + + +Answer changes +-------------- + +Changes answers relative to baseline: no bit-for-bit, no source code changed + +Detailed list of changes +------------------------ + +List any svn externals directories updated (cime, rtm, mosart, cism, etc.): cime, mosart, rtm + cime to clm4518/n02/cime5.4.0-alpha.03 which allows CLM grids in testlist + mosart to mosart1_0_29 with redone test list in v2 format + rtm to rtm1_0_64 with redone test list in v2 format + +List all files eliminated: None + +List all files added and what they do: None + +List all existing files that have been modified, and describe the changes: + + M parse_cime.cs.status -- MEMLEAK, MEMCOMP, and TPUTCOMP don't need to be ignored anymore + + M .ChangeLog_template -- Remove bugzilla in place for github issue ids + + Update to test gen_domain under cime/tools rather than the copy under components/clm/tools/gen_domain + The copy won't be able to be done in the new github world. + M components/clm/test/tools/TBLCFGtools.sh ----- Set name of test directory by basename (so relative path can be passed in) + M components/clm/test/tools/input_tests_master - gen_domain path is relative to tools directory but under cime now + M components/clm/test/tools/test_driver.sh ----- Remove yellowstone set "--mpilib mpi-serial" for TOOLS CFG string + M components/clm/test/tools/TSMCFGtools.sh ----- Set name of test directory by basename + M components/clm/test/tools/TCBCFGtools.sh ----- Set name of test directory by basename + + M components/clm/bld/unit_testers/build-namelist_test.pl - Fix number of tests + + M components/clm/cime_config/testdefs/testlist_clm.xml ------- Completely redo in version 2 format + M components/clm/cime_config/testdefs/ExpectedTestFails.xml -- Update to github issues rather than bugzilla + +=============================================================== +=============================================================== Tag name: clm4_5_18_r270 Originator(s): sacks (Bill Sacks) Date: Wed Dec 20 12:04:25 MST 2017 diff --git a/doc/ChangeSum b/doc/ChangeSum index d7ca3328f2..d0df950aaf 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,7 @@ Tag Who Date Summary ============================================================================================================================ + clm4_5_18_r272 erik 01/25/2018 Bring in latest FATES release version to CLM trunk: fates_s1.4.1_a3.0.0_rev2 + clm4_5_18_r271 erik 01/20/2018 Update testlist to v2 and remove yellowstone clm4_5_18_r270 sacks 12/20/2017 Always use multiple elevation classes for glacier, even with stub glc clm4_5_18_r269 erik 12/16/2017 Move externals to version in github clm4_5_18_r268 erik 12/11/2017 Fix calculation of stomatal resistence used in dry-deposition, increase threshold of totvegc for soil decomposition to 0.1 diff --git a/parse_cime.cs.status b/parse_cime.cs.status index 7a7e285907..f41dfe8391 100755 --- a/parse_cime.cs.status +++ b/parse_cime.cs.status @@ -228,21 +228,10 @@ sub run_csstatus { if ( $over eq "NLFAIL" ) { $over = "PASS"; } - if ( $over eq "NLCOMP" ) { + elsif ( $over eq "NLCOMP" ) { $over = "PASS"; } - if ( $over eq "FAIL" && ($fails =~ /MEMLEAK/ || $fails =~ /TPUTCOMP/ || $fails =~ /MEMCOMP/) ) { - my $status = $fails; - $status =~ s/MEMLEAK//; - $status =~ s/TPUTCOMP//; - $status =~ s/MEMCOMP//; - $status =~ s/NLCOMP//; - $status =~ s/BASELINE//; - if ( $status =~ /^\s*$/ ) { - $over = "PASS"; - } - } - if ( $over eq "DIFF" ) { + elsif ( $over eq "DIFF" ) { if ( $bfail ) { $over = "FAIL_BDNE"; } else { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d392b1fb1..21f15b3aff 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,6 +36,7 @@ add_subdirectory(${CLM_ROOT}/src/biogeophys clm_biogeophys) add_subdirectory(${CLM_ROOT}/src/dyn_subgrid clm_dyn_subgrid) add_subdirectory(${CLM_ROOT}/src/main clm_main) add_subdirectory(${CLM_ROOT}/src/init_interp clm_init_interp) +add_subdirectory(${CLM_ROOT}/src/fates/main fates_main) # Add general unit test directories (stubbed out files, etc.) add_subdirectory(unit_test_stubs) diff --git a/src/biogeochem/CNCStateUpdate1Mod.F90 b/src/biogeochem/CNCStateUpdate1Mod.F90 index c19d122da9..fe9a21e773 100644 --- a/src/biogeochem/CNCStateUpdate1Mod.F90 +++ b/src/biogeochem/CNCStateUpdate1Mod.F90 @@ -73,7 +73,7 @@ subroutine CStateUpdateDynPatch(bounds, num_soilc_with_inactive, filter_soilc_wi do j = 1,nlevdecomp do fc = 1, num_soilc_with_inactive c = filter_soilc_with_inactive(fc) - if (.not. use_soil_matrixcn) then +! if (.not. use_soil_matrixcn) then cs_soil%decomp_cpools_vr_col(c,j,i_met_lit) = cs_soil%decomp_cpools_vr_col(c,j,i_met_lit) + & cf_veg%dwt_frootc_to_litr_met_c_col(c,j) * dt cs_soil%decomp_cpools_vr_col(c,j,i_cel_lit) = cs_soil%decomp_cpools_vr_col(c,j,i_cel_lit) + & @@ -82,16 +82,21 @@ subroutine CStateUpdateDynPatch(bounds, num_soilc_with_inactive, filter_soilc_wi cf_veg%dwt_frootc_to_litr_lig_c_col(c,j) * dt cs_soil%decomp_cpools_vr_col(c,j,i_cwd) = cs_soil%decomp_cpools_vr_col(c,j,i_cwd) + & ( cf_veg%dwt_livecrootc_to_cwdc_col(c,j) + cf_veg%dwt_deadcrootc_to_cwdc_col(c,j) ) * dt - else - cf_soil%matrix_input_col(c,j,i_met_lit) = cf_soil%matrix_input_col(c,j,i_met_lit) + & - cf_veg%dwt_frootc_to_litr_met_c_col(c,j) * dt - cf_soil%matrix_input_col(c,j,i_cel_lit) = cf_soil%matrix_input_col(c,j,i_cel_lit) + & - cf_veg%dwt_frootc_to_litr_cel_c_col(c,j) * dt - cf_soil%matrix_input_col(c,j,i_lig_lit) = cf_soil%matrix_input_col(c,j,i_lig_lit) + & - cf_veg%dwt_frootc_to_litr_lig_c_col(c,j) * dt - cf_soil%matrix_input_col(c,j,i_cwd) = cf_soil%matrix_input_col(c,j,i_cwd) + & - (cf_veg%dwt_livecrootc_to_cwdc_col(c,j) + cf_veg%dwt_deadcrootc_to_cwdc_col(c,j) ) * dt - end if !soil_matrix +! else + !print*,'matrix_input',c,j,i_met_lit + !print*,'cf_soil%matrix_input_col',cf_soil%matrix_input_col(c,j,i_met_lit) + !print*,'cf_veg%dwt_frootc_to_litr_met_c_col(c,j)',cf_veg%dwt_frootc_to_litr_met_c_col(c,j) +! if(j .eq. 1)print*,'before matrix input_DynPatch', cf_soil%matrix_input_col(c,j,i_met_lit),cf_veg%dwt_frootc_to_litr_met_c_col(c,j) * dt +! cf_soil%matrix_input_col(c,j,i_met_lit) = cf_soil%matrix_input_col(c,j,i_met_lit) + & +! cf_veg%dwt_frootc_to_litr_met_c_col(c,j) * dt +! cf_soil%matrix_input_col(c,j,i_cel_lit) = cf_soil%matrix_input_col(c,j,i_cel_lit) + & +! cf_veg%dwt_frootc_to_litr_cel_c_col(c,j) * dt +! cf_soil%matrix_input_col(c,j,i_lig_lit) = cf_soil%matrix_input_col(c,j,i_lig_lit) + & +! cf_veg%dwt_frootc_to_litr_lig_c_col(c,j) * dt +! cf_soil%matrix_input_col(c,j,i_cwd) = cf_soil%matrix_input_col(c,j,i_cwd) + & +! (cf_veg%dwt_livecrootc_to_cwdc_col(c,j) + cf_veg%dwt_deadcrootc_to_cwdc_col(c,j) ) * dt +! if(j .eq. 1)print*,'after matrix input_DynPatch', cf_soil%matrix_input_col(c,j,i_met_lit) +! end if !soil_matrix end do end do @@ -207,27 +212,34 @@ subroutine CStateUpdate1( num_soilc, filter_soilc, num_soilp, filter_soilp, & do j = 1,nlevdecomp do fc = 1,num_soilc c = filter_soilc(fc) -! if (.not. use_soil_matrixcn) then + if (.not. use_soil_matrixcn) then ! phenology and dynamic land cover fluxes ! if(j .eq. 1)print*,'before phenology c to lit,source,',cf_soil%decomp_cpools_sourcesink_col(c,j,i_met_lit),cf_veg%phenology_c_to_litr_met_c_col(c,j) *dt - cf_soil%decomp_cpools_sourcesink_col(c,j,i_met_lit) = & - cf_veg%phenology_c_to_litr_met_c_col(c,j) *dt - cf_soil%decomp_cpools_sourcesink_col(c,j,i_cel_lit) = & - cf_veg%phenology_c_to_litr_cel_c_col(c,j) *dt - cf_soil%decomp_cpools_sourcesink_col(c,j,i_lig_lit) = & - cf_veg%phenology_c_to_litr_lig_c_col(c,j) *dt + cf_soil%decomp_cpools_sourcesink_col(c,j,i_met_lit) = & + cf_veg%phenology_c_to_litr_met_c_col(c,j) *dt + cf_soil%decomp_cpools_sourcesink_col(c,j,i_cel_lit) = & + cf_veg%phenology_c_to_litr_cel_c_col(c,j) *dt + cf_soil%decomp_cpools_sourcesink_col(c,j,i_lig_lit) = & + cf_veg%phenology_c_to_litr_lig_c_col(c,j) *dt + ! if(j .eq. 1)print*,'after phenology c to lit,source,',cf_soil%decomp_cpools_sourcesink_col(c,j,i_met_lit) ! NOTE(wjs, 2017-01-02) This used to be set to a non-zero value, but the ! terms have been moved to CStateUpdateDynPatch. I think this is zeroed every ! time step, but to be safe, I'm explicitly setting it to zero here. - cf_soil%decomp_cpools_sourcesink_col(c,j,i_cwd) = 0._r8 -! else !use_soil_matrix -! cf_soil%decomp_cpools_sourcesink_col(c,j,i_met_lit) = 0._r8 -! cf_soil%decomp_cpools_sourcesink_col(c,j,i_cel_lit) = 0._r8 -! cf_soil%decomp_cpools_sourcesink_col(c,j,i_lig_lit) = 0._r8 -! cf_soil%decomp_cpools_sourcesink_col(c,j,i_cwd) = 0._r8 -! end if !soil_matrix + cf_soil%decomp_cpools_sourcesink_col(c,j,i_cwd) = 0._r8 + else +! if(j .eq. 1)print*,'matrix_input_col(c,j,i_met_lit)',c,j,cf_soil%matrix_input_col(c,j,i_met_lit),cf_veg%phenology_c_to_litr_met_c_col(c,j) *dt + cf_soil%matrix_input_col(c,j,i_met_lit) = & + cf_soil%matrix_input_col(c,j,i_met_lit) + cf_veg%phenology_c_to_litr_met_c_col(c,j) *dt + cf_soil%matrix_input_col(c,j,i_cel_lit) = & + cf_soil%matrix_input_col(c,j,i_cel_lit) + cf_veg%phenology_c_to_litr_cel_c_col(c,j) *dt + cf_soil%matrix_input_col(c,j,i_lig_lit) = & + cf_soil%matrix_input_col(c,j,i_lig_lit) + cf_veg%phenology_c_to_litr_lig_c_col(c,j) *dt + cf_soil%matrix_input_col(c,j,i_cwd) = & + cf_soil%matrix_input_col(c,j,i_cwd) + 0._r8 +! if(j .eq. 1)print*,'after phenology(c,j,i_met_lit)',cf_soil%matrix_input_col(c,j,i_met_lit) + end if end do end do else !use_fates @@ -285,7 +297,7 @@ subroutine CStateUpdate1( num_soilc, filter_soilc, num_soilp, filter_soilp, & c = patch%column(p) ! phenology: transfer growth fluxes if(abs(grc%londeg(patch%gridcell(p)) - 355._r8) .lt. 1 .and. abs(grc%latdeg(patch%gridcell(p)) - 6._r8) .lt. 1)then - print*,'in Phenology',p,cs_veg%deadcrootc_patch(p),patch%itype(p) + !print*,'in Phenology',p,cs_veg%deadcrootc_patch(p),patch%itype(p) end if if(.not. use_matrixcn)then cs_veg%leafc_patch(p) = cs_veg%leafc_patch(p) + cf_veg%leafc_xfer_to_leafc_patch(p)*dt diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index 7ddf8047b2..7c9feb8a25 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -1265,6 +1265,7 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, if ( use_fates ) then + call clm_fates%wrap_accumulatefluxes(nc,fn,filterp(1:fn)) call clm_fates%wrap_hydraulics_drive(bounds,nc,soilstate_inst, & waterstate_inst,waterflux_inst,solarabs_inst,energyflux_inst) diff --git a/src/biogeophys/OzoneMod.F90 b/src/biogeophys/OzoneMod.F90 index 4124ced958..29b94fa34f 100644 --- a/src/biogeophys/OzoneMod.F90 +++ b/src/biogeophys/OzoneMod.F90 @@ -381,6 +381,19 @@ subroutine CalcOzoneStress(this, bounds, num_exposedvegp, filter_exposedvegp, & tlai_old(p) = tlai(p) +! else +! ! FATES is fundamentlaly incompatible with this type of patch-level +! ! association with plant functional type, so for the time +! ! being, fates patches will just push these values to invalid +! o3uptakesha(p) = spval +! o3coefvsha(p) = spval +! o3coefgsha(p) = spval +! o3uptakesun(p) = spval +! o3coefvsun(p) = spval +! o3coefgsun(p) = spval +! +! end if + ! else ! ! FATES is fundamentlaly incompatible with this type of patch-level ! ! association with plant functional type, so for the time diff --git a/src/main/clm_driver.F90 b/src/main/clm_driver.F90 index 20ec1b78b1..f8bab25df2 100644 --- a/src/main/clm_driver.F90 +++ b/src/main/clm_driver.F90 @@ -392,6 +392,7 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate, ro ! Get time as of beginning of time step call get_prev_date(yr_prev, mon_prev, day_prev, sec_prev) ! if(bounds_clump%begp .le. 8428 .and. bounds_clump%endp .ge. 8428)print*,'prev_date,yr,mon,day,sec',yr_prev, mon_prev, day_prev, sec_prev + !print*,'prev_date,yr,mon,day,sec',yr_prev, mon_prev, day_prev, sec_prev !$OMP PARALLEL DO PRIVATE (nc,l,c, bounds_clump, downreg_patch, leafn_patch, agnpp_patch, bgnpp_patch, annsum_npp_patch, rr_patch, froot_carbon, croot_carbon) do nc = 1,nclumps diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 1f7ca04859..7540d1b71d 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -194,11 +194,19 @@ module clm_varctl logical, public :: is_outmatrix = .true. !.false. ! true => use acc spinup !---------------------------------------------------------- - ! fates switches + ! FATES switches !---------------------------------------------------------- - logical, public :: use_fates = .false. ! true => use ED - logical, public :: use_fates_spitfire = .false. ! true => use spitfire model + logical, public :: use_fates = .false. ! true => use fates + + ! These are INTERNAL to the FATES module + logical, public :: use_fates_spitfire = .false. ! true => use spitfire model + logical, public :: use_fates_logging = .false. ! true => turn on logging module + logical, public :: use_fates_planthydro = .false. ! true => turn on fates hydro + logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure + logical, public :: use_fates_ed_prescribed_phys = .false. ! true => prescribed physiology + logical, public :: use_fates_inventory_init = .false. ! true => initialize fates from inventory + character(len=256), public :: fates_inventory_ctrl_filename = '' ! filename for inventory control !---------------------------------------------------------- ! LUNA switches @@ -301,7 +309,7 @@ module clm_varctl logical, public :: hist_wrtch4diag = .false. !---------------------------------------------------------- - ! ED/FATES + ! FATES !---------------------------------------------------------- character(len=fname_len), public :: fates_paramfile = ' ' diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 917121c255..daa16205b7 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -210,7 +210,14 @@ subroutine control_init( ) namelist /clm_inparm/ use_c13, use_c14 - namelist /clm_inparm/ fates_paramfile, use_fates, use_fates_spitfire + ! FATES Flags + namelist /clm_inparm/ fates_paramfile, use_fates, & + use_fates_spitfire, use_fates_logging, & + use_fates_planthydro, use_fates_ed_st3, & + use_fates_ed_prescribed_phys, & + use_fates_inventory_init, & + fates_inventory_ctrl_filename + ! CLM 5.0 nitrogen flags namelist /clm_inparm/ use_flexibleCN, use_luna @@ -220,7 +227,7 @@ subroutine control_init( ) CNratio_floating, lnc_opt, reduce_dayl_factor, vcmax_opt, CN_residual_opt, & CN_partition_opt, CN_evergreen_phenology_opt, carbon_resp_opt - namelist /clm_inparm / use_lai_streams + namelist /clm_inparm/ use_lai_streams namelist /clm_inparm/ use_bedrock @@ -298,6 +305,7 @@ subroutine control_init( ) else call endrun(msg='ERROR finding clm_nitrogen namelist'//errMsg(sourcefile, __LINE__)) end if + call relavu( unitn ) ! ---------------------------------------------------------------------- @@ -613,6 +621,12 @@ subroutine control_spmd() call mpi_bcast (use_fates, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_spitfire, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_fates_logging, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_fates_planthydro, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_fates_ed_st3, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_fates_ed_prescribed_phys, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_fates_inventory_init, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (fates_inventory_ctrl_filename, len(fates_inventory_ctrl_filename), MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_paramfile, len(fates_paramfile) , MPI_CHARACTER, 0, mpicom, ier) ! flexibleCN nitrogen model @@ -938,7 +952,13 @@ subroutine control_print () write(iulog, *) ' use_fates = ', use_fates if (use_fates) then write(iulog, *) ' use_fates_spitfire = ', use_fates_spitfire + write(iulog, *) ' use_fates_logging = ', use_fates_logging write(iulog, *) ' fates_paramfile = ', fates_paramfile + write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro + write(iulog, *) ' use_fates_ed_st3 = ',use_fates_ed_st3 + write(iulog, *) ' use_fates_ed_prescribed_phys = ',use_fates_ed_prescribed_phys + write(iulog, *) ' use_fates_inventory_init = ',use_fates_inventory_init + write(iulog, *) ' fates_inventory_ctrl_filename = ',fates_inventory_ctrl_filename end if end subroutine control_print diff --git a/src/main/decompInitMod.F90 b/src/main/decompInitMod.F90 index e938c27d70..709c0b5e36 100644 --- a/src/main/decompInitMod.F90 +++ b/src/main/decompInitMod.F90 @@ -730,12 +730,11 @@ subroutine decompInit_glcp(lns,lni,lnj,glc_behavior) if ( use_fates ) then allocate(gindex(begCohort:endCohort)) ioff(:) = 0 - ci = begc + gi = begg do coi = begCohort,endCohort - if ( mod(coi, fates_maxElementsPerSite ) == 0 ) ci = ci + 1 - gi = col%gridcell(ci) ! convert column into gridcell gindex(coi) = coStart(gi) + ioff(gi) ioff(gi) = ioff(gi) + 1 + if ( mod(coi, fates_maxElementsPerSite ) == 0 ) gi = gi + 1 enddo locsize = endCohort-begCohort+1 globsize = numCohort diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index 778c436c93..14699ed28a 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -20,11 +20,12 @@ module histFileMod use LandunitType , only : lun use ColumnType , only : col use PatchType , only : patch - use ncdio_pio - use EDtypesMod , only : nlevsclass_ed, nlevage_ed - use EDtypesMod , only : nfsc, ncwd - use EDtypesMod , only : nlevleaf, nclmax, numpft_ed - use EDTypesMod , only : maxpft + use EDTypesMod , only : nclmax + use EDTypesMod , only : nlevleaf + use FatesInterfaceMod , only : nlevsclass, nlevage + use EDTypesMod , only : nfsc, ncwd + use FatesInterfaceMod , only : numpft_ed => numpft + use ncdio_pio ! implicit none @@ -1423,6 +1424,8 @@ subroutine hist_update_hbuf_field_2d (t, f, bounds, num2d) call hist_set_snow_field_2d(field, clmptr_ra(hpindex)%ptr, no_snow_behavior, type1d, & beg1d, end1d) else + !print*,'var name=',tape(t)%hlist(f)%field%name + !print*,'num2d',num2d field => clmptr_ra(hpindex)%ptr(:,1:num2d) field_allocated = .false. end if @@ -2029,13 +2032,13 @@ subroutine htape_create (t, histrest) call ncd_defdim( lnfid, 'levdcmp', nlevdecomp_full, dimid) if(use_fates)then - call ncd_defdim(lnfid, 'fates_levscag', nlevsclass_ed * nlevage_ed, dimid) - call ncd_defdim(lnfid, 'fates_levscls', nlevsclass_ed, dimid) - call ncd_defdim(lnfid, 'fates_levpft', maxpft, dimid) - call ncd_defdim(lnfid, 'fates_levage', nlevage_ed, dimid) + call ncd_defdim(lnfid, 'fates_levscag', nlevsclass * nlevage, dimid) + call ncd_defdim(lnfid, 'fates_levscls', nlevsclass, dimid) + call ncd_defdim(lnfid, 'fates_levpft', numpft_ed, dimid) + call ncd_defdim(lnfid, 'fates_levage', nlevage, dimid) call ncd_defdim(lnfid, 'fates_levfuel', nfsc, dimid) call ncd_defdim(lnfid, 'fates_levcwdsc', ncwd, dimid) - call ncd_defdim(lnfid, 'fates_levscpf', nlevsclass_ed*maxpft, dimid) + call ncd_defdim(lnfid, 'fates_levscpf', nlevsclass*numpft_ed, dimid) call ncd_defdim(lnfid, 'fates_levcan', nclmax, dimid) call ncd_defdim(lnfid, 'fates_levcnlf', nlevleaf * nclmax, dimid) call ncd_defdim(lnfid, 'fates_levcnlfpf', nlevleaf * nclmax * numpft_ed, dimid) @@ -2452,12 +2455,21 @@ subroutine htape_timeconst(t, mode) use domainMod , only : ldomain, lon1d, lat1d use clm_time_manager, only : get_nstep, get_curr_date, get_curr_time use clm_time_manager, only : get_ref_date, get_calendar, NO_LEAP_C, GREGORIAN_C - use EDTypesMod, only : fates_hdim_levsclass, fates_hdim_pfmap_levscpf, fates_hdim_scmap_levscpf - use EDTypesMod, only : fates_hdim_levage, fates_hdim_levpft - use EDTypesMod, only : fates_hdim_scmap_levscag, fates_hdim_agmap_levscag - use EDTypesMod, only : fates_hdim_levfuel, fates_hdim_levcwdsc - use EDTypesMod, only : fates_hdim_levcan, fates_hdim_canmap_levcnlf, fates_hdim_lfmap_levcnlf - use EDTypesMod, only : fates_hdim_canmap_levcnlfpf, fates_hdim_lfmap_levcnlfpf, fates_hdim_pftmap_levcnlfpf + use FatesInterfaceMod, only : fates_hdim_levsclass + use FatesInterfaceMod, only : fates_hdim_pfmap_levscpf + use FatesInterfaceMod, only : fates_hdim_scmap_levscpf + use FatesInterfaceMod, only : fates_hdim_levage + use FatesInterfaceMod, only : fates_hdim_levpft + use FatesInterfaceMod, only : fates_hdim_scmap_levscag + use FatesInterfaceMod, only : fates_hdim_agmap_levscag + use FatesInterfaceMod, only : fates_hdim_levfuel + use FatesInterfaceMod, only : fates_hdim_levcwdsc + use FatesInterfaceMod, only : fates_hdim_levcan + use FatesInterfaceMod, only : fates_hdim_canmap_levcnlf + use FatesInterfaceMod, only : fates_hdim_lfmap_levcnlf + use FatesInterfaceMod, only : fates_hdim_canmap_levcnlfpf + use FatesInterfaceMod, only : fates_hdim_lfmap_levcnlfpf + use FatesInterfaceMod, only : fates_hdim_pftmap_levcnlfpf ! ! !ARGUMENTS: integer, intent(in) :: t ! tape index @@ -4705,19 +4717,19 @@ subroutine hist_addfld2d (fname, type2d, units, avgflag, long_name, type1d_out, case ('levdcmp') num2d = nlevdecomp_full case ('fates_levscls') - num2d = nlevsclass_ed + num2d = nlevsclass case ('fates_levpft') - num2d = maxpft + num2d = numpft_ed case ('fates_levage') - num2d = nlevage_ed + num2d = nlevage case ('fates_levfuel') num2d = nfsc case ('fates_levcwdsc') num2d = ncwd case ('fates_levscpf') - num2d = nlevsclass_ed*maxpft + num2d = nlevsclass*numpft_ed case ('fates_levscag') - num2d = nlevsclass_ed*nlevage_ed + num2d = nlevsclass*nlevage case ('fates_levcan') num2d = nclmax case ('fates_levcnlf') diff --git a/src/main/initGridCellsMod.F90 b/src/main/initGridCellsMod.F90 index 8e1a140fa4..def9631a8a 100644 --- a/src/main/initGridCellsMod.F90 +++ b/src/main/initGridCellsMod.F90 @@ -234,7 +234,6 @@ subroutine set_landunit_veg_compete (ltype, gi, li, ci, pi) ! ! !LOCAL VARIABLES: integer :: m ! index - integer :: ncohorts integer :: npatches ! number of patches in landunit integer :: ncols integer :: nlunits @@ -245,7 +244,7 @@ subroutine set_landunit_veg_compete (ltype, gi, li, ci, pi) ! Set decomposition properties call subgrid_get_info_natveg(gi, & - ncohorts=ncohorts, npatches=npatches, ncols=ncols, nlunits=nlunits) + npatches=npatches, ncols=ncols, nlunits=nlunits) wtlunit2gcell = wt_lunit(gi, ltype) if (npatches > 0) then diff --git a/src/main/initVerticalMod.F90 b/src/main/initVerticalMod.F90 index 9a82b123f0..9ba2f2711c 100644 --- a/src/main/initVerticalMod.F90 +++ b/src/main/initVerticalMod.F90 @@ -28,7 +28,6 @@ module initVerticalMod use ColumnType , only : col use glcBehaviorMod , only : glc_behavior_type use SnowHydrologyMod , only : InitSnowLayers - use EDTypesMod , only : ed_hist_scpfmaps use abortUtils , only : endrun use ncdio_pio ! @@ -311,11 +310,6 @@ subroutine initVertical(bounds, glc_behavior, snow_depth, thick_wall, thick_roof end if end if - if(use_fates)then - call ed_hist_scpfmaps - end if - - ! Column level initialization for urban wall and roof layers and interfaces do l = bounds%begl,bounds%endl diff --git a/src/main/readParamsMod.F90 b/src/main/readParamsMod.F90 index f5776c2605..7fbea89531 100644 --- a/src/main/readParamsMod.F90 +++ b/src/main/readParamsMod.F90 @@ -43,8 +43,6 @@ subroutine readParameters (nutrient_competition_method, photosyns_inst) use NutrientCompetitionMethodMod , only : nutrient_competition_method_type use clm_varctl, only : NLFilename_in use PhotosynthesisMod , only : photosyns_type - - use CLMFatesParamInterfaceMod , only : FatesReadParameters ! ! !ARGUMENTS: type(photosyns_type) , intent(in) :: photosyns_inst @@ -104,8 +102,6 @@ subroutine readParameters (nutrient_competition_method, photosyns_inst) ! call ncd_pio_closefile(ncid) - call FatesReadParameters() - end subroutine readParameters end module readParamsMod diff --git a/src/main/subgridMod.F90 b/src/main/subgridMod.F90 index d8477a73d2..c5552cca5e 100644 --- a/src/main/subgridMod.F90 +++ b/src/main/subgridMod.F90 @@ -28,6 +28,7 @@ module subgridMod ! Routines to get info for each landunit: public :: subgrid_get_info_natveg + public :: subgrid_get_info_cohort public :: subgrid_get_info_urban_tbd public :: subgrid_get_info_urban_hd public :: subgrid_get_info_urban_md @@ -78,7 +79,7 @@ subroutine subgrid_get_gcellinfo (gi, glc_behavior, & nlunits = 0 ncohorts = 0 - call subgrid_get_info_natveg(gi, ncohorts, npatches_temp, ncols_temp, nlunits_temp) + call subgrid_get_info_natveg(gi, npatches_temp, ncols_temp, nlunits_temp) call accumulate_counters() call subgrid_get_info_urban_tbd(gi, npatches_temp, ncols_temp, nlunits_temp) @@ -103,6 +104,7 @@ subroutine subgrid_get_gcellinfo (gi, glc_behavior, & call subgrid_get_info_crop(gi, npatches_temp, ncols_temp, nlunits_temp) call accumulate_counters() + call subgrid_get_info_cohort(gi,ncohorts) contains subroutine accumulate_counters @@ -119,7 +121,7 @@ end subroutine accumulate_counters end subroutine subgrid_get_gcellinfo !----------------------------------------------------------------------- - subroutine subgrid_get_info_natveg(gi, ncohorts, npatches, ncols, nlunits) + subroutine subgrid_get_info_natveg(gi, npatches, ncols, nlunits) ! ! !DESCRIPTION: ! Obtain properties for natural vegetated landunit in this grid cell @@ -129,7 +131,6 @@ subroutine subgrid_get_info_natveg(gi, ncohorts, npatches, ncols, nlunits) ! ! !ARGUMENTS: integer, intent(in) :: gi ! grid cell index - integer, intent(out) :: ncohorts ! number of nat veg cohorts in this grid cell integer, intent(out) :: npatches ! number of nat veg patches in this grid cell integer, intent(out) :: ncols ! number of nat veg columns in this grid cell integer, intent(out) :: nlunits ! number of nat veg landunits in this grid cell @@ -150,18 +151,42 @@ subroutine subgrid_get_info_natveg(gi, ncohorts, npatches, ncols, nlunits) nlunits = 1 ncols = 1 + end subroutine subgrid_get_info_natveg + + ! ----------------------------------------------------------------------------- + + subroutine subgrid_get_info_cohort(gi, ncohorts) + ! + ! !DESCRIPTION: + ! Obtain cohort counts per each gridcell. + ! + ! !USES + use clm_varpar, only : natpft_size + ! + ! !ARGUMENTS: + integer, intent(in) :: gi ! grid cell index + integer, intent(out) :: ncohorts ! number of cohorts in this grid cell + ! + ! !LOCAL VARIABLES: + + character(len=*), parameter :: subname = 'subgrid_get_info_cohort' + !----------------------------------------------------------------------- + ! ------------------------------------------------------------------------- ! Number of cohorts is set here - ! fates cohorts (via FATES) populate all natural vegetation columns. - ! Current implementations mostly assume that only one column contains - ! natural vegetation, which is synonomous with the soil column. - ! For restart output however, we will allocate the cohort vector space - ! based on all columns. + ! FATES cohorts populate all natural vegetation columns. + ! There is only one natural vegetation column per grid-cell. So allocations + ! are mapped to the gridcell. In the future we may have more than one site + ! per gridcell, and we just multiply that factor here. + ! It is possible that there may be gridcells that don't have a naturally + ! vegetated column. That case should be fine, as the cohort + ! restart vector will just be a little sparse. ! ------------------------------------------------------------------------- + + ncohorts = fates_maxElementsPerSite + + end subroutine subgrid_get_info_cohort - ncohorts = ncols*fates_maxElementsPerSite - - end subroutine subgrid_get_info_natveg !----------------------------------------------------------------------- subroutine subgrid_get_info_urban_tbd(gi, npatches, ncols, nlunits) diff --git a/src/soilbiogeochem/CNSoilMatrixMod.F90 b/src/soilbiogeochem/CNSoilMatrixMod.F90 index c1fc7d72c5..2c773c85c2 100644 --- a/src/soilbiogeochem/CNSoilMatrixMod.F90 +++ b/src/soilbiogeochem/CNSoilMatrixMod.F90 @@ -275,11 +275,19 @@ subroutine CNSoilMatrix(bounds,num_soilc, filter_soilc, & tranvert = matmul(a_ma_vr,kk_ma_vr)-tri_ma_vr-kk_fire_vr !intermediate calculatio ntranvert = matmul(na_ma_vr,kk_ma_vr)-tri_ma_vr-kk_fire_vr !intermediate calculatio +! print*,'before matrix',matrix_Cinter(1+(i_met_lit-1)*nlevdecomp,1) + emulator_tmp=matmul(matmul(a_ma_vr,kk_ma_vr), matrix_Cinter)*dt +! print*,'transfer C',emulator_tmp(1+(i_met_lit-1)*nlevdecomp,1) + emulator_tmp=matmul(-tri_ma_vr, matrix_Cinter)*dt +! print*,'vertical transfer C',emulator_tmp(1+(i_met_lit-1)*nlevdecomp,1) + emulator_tmp=matmul(-kk_fire_vr, matrix_Cinter)*dt +! print*,'fire C',emulator_tmp(1+(i_met_lit-1)*nlevdecomp,1) matrix_Cinter_next(:,:) = matrix_Cinter + matrix_Cinput_vector + & matmul(tranvert, matrix_Cinter)*dt matrix_Ninter_next(:,:) = matrix_Ninter + matrix_Ninput_vector + & matmul(ntranvert,matrix_Ninter)*dt +! print*,'after matrix',matrix_Cinter_next(1+(i_met_lit-1)*nlevdecomp,1),matrix_Cinput_vector(1+(i_met_lit-1)*nlevdecomp,1) do j = 1,nlevdecomp do i=1,ndecomp_pools diff --git a/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 b/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 index e760ffc769..a66064350e 100644 --- a/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 @@ -605,6 +605,7 @@ subroutine InitCold(this, bounds) ! initialize fields for special filters + !print*,'special_col in SoilBiogeochemCarbonFluxType.F90',special_col call this%SetValues (num_column=num_special_col, filter_column=special_col, & value_column=0._r8) @@ -726,14 +727,16 @@ subroutine SetValues ( this, num_column, filter_column, value_column) ! for matrix do k = 1, ndecomp_pools do j = 1, nlevdecomp - do fi = 1,num_column - i = filter_column(fi) - this%matrix_a_tri_col(i,j) = value_column - this%matrix_b_tri_col(i,j) = value_column - this%matrix_c_tri_col(i,j) = value_column - this%matrix_input_col(i,j,k) = value_column - this%matrix_decomp_fire_k_col(i,j,k) = value_column - end do +! do fi = 1,num_column +! i = filter_column(fi) + !print*,'before setvalues,matrix_input_col',j,k,this%matrix_input_col(1,j,k) + this%matrix_a_tri_col(:,j) = value_column + this%matrix_b_tri_col(:,j) = value_column + this%matrix_c_tri_col(:,j) = value_column + this%matrix_input_col(:,j,k) = value_column + this%matrix_decomp_fire_k_col(:,j,k) = value_column + !print*,'after setvalues,matrix_input_col',j,k,this%matrix_input_col(1,j,k) +! end do end do end do do j = 1, nlevdecomp_full diff --git a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 index 941f8e57da..b728058e5e 100644 --- a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 @@ -636,7 +636,7 @@ subroutine InitCold(this, bounds, ratio, c12_soilbiogeochem_carbonstate_inst) end do ! initialize fields for special filters - +! print*,'special_col in SoilBiogeochemCarbonStateType.F90',special_col call this%SetValues (num_column=num_special_col, filter_column=special_col, value_column=0._r8) end subroutine InitCold @@ -1023,10 +1023,12 @@ subroutine SetValues ( this, num_column, filter_column, value_column) do k = 1, ndecomp_pools do fi = 1,num_column i = filter_column(fi) + !print*,'before setvalue this%decomp_cpools_vr_col(i,j,k)',i,k,j,this%decomp_cpools_vr_col(i,j,k) this%decomp_cpools_vr_col(i,j,k) = value_column this%matrix_cap_decomp_cpools_vr_col(i,j,k) = value_column this%matrix_pot_decomp_cpools_vr_col(i,j,k) = value_column this%decomp0_cpools_vr_col(i,j,k) = value_column + !print*,'after setvalue this%decomp_cpools_vr_col(i,j,k)',this%decomp_cpools_vr_col(i,j,k) end do end do end do diff --git a/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 b/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 index cc4f60b79b..0944244cc8 100644 --- a/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 @@ -1065,13 +1065,13 @@ subroutine SetValues ( this, & do k = 1, ndecomp_pools do j = 1, nlevdecomp - do fi = 1,num_column - i = filter_column(fi) - this%matrix_a_tri_col(i,j,k) = value_column - this%matrix_b_tri_col(i,j,k) = value_column - this%matrix_c_tri_col(i,j,k) = value_column - this%matrix_input_col(i,j,k) = value_column - end do +! do fi = 1,num_column +! i = filter_column(fi) + this%matrix_a_tri_col(:,j,k) = value_column + this%matrix_b_tri_col(:,j,k) = value_column + this%matrix_c_tri_col(:,j,k) = value_column + this%matrix_input_col(:,j,k) = value_column +! end do end do end do diff --git a/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 b/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 index bd3f578287..93ff854894 100644 --- a/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 @@ -159,7 +159,7 @@ subroutine InitAllocate(this, bounds) ! matrix ! allocate(this%matrix_npools_col (begc:endc,1:ndecomp_pools)) ; this%matrix_npools_col (:,:) = nan ! allocate(this%matrix_npools_vr_col(begc:endc,1:nlevdecomp_full,1:ndecomp_pools)); - this%matrix_npools_vr_col(:,:,:)= nan +! this%matrix_npools_vr_col(:,:,:)= nan end subroutine InitAllocate @@ -207,19 +207,19 @@ subroutine InitHistory(this, bounds) ! this%matrix_npools_col(begc:endc,:) = spval do l = 1, ndecomp_pools if ( nlevdecomp_full > 1 ) then - data2dptr => this%decomp_npools_vr_col(:,1:nlevdecomp,l) + data2dptr => this%decomp_npools_vr_col(:,:,l) fieldname = trim(decomp_cascade_con%decomp_pool_name_history(l))//'N_vr' longname = trim(decomp_cascade_con%decomp_pool_name_history(l))//' N (vertically resolved)' call hist_addfld2d (fname=fieldname, units='gN/m^3', type2d='levdcmp', & avgflag='A', long_name=longname, & ptr_col=data2dptr) - data2dptr => this%matrix_cap_decomp_npools_vr_col(:,1:nlevdecomp,l) + data2dptr => this%matrix_cap_decomp_npools_vr_col(:,:,l) fieldname = trim(decomp_cascade_con%decomp_pool_name_history(l))//'N_Cap_vr' longname = trim(decomp_cascade_con%decomp_pool_name_history(l))//' N capacity (vertically resolved)' call hist_addfld2d (fname=fieldname, units='gN/m^3', type2d='levdcmp', & avgflag='I', long_name=longname, & ptr_col=data2dptr) - data2dptr => this%matrix_pot_decomp_npools_vr_col(:,1:nlevdecomp,l) + data2dptr => this%matrix_pot_decomp_npools_vr_col(:,:,l) fieldname = trim(decomp_cascade_con%decomp_pool_name_history(l))//'N_Pot_vr' longname = trim(decomp_cascade_con%decomp_pool_name_history(l))//' N potential (vertically resolved)' call hist_addfld2d (fname=fieldname, units='gN/m^3', type2d='levdcmp', & @@ -1152,18 +1152,18 @@ subroutine DynamicColumnAdjustments(this, bounds, clump_index, column_state_upda end do end do !!!!!matrix!!!!!!!!!!!!!! - do l = 1, ndecomp_pools - do j = 1, nlevdecomp - call column_state_updater%update_column_state_no_special_handling( & - bounds = bounds, & - clump_index = clump_index, & - var = this%matrix_npools_vr_col(begc:endc, j, l), & - adjustment = adjustment_one_level(begc:endc)) - this%dyn_nbal_adjustments_col(begc:endc) = & - this%dyn_nbal_adjustments_col(begc:endc) + & - adjustment_one_level(begc:endc) * dzsoi_decomp(j) - end do - end do +! do l = 1, ndecomp_pools +! do j = 1, nlevdecomp +! call column_state_updater%update_column_state_no_special_handling( & +! bounds = bounds, & +! clump_index = clump_index, & +! var = this%matrix_npools_vr_col(begc:endc, j, l), & +! adjustment = adjustment_one_level(begc:endc)) +! this%dyn_nbal_adjustments_col(begc:endc) = & +! this%dyn_nbal_adjustments_col(begc:endc) + & +! adjustment_one_level(begc:endc) * dzsoi_decomp(j) +! end do +! end do do j = 1, nlevdecomp call column_state_updater%update_column_state_no_special_handling( & diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 72d02ad66d..fbbfbf99ea 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -45,12 +45,19 @@ module CLMFatesInterfaceMod use clm_varctl , only : iulog use clm_varctl , only : use_vertsoilc use clm_varctl , only : use_fates_spitfire + use clm_varctl , only : use_fates_planthydro + use clm_varctl , only : use_fates_ed_st3 + use clm_varctl , only : use_fates_ed_prescribed_phys + use clm_varctl , only : use_fates_logging + use clm_varctl , only : use_fates_inventory_init + use clm_varctl , only : fates_inventory_ctrl_filename + use clm_varcon , only : tfrz use clm_varcon , only : spval use clm_varcon , only : denice use clm_varcon , only : ispval - use clm_varpar , only : numpft + use clm_varpar , only : natpft_size use clm_varpar , only : numrad use clm_varpar , only : ivis use clm_varpar , only : inir @@ -102,15 +109,14 @@ module CLMFatesInterfaceMod use ChecksBalancesMod , only : SummarizeNetFluxes, FATES_BGC_Carbon_BalanceCheck use EDTypesMod , only : ed_patch_type use FatesHydraulicsMemMod , only : nlevsoi_hyd - use EDTypesMod , only : use_fates_plant_hydro use FatesInterfaceMod , only : hlm_numlevgrnd, hlm_numlevsoil, hlm_numlevdecomp_full use EDMainMod , only : ed_ecosystem_dynamics use EDMainMod , only : ed_update_site use EDInitMod , only : zero_site + use EDInitMod , only : init_site_vars use EDInitMod , only : init_patches use EDInitMod , only : set_site_properties use EDPftVarcon , only : EDpftvarcon_inst - use EDEcophysConType , only : EDecophysconInit use EDSurfaceRadiationMod , only : ED_SunShadeFracs, ED_Norman_Radiation use EDBtranMod , only : btran_ed, & get_active_suction_layers @@ -217,8 +223,8 @@ subroutine init(this, bounds_proc ) ! is not turned on ! --------------------------------------------------------------------------------- - use FatesInterfaceMod, only : FatesInterfaceInit - use EDTypesMod , only : numpft_ed + use FatesInterfaceMod, only : FatesInterfaceInit, FatesReportParameters + use FatesInterfaceMod, only : numpft_ed => numpft use FatesParameterDerivedMod, only : param_derived implicit none @@ -229,11 +235,16 @@ subroutine init(this, bounds_proc ) ! local variables integer :: nclumps ! Number of threads - logical :: verbose_output - integer :: pass_masterproc - integer :: pass_vertsoilc - integer :: pass_spitfire - integer :: pass_is_restart + logical :: verbose_output + integer :: pass_masterproc + integer :: pass_vertsoilc + integer :: pass_spitfire + integer :: pass_ed_st3 + integer :: pass_ed_prescribed_phys + integer :: pass_logging + integer :: pass_planthydro + integer :: pass_inventory_init + integer :: pass_is_restart integer :: nc ! thread index integer :: s ! FATES site index integer :: c ! HLM column index @@ -248,8 +259,11 @@ subroutine init(this, bounds_proc ) ! This involves to stages ! 1) allocate the vectors ! 2) add the history variables defined in clm_inst to the history machinery - call EDecophysconInit( EDpftvarcon_inst, numpft ) + + + ! Parameter Routines call param_derived%Init( numpft_ed ) + verbose_output = .false. call FatesInterfaceInit(iulog, verbose_output) @@ -278,6 +292,9 @@ subroutine init(this, bounds_proc ) call set_fates_ctrlparms('hlm_name',cval='CLM') call set_fates_ctrlparms('hio_ignore_val',rval=spval) call set_fates_ctrlparms('soilwater_ipedof',ival=get_ipedof(0)) + call set_fates_ctrlparms('max_patch_per_site',ival=(natpft_size-1)) ! RGK: FATES IGNORES + ! AND DOESNT TOUCH + ! THE BARE SOIL PATCH if(is_restart()) then pass_is_restart = 1 @@ -300,6 +317,44 @@ subroutine init(this, bounds_proc ) end if call set_fates_ctrlparms('use_spitfire',ival=pass_spitfire) + if(use_fates_ed_st3) then + pass_ed_st3 = 1 + else + pass_ed_st3 = 0 + end if + call set_fates_ctrlparms('use_ed_st3',ival=pass_ed_st3) + + if(use_fates_ed_prescribed_phys) then + pass_ed_prescribed_phys = 1 + else + pass_ed_prescribed_phys = 0 + end if + call set_fates_ctrlparms('use_ed_prescribed_phys',ival=pass_ed_prescribed_phys) + + if(use_fates_planthydro) then + pass_planthydro = 1 + else + pass_planthydro = 0 + end if + call set_fates_ctrlparms('use_planthydro',ival=pass_planthydro) + + if(use_fates_logging) then + pass_logging = 1 + else + pass_logging = 0 + end if + call set_fates_ctrlparms('use_logging',ival=pass_logging) + + if(use_fates_inventory_init) then + pass_inventory_init = 1 + else + pass_inventory_init = 0 + end if + call set_fates_ctrlparms('use_inventory_init',ival=pass_inventory_init) + + call set_fates_ctrlparms('inventory_ctrl_file',cval=fates_inventory_ctrl_filename) + + if(masterproc)then pass_masterproc = 1 else @@ -406,7 +461,7 @@ subroutine init(this, bounds_proc ) call this%init_soil_depths(nc) - if (use_fates_plant_hydro) call InitHydrSites(this%fates(nc)%sites) + if (use_fates_planthydro) call InitHydrSites(this%fates(nc)%sites) if( this%fates(nc)%nsites == 0 ) then @@ -434,6 +489,8 @@ subroutine init(this, bounds_proc ) call this%init_history_io(bounds_proc) + ! Report Fates Parameters (debug flag in lower level routines) + call FatesReportParameters(masterproc) end subroutine init @@ -575,7 +632,7 @@ subroutine dynamics_driv(this, nc, bounds_clump, & end do - if(use_fates_plant_hydro)then + if(use_fates_planthydro)then this%fates(nc)%bc_in(s)%hksat_sisl(1:nlevsoi) = soilstate_inst%hksat_col(c,1:nlevsoi) this%fates(nc)%bc_in(s)%watsat_sisl(1:nlevsoi) = soilstate_inst%watsat_col(c,1:nlevsoi) this%fates(nc)%bc_in(s)%watres_sisl(1:nlevsoi) = soilstate_inst%watres_col(c,1:nlevsoi) @@ -718,7 +775,7 @@ subroutine wrap_update_hlmfates_dyn(this, nc, bounds_clump, & ! ! Diagnose water storage in canopy if hydraulics is on ! ! This updates the internal value and the bc_out value. ! ! If hydraulics is off, it returns 0 storage - ! if ( use_fates_plant_hydro ) then + ! if ( use_fates_planthydro ) then ! call UpdateH2OVeg(this%fates(nc)%nsites, & ! this%fates(nc)%sites, & ! this%fates(nc)%bc_out) @@ -853,6 +910,7 @@ subroutine restart( this, bounds_proc, ncid, flag, waterstate_inst, & type(fates_bounds_type) :: fates_clump integer :: c ! HLM column index integer :: s ! Fates site index + integer :: g ! grid-cell index integer :: dk_index character(len=fates_long_string_length) :: ioname integer :: nvar @@ -907,16 +965,17 @@ subroutine restart( this, bounds_proc, ncid, flag, waterstate_inst, & end do !$OMP END PARALLEL DO - !$OMP PARALLEL DO PRIVATE (nc,s,c) + !$OMP PARALLEL DO PRIVATE (nc,s,c,g,bounds_clump) do nc = 1,nclumps - + + call get_clump_bounds(nc, bounds_clump) allocate(this%fates_restart%restart_map(nc)%site_index(this%fates(nc)%nsites)) allocate(this%fates_restart%restart_map(nc)%cohort1_index(this%fates(nc)%nsites)) do s=1,this%fates(nc)%nsites c = this%f2hmap(nc)%fcolumn(s) this%fates_restart%restart_map(nc)%site_index(s) = c - this%fates_restart%restart_map(nc)%cohort1_index(s) = & - bounds_proc%begCohort + (c-bounds_proc%begc)*fates_maxElementsPerSite + 1 + g = col%gridcell(c) + this%fates_restart%restart_map(nc)%cohort1_index(s) = (g-1)*fates_maxElementsPerSite + 1 end do end do @@ -1094,6 +1153,7 @@ subroutine init_coldstart(this, waterstate_inst, canopystate_inst, soilstate_ins call get_clump_bounds(nc, bounds_clump) do s = 1,this%fates(nc)%nsites + call init_site_vars(this%fates(nc)%sites(s)) call zero_site(this%fates(nc)%sites(s)) end do @@ -1104,7 +1164,7 @@ subroutine init_coldstart(this, waterstate_inst, canopystate_inst, soilstate_ins ! Called prior to init_patches(). Site level rhizosphere shells must ! be set prior to cohort initialization. ! ---------------------------------------------------------------------------- - if (use_fates_plant_hydro) then + if (use_fates_planthydro) then do s = 1,this%fates(nc)%nsites c = this%f2hmap(nc)%fcolumn(s) @@ -1136,7 +1196,7 @@ subroutine init_coldstart(this, waterstate_inst, canopystate_inst, soilstate_ins end do - if (use_fates_plant_hydro) call HydrSiteColdStart(this%fates(nc)%sites,this%fates(nc)%bc_in) + if (use_fates_planthydro) call HydrSiteColdStart(this%fates(nc)%sites,this%fates(nc)%bc_in) end if call init_patches(this%fates(nc)%nsites, this%fates(nc)%sites, & @@ -1470,9 +1530,8 @@ subroutine wrap_photosynthesis(this, nc, bounds, fn, filterp, & use perf_mod , only : t_startf, t_stopf use PatchType , only : patch use quadraticMod , only : quadratic - use EDTypesMod , only : numpft_ed, dinc_ed - use EDtypesMod , only : ed_patch_type, ed_cohort_type, ed_site_type, numpft_ed - use EDEcophysContype , only : EDecophyscon + use EDTypesMod , only : dinc_ed + use EDtypesMod , only : ed_patch_type, ed_cohort_type, ed_site_type ! ! !ARGUMENTS: @@ -2111,7 +2170,7 @@ subroutine ComputeRootSoilFlux(this, bounds_clump, num_filterc, filterc, & integer :: num_filter_fates - if( .not. use_fates_plant_hydro ) return + if( .not. use_fates_planthydro ) return nc = bounds_clump%clump_index @@ -2154,7 +2213,7 @@ end subroutine ComputeRootSoilFlux ! integer :: s ! integer :: c ! -! if (.not. (use_fates .and. use_fates_plant_hydro) ) return +! if (.not. (use_fates .and. use_fates_planthydro) ) return ! ! do s = 1, this%fates(nc)%nsites ! c = this%f2hmap(nc)%fcolumn(s) @@ -2193,7 +2252,7 @@ subroutine wrap_hydraulics_drive(this, bounds_clump, nc, & real(r8) :: dtime - if ( .not.use_fates_plant_hydro ) return + if ( .not.use_fates_planthydro ) return dtime = get_step_size() @@ -2262,10 +2321,10 @@ end subroutine wrap_hydraulics_drive subroutine hlm_bounds_to_fates_bounds(hlm, fates) use FatesIODimensionsMod, only : fates_bounds_type - use EDtypesMod, only : nlevsclass_ed, nlevage_ed + use FatesInterfaceMod, only : nlevsclass, nlevage use EDtypesMod, only : nfsc, ncwd - use EDtypesMod, only : nlevleaf, nclmax, numpft_ed - use EDTypesMod, only : maxpft + use EDtypesMod, only : nlevleaf, nclmax + use FatesInterfaceMod, only : numpft_ed => numpft use clm_varpar, only : nlevgrnd implicit none @@ -2286,19 +2345,19 @@ subroutine hlm_bounds_to_fates_bounds(hlm, fates) fates%ground_end = nlevgrnd fates%sizepft_class_begin = 1 - fates%sizepft_class_end = nlevsclass_ed * maxpft + fates%sizepft_class_end = nlevsclass * numpft_ed fates%size_class_begin = 1 - fates%size_class_end = nlevsclass_ed + fates%size_class_end = nlevsclass fates%pft_class_begin = 1 - fates%pft_class_end = maxpft + fates%pft_class_end = numpft_ed fates%age_class_begin = 1 - fates%age_class_end = nlevage_ed + fates%age_class_end = nlevage fates%sizeage_class_begin = 1 - fates%sizeage_class_end = nlevsclass_ed * nlevage_ed + fates%sizeage_class_end = nlevsclass * nlevage fates%fuel_begin = 1 fates%fuel_end = nfsc diff --git a/src/utils/clmfates_paraminterfaceMod.F90 b/src/utils/clmfates_paraminterfaceMod.F90 index ff70fc8c03..4fc12fdc31 100644 --- a/src/utils/clmfates_paraminterfaceMod.F90 +++ b/src/utils/clmfates_paraminterfaceMod.F90 @@ -223,7 +223,9 @@ subroutine ParametersFromNetCDF(filename, is_host_file, fates_params) size_dim_1 = dimension_sizes(1) size_dim_2 = dimension_sizes(2) case default + write(fates_log(),*) 'dimension shape:',dimension_shape call endrun(msg='unsupported number of dimensions reading parameters.') + end select write(fates_log(), *) 'clmfates_interfaceMod.F90:: reading '//trim(name) call readNcdio(ncid, name, dimension_shape, dimension_names, subname, data(1:size_dim_1, 1:size_dim_2)) diff --git a/test/tools/TBLCFGtools.sh b/test/tools/TBLCFGtools.sh index bd373f138d..e519ccdab1 100755 --- a/test/tools/TBLCFGtools.sh +++ b/test/tools/TBLCFGtools.sh @@ -11,7 +11,8 @@ if [ -z "$BL_ROOT" ] && [ -z "$BL_TESTDIR" ]; then exit 255 fi -test_name=TBLCFGtools.$1.$2.$3 +tool=$(basename $1) +test_name=TBLCFGtools.$tool.$2.$3 if [ -f ${CLM_TESTDIR}/${test_name}/TestStatus ]; then if grep -c PASS ${CLM_TESTDIR}/${test_name}/TestStatus > /dev/null; then @@ -47,7 +48,7 @@ if [ $? -ne 0 ]; then fi cd ${rundir} -echo "TBLCFGtools.sh: calling TSMCFGtools.sh to run $1 executable" +echo "TBLCFGtools.sh: calling TSMCFGtools.sh to run $tool executable" ${CLM_SCRIPTDIR}/TSMCFGtools.sh $1 $2 $3 rc=$? if [ $rc -ne 0 ]; then @@ -77,7 +78,7 @@ if [ -n "${BL_ROOT}" ]; then fi echo "TBLCFGtools.sh: starting b4b comparisons " -files_to_compare=`cd ${CLM_TESTDIR}/TSMCFGtools.$1.$2.$3; ls *.nc` +files_to_compare=`cd ${CLM_TESTDIR}/TSMCFGtools.$tool.$2.$3; ls *.nc` if [ -z "${files_to_compare}" ] && [ "$debug" != "YES" ]; then echo "TBLCFGtools.sh: error locating files to compare" echo "FAIL.job${JOBID}" > TestStatus @@ -89,8 +90,8 @@ for compare_file in ${files_to_compare}; do env CPRNC_OPT="-m" \ ${CLM_SCRIPTDIR}/CLM_compare.sh \ - ${BL_TESTDIR}/TSMCFGtools.$1.$2.$3/${compare_file} \ - ${CLM_TESTDIR}/TSMCFGtools.$1.$2.$3/${compare_file} + ${BL_TESTDIR}/TSMCFGtools.$tool.$2.$3/${compare_file} \ + ${CLM_TESTDIR}/TSMCFGtools.$tool.$2.$3/${compare_file} rc=$? mv cprnc.out cprnc.${compare_file}.out if [ $rc -eq 0 ]; then diff --git a/test/tools/TCBCFGtools.sh b/test/tools/TCBCFGtools.sh index bbdd6421c7..26a2795138 100755 --- a/test/tools/TCBCFGtools.sh +++ b/test/tools/TCBCFGtools.sh @@ -6,7 +6,8 @@ if [ $# -ne 2 ]; then exit 1 fi -test_name=TCBCFGtools.$1.$2 +tool=$(basename $1) +test_name=TCBCFGtools.$tool.$2 if [ -f ${CLM_TESTDIR}/${test_name}/TestStatus ]; then if grep -c PASS ${CLM_TESTDIR}/${test_name}/TestStatus > /dev/null; then @@ -31,7 +32,7 @@ if [ -f ${CLM_TESTDIR}/${test_name}/TestStatus ]; then fi fi -cfgdir=`ls -1d ${CLM_ROOT}/components/clm/tools/$1` +cfgdir=`ls -1d ${CLM_ROOT}/components/clm/tools/${1}*` blddir=${CLM_TESTDIR}/${test_name}/src if [ -d ${blddir} ]; then rm -r ${blddir} @@ -43,7 +44,7 @@ if [ $? -ne 0 ]; then fi cd ${blddir} -echo "TCBCFGtools.sh: building $1 executable; output in ${blddir}/test.log" +echo "TCBCFGtools.sh: building $tool executable; output in ${blddir}/test.log" # # Copy build files over # @@ -60,8 +61,8 @@ done < ${cfgdir}/src/Filepath # # Figure out configuration # -if [ ! -f ${CLM_SCRIPTDIR}/config_files/$1 ]; then - echo "TCB.sh: configure options file ${CLM_SCRIPTDIR}/config_files/$1 not found" +if [ ! -f ${CLM_SCRIPTDIR}/config_files/$tool ]; then + echo "TCB.sh: configure options file ${CLM_SCRIPTDIR}/config_files/$tool not found" echo "FAIL.job${JOBID}" > TestStatus exit 4 fi @@ -70,7 +71,7 @@ fi config_string=" " while read config_arg; do config_string="${config_string}${config_arg} " -done < ${CLM_SCRIPTDIR}/config_files/$1 +done < ${CLM_SCRIPTDIR}/config_files/$tool if [ "$TOOLSLIBS" != "" ]; then export SLIBS=$TOOLSLIBS diff --git a/test/tools/TSMCFGtools.sh b/test/tools/TSMCFGtools.sh index 6a8b97ad55..f65500a62d 100755 --- a/test/tools/TSMCFGtools.sh +++ b/test/tools/TSMCFGtools.sh @@ -6,7 +6,9 @@ if [ $# -ne 3 ]; then exit 1 fi -test_name=TSMCFGtools.$1.$2.$3 +tool=$(basename $1) +test_name=TSMCFGtools.$tool.$2.$3 + if [ -z "$CLM_RERUN" ]; then CLM_RERUN="no" @@ -35,7 +37,7 @@ if [ "$CLM_RERUN" != "yes" ] && [ -f ${CLM_TESTDIR}/${test_name}/TestStatus ]; t fi fi -cfgdir=`ls -1d ${CLM_ROOT}/components/clm/tools/$1` +cfgdir=`ls -1d ${CLM_ROOT}/components/clm/tools/${1}*` rundir=${CLM_TESTDIR}/${test_name} if [ -d ${rundir} ]; then rm -r ${rundir} @@ -47,7 +49,7 @@ if [ $? -ne 0 ]; then fi cd ${rundir} -echo "TSMCFGtools.sh: calling TCBCFGtools.sh to prepare $1 executable" +echo "TSMCFGtools.sh: calling TCBCFGtools.sh to prepare $tool executable" ${CLM_SCRIPTDIR}/TCBCFGtools.sh $1 $2 rc=$? if [ $rc -ne 0 ]; then @@ -56,15 +58,15 @@ if [ $rc -ne 0 ]; then exit 4 fi -echo "TSMCFGtools.sh: running $1 output in ${rundir}/test.log" +echo "TSMCFGtools.sh: running $tool output in ${rundir}/test.log" if [ "$2" = "CFGtools__o" ] || [ "$2" = "CFGtools__do" ]; then - toolrun="env OMP_NUM_THREADS=${CLM_THREADS} ${CLM_TESTDIR}/TCBCFGtools.$1.$2/$1" + toolrun="env OMP_NUM_THREADS=${CLM_THREADS} ${CLM_TESTDIR}/TCBCFGtools.$tool.$2/${tool}*" else - toolrun="${CLM_TESTDIR}/TCBCFGtools.$1.$2/$1" + toolrun="${CLM_TESTDIR}/TCBCFGtools.$tool.$2/${tool}*" fi -runfile="${CLM_SCRIPTDIR}/nl_files/$1.$3" +runfile="${CLM_SCRIPTDIR}/nl_files/$tool.$3" if [ ! -f "${runfile}" ]; then echo "TSMCFGtools.sh: error ${runfile} input run file not found" echo "FAIL.job${JOBID}" > TestStatus @@ -102,7 +104,7 @@ if [ $rc -eq 0 ] && grep -ci "Successfully created " test.log > /dev/null; then echo "TSMCFGtools.sh: smoke test passed" echo "$status" > TestStatus else - echo "TSMCFGtools.sh: error running $1, error= $rc" + echo "TSMCFGtools.sh: error running $tool, error= $rc" echo "TSMCFGtools.sh: see ${CLM_TESTDIR}/${test_name}/test.log for details" echo "FAIL.job${JOBID}" > TestStatus exit 6 diff --git a/test/tools/input_tests_master b/test/tools/input_tests_master index ca48c689a8..304409c6b7 100644 --- a/test/tools/input_tests_master +++ b/test/tools/input_tests_master @@ -3,10 +3,10 @@ smc#4 TSMscript_tools.sh mkprocdata_map mkprocdata_map_wrap mkprocdata_ne30_to_f19_I2000^tools__ds blc#4 TBLscript_tools.sh mkprocdata_map mkprocdata_map_wrap mkprocdata_ne30_to_f19_I2000^tools__ds -sme14 TSMCFGtools.sh gen_domain CFGtools__ds T31.runoptions -ble14 TBLCFGtools.sh gen_domain CFGtools__ds T31.runoptions -sme@4 TSMCFGtools.sh gen_domain CFGtools__ds ne30.runoptions -ble@4 TBLCFGtools.sh gen_domain CFGtools__ds ne30.runoptions +sme14 TSMCFGtools.sh ../../../../cime/tools/mapping/gen_domain CFGtools__ds T31.runoptions +ble14 TBLCFGtools.sh ../../../../cime/tools/mapping/gen_domain CFGtools__ds T31.runoptions +sme@4 TSMCFGtools.sh ../../../../cime/tools/mapping/gen_domain CFGtools__ds ne30.runoptions +ble@4 TBLCFGtools.sh ../../../../cime/tools/mapping/gen_domain CFGtools__ds ne30.runoptions smg54 TSMtools.sh mksurfdata_map tools__s namelist blg54 TBLtools.sh mksurfdata_map tools__s namelist diff --git a/test/tools/test_driver.sh b/test/tools/test_driver.sh index 198d1e9dd6..b37d7f8054 100755 --- a/test/tools/test_driver.sh +++ b/test/tools/test_driver.sh @@ -77,72 +77,7 @@ export MACH_WORKSPACE="/glade/scratch" export CPRNC_EXE="$CESMDATAROOT/tools/cime/tools/cprnc/cprnc.cheyenne" dataroot="$CESMDATAROOT" export TOOLSLIBS="" -export TOOLS_CONF_STRING="" - - -echo_arg="" - -EOF -##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to batch script ^^^^^^^^^^^^^^^^^^^ - ;; - ##yellowstone - ys* | caldera* | geyser* | pronghorn*) - submit_script="test_driver_yellowstone${cur_time}.sh" - -##vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv writing to batch script vvvvvvvvvvvvvvvvvvv -cat > ./${submit_script} << EOF -#!/bin/sh -# - -interactive="YES" -input_file="tests_pretag_yellowstone_nompi" -c_threads=16 - -export INITMODULES="/glade/apps/opt/lmod/lmod/init/sh" -. \$INITMODULES - -module purge -module load ncarenv/1.0 -module load ncarbinlibs/1.1 -module load perlmods -module load gmake/4.1 - -module load intel/15.0.3 -module load ncarcompilers/1.0 -module load netcdf/4.3.3.1 -module load pnetcdf/1.6.1 -module load mkl/11.1.2 - -module load nco -module load ncl -module load python -module load all-python-libs - - -##omp threads -if [ -z "\$CLM_THREADS" ]; then #threads NOT set on command line - export CLM_THREADS=\$c_threads -fi - -# Stop on first failed test -if [ -z "\$CLM_SOFF" ]; then #CLM_SOFF NOT set - export CLM_SOFF=FALSE -fi - -export CESM_MACH="yellowstone" -export CESM_COMP="intel" - -export NETCDF_DIR=\$NETCDF -export INC_NETCDF=\$NETCDF/include -export LIB_NETCDF=\$NETCDF/lib -export MAKE_CMD="gmake -j " -export CFG_STRING="" -export TOOLS_MAKE_STRING="USER_FC=ifort USER_LINKER=ifort USER_CPPDEFS=-DLINUX" -export MACH_WORKSPACE="/glade/scratch" -export CPRNC_EXE="$CESMDATAROOT/tools/cprnc/cprnc" -dataroot="$CESMDATAROOT" -export TOOLSLIBS="" -export TOOLS_CONF_STRING="" +export TOOLS_CONF_STRING="--mpilib mpi-serial" echo_arg=""