From 3868bdccb30c8d85042c8f0869cbbabf8e62d4c1 Mon Sep 17 00:00:00 2001 From: John Alex Date: Wed, 21 Jun 2023 11:16:14 -0600 Subject: [PATCH 01/17] Document that fincl1 maps to 'h0' history file. And fexcl1. --- src/main/histFileMod.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index 2497a14667..b6bda0cea6 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -90,6 +90,7 @@ module histFileMod character(len=max_namlen+2), public :: & hist_fincl1(max_flds) = ' ' ! namelist: list of fields to include in history tape 1 + ! aka 'h0' history file. character(len=max_namlen+2), public :: & hist_fincl2(max_flds) = ' ' ! namelist: list of fields to include in history tape 2 character(len=max_namlen+2), public :: & @@ -115,6 +116,7 @@ module histFileMod character(len=max_namlen+2), public :: & hist_fexcl1(max_flds) = ' ' ! namelist: list of fields to exclude from history tape 1 + ! aka 'h0' history file. character(len=max_namlen+2), public :: & hist_fexcl2(max_flds) = ' ' ! namelist: list of fields to exclude from history tape 2 character(len=max_namlen+2), public :: & From 694333f8f49aab356a41df18b0d69515c9e3ef83 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Sun, 20 Oct 2024 10:09:49 -0600 Subject: [PATCH 02/17] Transfer the following parameters from namelist to parameter file: Jmaxb1 (now called jmaxb1 and pft-dependent) upplim_destruct_metamorph maximum_leaf_wetted_fraction interception_fraction --- bld/CLMBuildNamelist.pm | 14 ---- bld/namelist_files/namelist_defaults_ctsm.xml | 18 +---- .../namelist_definition_ctsm.xml | 20 ----- bld/unit_testers/build-namelist_test.pl | 4 - src/biogeophys/CanopyHydrologyMod.F90 | 18 ++--- src/biogeophys/LunaMod.F90 | 80 +++---------------- src/biogeophys/SnowHydrologyMod.F90 | 11 +-- src/main/controlMod.F90 | 2 - src/main/pftconMod.F90 | 6 ++ 9 files changed, 36 insertions(+), 137 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index b881cdbfac..4d8ad454ba 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -3603,17 +3603,6 @@ sub setup_logic_luna { if ( &value_is_true($nl->get_value('lnc_opt') ) && not &value_is_true( $nl_flags->{'use_cn'}) ) { $log->fatal_error("Cannot turn lnc_opt to true when bgc=sp" ); } - my $var = "jmaxb1"; - if ( &value_is_true( $nl_flags->{'use_luna'} ) ) { - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, - 'use_luna'=>$nl_flags->{'use_luna'} ); - } - my $val = $nl->get_value($var); - if ( ! &value_is_true( $nl_flags->{'use_luna'} ) ) { - if ( defined($val) ) { - $log->fatal_error("Cannot set $var when use_luna is NOT on" ); - } - } } #------------------------------------------------------------------------------- @@ -4523,8 +4512,6 @@ sub setup_logic_canopyhydrology { # my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'interception_fraction' ); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'maximum_leaf_wetted_fraction' ); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_clm5_fpi' ); } @@ -4543,7 +4530,6 @@ sub setup_logic_snowpack { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'wind_dependent_snow_density'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'snow_overburden_compaction_method'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'lotmp_snowdensity_method'); - add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'upplim_destruct_metamorph'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'reset_snow'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'reset_snow_glc'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'reset_snow_glc_ela'); diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 650b21cb8d..8eb8e2cccb 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -413,11 +413,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. -1.0 -0.05 .false. -0.25 -1.0 1 @@ -493,9 +489,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 'Slater2017' 'TruncatedAnderson1976' -175.d00 -100.d00 - 0.08d00 .false. @@ -551,10 +544,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -lnd/clm2/paramdata/ctsm60_params.c240822.nc -lnd/clm2/paramdata/ctsm51_params.c240814.nc -lnd/clm2/paramdata/clm50_params.c240814.nc -lnd/clm2/paramdata/clm45_params.c240814.nc +/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm60_params.c241017.nc +/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm51_params.c241017.nc +/glade/campaign/cgd/tss/people/oleson/modify_param/clm50_params.c241017.nc +/glade/campaign/cgd/tss/people/oleson/modify_param/clm45_params.c241017.nc @@ -605,9 +598,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. .true. - -0.17 - unset diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 417444914e..01fc6587ec 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -404,21 +404,11 @@ Max number of iterations used in subr. CanopyFluxes. For many years, 40 was the Default: 40 - -Fraction of intercepted precipitation - - If TRUE use clm5 equation for fraction of intercepted precipitation - -Maximum fraction of leaf that may be wet prior to drip occuring - - Scalar multiplier for base flow rate @@ -712,11 +702,6 @@ Scalar of leaf respiration to vcmax The maximum value to use for zeta under stable conditions - -baseline proportion of nitrogen allocated for electron transport (J) - - Toggle to turn on the FATES model @@ -2839,11 +2824,6 @@ TruncatedAnderson1976 -- Truncate the Anderson-1976 equation at the value for -1 Slater2017 ------------- Use equation from Slater that increases snow density for very cold temperatures (Arctic, Antarctic) - -Upper Limit on Destructive Metamorphism Compaction [kg/m3] - - Snow compaction overburden exponential factor (1/K) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 096409065f..64126ab347 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -1235,10 +1235,6 @@ sub cat_and_create_namelistinfile { namelst=>"use_luna=.true., lnc_opt=.true.", phys=>"clm5_0", }, - "NOlunabutsetJmaxb1" =>{ options=>"-envxml_dir . -bgc sp", - namelst=>"use_luna=.false., jmaxb1=1.0", - phys=>"clm5_0", - }, "envxml_not_dir" =>{ options=>"-envxml_dir myuser_nl_clm", namelst=>"", phys=>"clm5_0", diff --git a/src/biogeophys/CanopyHydrologyMod.F90 b/src/biogeophys/CanopyHydrologyMod.F90 index 9ce9995ce6..166aa6d53d 100644 --- a/src/biogeophys/CanopyHydrologyMod.F90 +++ b/src/biogeophys/CanopyHydrologyMod.F90 @@ -49,6 +49,8 @@ module CanopyHydrologyMod real(r8) :: snow_canopy_storage_scalar ! Canopy-storage-of-snow parameter (kg/m2) real(r8) :: snowcan_unload_temp_fact ! Temperature canopy snow unload scaling (C2 in Eq. 14, Roesch et al. 2001) (K*s) real(r8) :: snowcan_unload_wind_fact ! Wind canopy snow unload scaling (modifies 1.56e5, where 1.56e5 is C3 in Eq. 15, Roesch et al. 2001) (-) + real(r8) :: interception_fraction ! Fraction of intercepted precipitation (-) + real(r8) :: maximum_leaf_wetted_fraction ! Maximum fraction of leaf that may be wet (-) end type params_type type(params_type), private :: params_inst ! @@ -67,8 +69,6 @@ module CanopyHydrologyMod private :: BulkDiag_FracWet ! Determine fraction of vegetated surface that is wet ! ! !PRIVATE DATA MEMBERS: - real(r8) :: interception_fraction ! Fraction of intercepted precipitation - real(r8) :: maximum_leaf_wetted_fraction ! Maximum fraction of leaf that may be wet logical, private :: use_clm5_fpi = .false. ! use clm5 fpi equation character(len=*), parameter, private :: sourcefile = & @@ -99,8 +99,6 @@ subroutine CanopyHydrology_readnl( NLFilename ) character(len=32) :: subname = 'CanopyHydrology_readnl' ! subroutine name !----------------------------------------------------------------------- namelist /clm_canopyhydrology_inparm/ & - interception_fraction, & - maximum_leaf_wetted_fraction, & use_clm5_fpi ! ---------------------------------------------------------------------- @@ -125,15 +123,11 @@ subroutine CanopyHydrology_readnl( NLFilename ) end if ! Broadcast namelist variables read in - call shr_mpi_bcast(interception_fraction, mpicom) - call shr_mpi_bcast(maximum_leaf_wetted_fraction, mpicom) call shr_mpi_bcast(use_clm5_fpi, mpicom) if (masterproc) then write(iulog,*) ' ' write(iulog,*) 'canopyhydrology settings:' - write(iulog,*) ' interception_fraction = ',interception_fraction - write(iulog,*) ' maximum_leaf_wetted_fraction = ',maximum_leaf_wetted_fraction write(iulog,*) ' use_clm5_fpi = ',use_clm5_fpi endif @@ -162,6 +156,10 @@ subroutine readParams( ncid ) call readNcdioScalar(ncid, 'snowcan_unload_temp_fact', subname, params_inst%snowcan_unload_temp_fact) ! Wind canopy snow unload scaling (modifies 1.56e5, where 1.56e5 is C3 in Eq. 15, Roesch et al. 2001) (-) call readNcdioScalar(ncid, 'snowcan_unload_wind_fact', subname, params_inst%snowcan_unload_wind_fact) + ! Fraction of intercepted precipitation (-) + call readNcdioScalar(ncid, 'interception_fraction', subname, params_inst%interception_fraction) + ! Maximum fraction of leaf that may be wet (-) + call readNcdioScalar(ncid, 'maximum_leaf_wetted_fraction', subname, params_inst%maximum_leaf_wetted_fraction) end subroutine readParams @@ -535,7 +533,7 @@ subroutine BulkFlux_CanopyInterceptionAndThroughfall(bounds, num_nolakep, filter if (check_point_for_interception_and_excess(p)) then ! Coefficient of interception if (use_clm5_fpi) then - fpiliq = interception_fraction * tanh(elai(p) + esai(p)) + fpiliq = params_inst%interception_fraction * tanh(elai(p) + esai(p)) else fpiliq = 0.25_r8*(1._r8 - exp(-0.5_r8*(elai(p) + esai(p)))) end if @@ -1170,7 +1168,7 @@ subroutine BulkDiag_FracWet(bounds, num_soilp, filter_soilp, & if (h2ocan > 0._r8) then vegt = frac_veg_nosno(p)*(elai(p) + esai(p)) fwet(p) = (h2ocan / (vegt * params_inst%liq_canopy_storage_scalar))**0.666666666666_r8 - fwet(p) = min (fwet(p),maximum_leaf_wetted_fraction) ! Check for maximum limit of fwet + fwet(p) = min (fwet(p),params_inst%maximum_leaf_wetted_fraction) ! Check for maximum limit of fwet if (snocan(p) > 0._r8) then fcansno(p) = (snocan(p) / (vegt * params_inst%snow_canopy_storage_scalar))**0.15_r8 ! must match snocanmx fcansno(p) = min (fcansno(p),1.0_r8) diff --git a/src/biogeophys/LunaMod.F90 b/src/biogeophys/LunaMod.F90 index dbd39daedf..3f5f7d0e3c 100644 --- a/src/biogeophys/LunaMod.F90 +++ b/src/biogeophys/LunaMod.F90 @@ -12,7 +12,7 @@ module LunaMod use clm_varcon , only : rgas, tfrz,spval use abortutils , only : endrun use clm_varctl , only : iulog - use clm_varpar , only : nlevcan + use clm_varpar , only : nlevcan, mxpft use decompMod , only : bounds_type, subgrid_level_patch use pftconMod , only : pftcon use FrictionvelocityMod , only : frictionvel_type @@ -33,7 +33,6 @@ module LunaMod !------------------------------------------------------------------------------ ! PUBLIC MEMBER FUNCTIONS: - public :: LunaReadNML !subroutine to read in the Luna namelist public :: Update_Photosynthesis_Capacity !subroutine to update the canopy nitrogen profile public :: Acc24_Climate_LUNA !subroutine to accumulate 24 hr climates public :: Acc240_Climate_LUNA !subroutine to accumulate 10 day climates @@ -78,7 +77,6 @@ module LunaMod real(r8), parameter :: CO2ref = 380.0_r8 ! reference CO2 concentration for calculation of reference NUE. real(r8), parameter :: forc_pbot_ref = 101325.0_r8 ! reference air pressure for calculation of reference NUE real(r8), parameter :: Q10Enz = 2.0_r8 ! Q10 value for enzyme decay rate - real(r8) :: Jmaxb1 = 0.1_r8 ! the baseline proportion of nitrogen allocated for electron transport (J) real(r8), parameter :: NMCp25 = 0.715_r8 ! estimated by assuming 80% maintenance respiration is used for photosynthesis enzyme maintenance real(r8), parameter :: Trange1 = 5.0_r8 ! lower temperature limit (oC) for nitrogen optimization real(r8), parameter :: Trange2 = 42.0_r8 ! upper temperature limit (oC) for nitrogen optimization @@ -92,70 +90,11 @@ module LunaMod contains - !********************************************************************************************************************************************************************** - ! Read in LUNA namelist - subroutine LunaReadNML( NLFilename ) - ! - ! !DESCRIPTION: - ! Read the namelist for LUNA - ! - ! !USES: - use fileutils , only : getavu, relavu, opnfil - use shr_nl_mod , only : shr_nl_find_group_name - use spmdMod , only : masterproc, mpicom - use shr_mpi_mod , only : shr_mpi_bcast - use clm_varctl , only : iulog - use shr_log_mod , only : errMsg => shr_log_errMsg - use abortutils , only : endrun - ! - ! !ARGUMENTS: - character(len=*), intent(in) :: NLFilename ! Namelist filename - ! - ! !LOCAL VARIABLES: - integer :: ierr ! error code - integer :: unitn ! unit for namelist file - - character(len=*), parameter :: subname = 'lunaReadNML' - character(len=*), parameter :: nmlname = 'luna' - !----------------------------------------------------------------------- - namelist /luna/ Jmaxb1 - - ! Initialize options to default values, in case they are not specified in - ! the namelist - - - if (masterproc) then - unitn = getavu() - write(iulog,*) 'Read in '//nmlname//' namelist' - call opnfil (NLFilename, unitn, 'F') - call shr_nl_find_group_name(unitn, nmlname, status=ierr) - if (ierr == 0) then - read(unitn, nml=luna, iostat=ierr) - if (ierr /= 0) then - call endrun(msg="ERROR reading "//nmlname//"namelist"//errmsg(__FILE__, __LINE__)) - end if - else - call endrun(msg="ERROR could NOT find "//nmlname//"namelist"//errmsg(__FILE__, __LINE__)) - end if - call relavu( unitn ) - end if - - call shr_mpi_bcast (Jmaxb1, mpicom) - - if (masterproc) then - write(iulog,*) ' ' - write(iulog,*) nmlname//' settings:' - write(iulog,nml=luna) - write(iulog,*) ' ' - end if - - end subroutine lunaReadNML - !---------------------------------------------------------------------------- subroutine readParams( ncid ) ! ! !USES: - use ncdio_pio, only: file_desc_t + use ncdio_pio, only: file_desc_t,ncd_io use paramUtilMod, only: readNcdioScalar ! ! !ARGUMENTS: @@ -164,6 +103,10 @@ subroutine readParams( ncid ) ! ! !LOCAL VARIABLES: character(len=*), parameter :: subname = 'readParams_Luna' + character(len=100) :: errCode = '-Error reading in parameters file:' + logical :: readv ! has variable been read in or not + real(r8) :: temp1d(0:mxpft) ! temporary to read in parameter + character(len=100) :: tString ! temp. var for reading !-------------------------------------------------------------------- ! CO2 compensation point at 25°C at present day O2 levels @@ -314,6 +257,7 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & c3psn => pftcon%c3psn , & ! photosynthetic pathway: 0. = c4, 1. = c3 slatop => pftcon%slatop , & ! specific leaf area at top of canopy, projected area basis [m^2/gC] leafcn => pftcon%leafcn , & ! leaf C:N (gC/gN) + jmaxb1 => pftcon%jmaxb1 , & ! Coefficient determining the response of electron transport rate to light availability (-) forc_pbot10 => atm2lnd_inst%forc_pbot240_downscaled_patch , & ! Input: [real(r8) (:) ] 10 day mean atmospheric pressure(Pa) CO2_p240 => atm2lnd_inst%forc_pco2_240_patch , & ! Input: [real(r8) (:) ] 10-day mean CO2 partial pressure (Pa) O2_p240 => atm2lnd_inst%forc_po2_240_patch , & ! Input: [real(r8) (:) ] 10-day mean O2 partial pressure (Pa) @@ -439,8 +383,8 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & PNcbold = 0.0_r8 call NitrogenAllocation(FNCa,forc_pbot10(p), relh10, CO2a10, O2a10, PARi10, PARimx10, rb10v, hourpd, & tair10, tleafd10, tleafn10, & - Jmaxb1, PNlcold, PNetold, PNrespold, PNcbold, dayl_factor(p), o3coefjmax(p), & - PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) + jmaxb1(ft), PNlcold, PNetold, PNrespold, PNcbold, dayl_factor(p), & + o3coefjmax(p), PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) vcmx25_opt= PNcbopt * FNCa * Fc25 jmx25_opt= PNetopt * FNCa * Fj25 @@ -825,7 +769,7 @@ end subroutine Clear24_Climate_LUNA !************************************************************************************************************************************************ !Use the LUNA model to calculate the Nitrogen partioning subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PARimx10,rb10, hourpd, tair10, tleafd10, tleafn10, & - Jmaxb1, PNlcold, PNetold, PNrespold, PNcbold, dayl_factor,o3coefjmax, & + jmaxb1, PNlcold, PNetold, PNrespold, PNcbold, dayl_factor,o3coefjmax, & PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) implicit none real(r8), intent (in) :: FNCa !Area based functional nitrogen content (g N/m2 leaf) @@ -840,7 +784,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR real(r8), intent (in) :: tair10 !10-day running mean of the 2m temperature (oC) real(r8), intent (in) :: tleafd10 !10-day running mean of daytime leaf temperature (oC) real(r8), intent (in) :: tleafn10 !10-day running mean of nighttime leaf temperature (oC) - real(r8), intent (in) :: Jmaxb1 !coefficient determining the response of electron transport rate to light availability (unitless) + real(r8), intent (in) :: jmaxb1 !coefficient determining the response of electron transport rate to light availability (unitless) real(r8), intent (in) :: PNlcold !old value of the proportion of nitrogen allocated to light capture (unitless) real(r8), intent (in) :: PNetold !old value of the proportion of nitrogen allocated to electron transport (unitless) real(r8), intent (in) :: PNrespold !old value of the proportion of nitrogen allocated to respiration (unitless) @@ -928,7 +872,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR tleafd10c = min(max(tleafd10, Trange1), Trange2) !constrain the physiological range tleafn10c = min(max(tleafn10, Trange1), Trange2) !constrain the physiological range ci = 0.7_r8 * CO2a10 - JmaxCoef = Jmaxb1 * dayl_factor * (1.0_r8 - exp(-params_inst%relhExp * max(relh10 - & + JmaxCoef = jmaxb1 * dayl_factor * (1.0_r8 - exp(-params_inst%relhExp * max(relh10 - & params_inst%minrelh, 0.0_r8) / (1.0_r8 - params_inst%minrelh))) do while (PNlcoldi .NE. PNlc .and. jj < 100) Fc = VcmxTKattge(tair10, tleafd10c) * Fc25 diff --git a/src/biogeophys/SnowHydrologyMod.F90 b/src/biogeophys/SnowHydrologyMod.F90 index 9fb1a52dbc..57e9088ece 100644 --- a/src/biogeophys/SnowHydrologyMod.F90 +++ b/src/biogeophys/SnowHydrologyMod.F90 @@ -87,6 +87,7 @@ module SnowHydrologyMod real(r8) :: scvng_fct_mlt_dst4 ! scavenging factor for dust species 4 inclusion in meltwater [frc] real(r8) :: ceta ! Overburden compaction constant (kg/m3) real(r8) :: snw_rds_min ! minimum allowed snow effective radius (also cold "fresh snow" value) [microns] + real(r8) :: upplim_destruct_metamorph ! Upper limit on destructive metamorphism compaction end type params_type type(params_type), private :: params_inst @@ -151,7 +152,6 @@ module SnowHydrologyMod integer :: overburden_compaction_method = -1 integer :: new_snow_density = LoTmpDnsSlater2017 ! Snow density type - real(r8) :: upplim_destruct_metamorph = 100.0_r8 ! Upper Limit on Destructive Metamorphism Compaction [kg/m3] real(r8) :: overburden_compress_Tfactor = 0.08_r8 ! snow compaction overburden exponential factor (1/K) ! ------------------------------------------------------------------------ @@ -211,8 +211,7 @@ subroutine SnowHydrology_readnl( NLFilename) namelist /clm_snowhydrology_inparm/ & wind_dependent_snow_density, snow_overburden_compaction_method, & - lotmp_snowdensity_method, upplim_destruct_metamorph, & - overburden_compress_Tfactor, & + lotmp_snowdensity_method, overburden_compress_Tfactor, & reset_snow, reset_snow_glc, reset_snow_glc_ela, & snow_dzmin_1, snow_dzmax_l_1, snow_dzmax_u_1, & snow_dzmin_2, snow_dzmax_l_2, snow_dzmax_u_2 @@ -246,7 +245,6 @@ subroutine SnowHydrology_readnl( NLFilename) call shr_mpi_bcast (wind_dependent_snow_density, mpicom) call shr_mpi_bcast (snow_overburden_compaction_method, mpicom) call shr_mpi_bcast (lotmp_snowdensity_method , mpicom) - call shr_mpi_bcast (upplim_destruct_metamorph , mpicom) call shr_mpi_bcast (overburden_compress_Tfactor, mpicom) call shr_mpi_bcast (reset_snow , mpicom) call shr_mpi_bcast (reset_snow_glc , mpicom) @@ -333,6 +331,8 @@ subroutine readParams( ncid ) call readNcdioScalar(ncid, 'ceta', subname, params_inst%ceta) ! minimum allowed snow effective radius (also cold "fresh snow" value) [microns] call readNcdioScalar(ncid, 'snw_rds_min', subname, params_inst%snw_rds_min) + ! Upper limit on destructive metamorphism compaction (kg/m3) + call readNcdioScalar(ncid, 'upplim_destruct_metamorph', subname, params_inst%upplim_destruct_metamorph) end subroutine readParams @@ -1972,7 +1972,8 @@ subroutine SnowCompaction(bounds, num_snowc, filter_snowc, & ! Settling as a result of destructive metamorphism ddz1 = -c3*dexpf - if (bi > upplim_destruct_metamorph) ddz1 = ddz1*exp(-46.0e-3_r8*(bi-upplim_destruct_metamorph)) + if (bi > params_inst%upplim_destruct_metamorph) ddz1 = & + ddz1*exp(-46.0e-3_r8*(bi-params_inst%upplim_destruct_metamorph)) ! Liquid water term diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index f65c8c7f47..3b2409344d 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -119,7 +119,6 @@ subroutine control_init(dtime) ! ! !USES: use CNMRespMod , only : CNMRespReadNML - use LunaMod , only : LunaReadNML use CNNDynamicsMod , only : CNNDynamicsReadNML use CNPhenologyMod , only : CNPhenologyReadNML use landunit_varcon , only : max_lunit @@ -584,7 +583,6 @@ subroutine control_init(dtime) call SnowHydrology_readnl ( NLFilename ) call UrbanReadNML ( NLFilename ) call HumanIndexReadNML ( NLFilename ) - call LunaReadNML ( NLFilename ) ! ---------------------------------------------------------------------- ! Broadcast all control information if appropriate diff --git a/src/main/pftconMod.F90 b/src/main/pftconMod.F90 index b987879c03..4f8a7f16fc 100644 --- a/src/main/pftconMod.F90 +++ b/src/main/pftconMod.F90 @@ -164,6 +164,7 @@ module pftconMod real(r8), allocatable :: wood_density (:) ! wood density (kg/m3) real(r8), allocatable :: crit_onset_gdd_sf(:)! scale factor for crit_onset_gdd real(r8), allocatable :: ndays_on(:) ! number of days to complete leaf onset + real(r8), allocatable :: jmaxb1(:) ! Coefficient determining the response of electron transport rate to light availability ! crop @@ -506,6 +507,7 @@ subroutine InitAllocate (this) allocate( this%wood_density (0:mxpft) ) allocate( this%crit_onset_gdd_sf (0:mxpft) ) allocate( this%ndays_on (0:mxpft) ) + allocate( this%jmaxb1 (0:mxpft) ) end subroutine InitAllocate @@ -1017,6 +1019,9 @@ subroutine InitRead(this) call ncd_io('medlynintercept', this%medlynintercept, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) + call ncd_io('jmaxb1', this%jmaxb1, 'read', ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) + call ncd_io('mxmat', this%mxmat, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) @@ -1596,6 +1601,7 @@ subroutine Clean(this) deallocate( this%taper) deallocate( this%crit_onset_gdd_sf) deallocate( this%ndays_on) + deallocate( this%jmaxb1) end subroutine Clean end module pftconMod From 77b8e8017c80af86dd85b1bc819af053fbe70ebb Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 22 Oct 2024 08:47:59 -0600 Subject: [PATCH 03/17] Make jmaxb0, wc2wjb0, r_mort pft-dimensioned --- src/biogeochem/CNGapMortalityMod.F90 | 13 +++---------- src/biogeophys/LunaMod.F90 | 28 ++++++++++++++-------------- src/main/pftconMod.F90 | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+), 24 deletions(-) diff --git a/src/biogeochem/CNGapMortalityMod.F90 b/src/biogeochem/CNGapMortalityMod.F90 index 8979b1eebd..70709bce8b 100644 --- a/src/biogeochem/CNGapMortalityMod.F90 +++ b/src/biogeochem/CNGapMortalityMod.F90 @@ -34,7 +34,6 @@ module CNGapMortalityMod public :: CNGapMortality type, private :: params_type - real(r8):: am ! mortality rate based on annual rate, fractional mortality (1/yr) real(r8):: k_mort ! coeff. of growth efficiency in mortality equation end type params_type ! @@ -70,11 +69,6 @@ subroutine readParams ( ncid ) character(len=100) :: tString ! temp. var for reading !----------------------------------------------------------------------- - tString='r_mort' - call ncd_io(varname=trim(tString),data=tempr, flag='read', ncid=ncid, readvar=readv) - if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) - params_inst%am=tempr - tString='k_mort' call ncd_io(varname=trim(tString),data=tempr, flag='read', ncid=ncid, readvar=readv) if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) @@ -140,6 +134,7 @@ subroutine CNGapMortality (bounds, num_soilp, filter_soilp, & leafcn => pftcon%leafcn , & ! Input: [real(r8) (:)] leaf C:N (gC/gN) livewdcn => pftcon%livewdcn , & ! Input: [real(r8) (:)] live wood (phloem and ray parenchyma) C:N (gC/gN) + r_mort => pftcon%r_mort , & ! Input: [real(r8) (:)] Mortality rate (1/year) laisun => canopystate_inst%laisun_patch , & ! Input: [real(r8) (:) ] sunlit projected leaf area index laisha => canopystate_inst%laisha_patch , & ! Input: [real(r8) (:) ] shaded projected leaf area index nind => dgvs_inst%nind_patch , & ! Output:[real(r8)(:)] number of individuals (#/m2) added by F. Li and S. Levis @@ -183,8 +178,6 @@ subroutine CNGapMortality (bounds, num_soilp, filter_soilp, & ) dt = real( get_step_size(), r8 ) - ! set the mortality rate based on annual rate - am = params_inst%am ! set coeff of growth efficiency in mortality equation k_mort = params_inst%k_mort @@ -216,12 +209,12 @@ subroutine CNGapMortality (bounds, num_soilp, filter_soilp, & am = min(1._r8, am + heatstress(p)) else ! lpj didn't set this for grasses; cn does ! set the mortality rate based on annual rate - am = params_inst%am + am = r_mort(ivt(p)) end if end if - m = am/(get_average_days_per_year() * secspday) + m = r_mort(ivt(p))/(get_average_days_per_year() * secspday) !------------------------------------------------------ ! patch-level gap mortality carbon fluxes diff --git a/src/biogeophys/LunaMod.F90 b/src/biogeophys/LunaMod.F90 index 3f5f7d0e3c..04bcf8256e 100644 --- a/src/biogeophys/LunaMod.F90 +++ b/src/biogeophys/LunaMod.F90 @@ -46,8 +46,6 @@ module LunaMod real(r8) :: kc25_coef ! Michaelis-Menten const. at 25°C for CO2 (unitless) real(r8) :: ko25_coef ! Michaelis-Menten const. at 25°C for O2 (unitless) real(r8) :: luna_theta_cj ! LUNA empirical curvature parameter for ac, aj photosynthesis co-limitation (unitless) - real(r8) :: jmaxb0 ! The baseline proportion of nitrogen allocated for electron transport (J) - real(r8) :: wc2wjb0 ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (unitless) real(r8) :: enzyme_turnover_daily ! The daily turnover rate for photosynthetic enzyme at 25oC in view of ~7 days of half-life time for Rubisco (Suzuki et al. 2001) (unitless) real(r8) :: relhExp ! Specifies the impact of relative humidity on electron transport rate (unitless) real(r8) :: minrelh ! Minimum relative humidity for nitrogen optimization (fraction) @@ -120,10 +118,6 @@ subroutine readParams( ncid ) params_inst%kc25_coef = params_inst%kc25_coef * 1.e5_r8 ! from mol/mol to Luna units ! LUNA empirical curvature parameter for ac, aj photosynthesis co-limitation call readNcdioScalar(ncid, 'luna_theta_cj', subname, params_inst%luna_theta_cj) - ! The baseline proportion of nitrogen allocated for electron transport (J) - call readNcdioScalar(ncid, 'jmaxb0', subname, params_inst%jmaxb0) - ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (unitless) - call readNcdioScalar(ncid, 'wc2wjb0', subname, params_inst%wc2wjb0) ! The daily turnover rate for photosynthetic enzyme at 25oC in view of ~7 days of half-life time for Rubisco (Suzuki et al. 2001) (unitless) call readNcdioScalar(ncid, 'enzyme_turnover_daily', subname, params_inst%enzyme_turnover_daily) ! Specifies the impact of relative humidity on electron transport rate (unitless) @@ -257,7 +251,9 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & c3psn => pftcon%c3psn , & ! photosynthetic pathway: 0. = c4, 1. = c3 slatop => pftcon%slatop , & ! specific leaf area at top of canopy, projected area basis [m^2/gC] leafcn => pftcon%leafcn , & ! leaf C:N (gC/gN) + jmaxb0 => pftcon%jmaxb0 , & ! Baseline proportion of nitrogen allocated for electron transport (J) jmaxb1 => pftcon%jmaxb1 , & ! Coefficient determining the response of electron transport rate to light availability (-) + wc2wjb0 => pftcon%wc2wjb0 , & ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) forc_pbot10 => atm2lnd_inst%forc_pbot240_downscaled_patch , & ! Input: [real(r8) (:) ] 10 day mean atmospheric pressure(Pa) CO2_p240 => atm2lnd_inst%forc_pco2_240_patch , & ! Input: [real(r8) (:) ] 10-day mean CO2 partial pressure (Pa) O2_p240 => atm2lnd_inst%forc_po2_240_patch , & ! Input: [real(r8) (:) ] 10-day mean O2 partial pressure (Pa) @@ -383,7 +379,7 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & PNcbold = 0.0_r8 call NitrogenAllocation(FNCa,forc_pbot10(p), relh10, CO2a10, O2a10, PARi10, PARimx10, rb10v, hourpd, & tair10, tleafd10, tleafn10, & - jmaxb1(ft), PNlcold, PNetold, PNrespold, PNcbold, dayl_factor(p), & + jmaxb0(ft), jmaxb1(ft), wc2wjb0(ft), PNlcold, PNetold, PNrespold, PNcbold, dayl_factor(p), & o3coefjmax(p), PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) vcmx25_opt= PNcbopt * FNCa * Fc25 jmx25_opt= PNetopt * FNCa * Fj25 @@ -769,7 +765,7 @@ end subroutine Clear24_Climate_LUNA !************************************************************************************************************************************************ !Use the LUNA model to calculate the Nitrogen partioning subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PARimx10,rb10, hourpd, tair10, tleafd10, tleafn10, & - jmaxb1, PNlcold, PNetold, PNrespold, PNcbold, dayl_factor,o3coefjmax, & + jmaxb0, jmaxb1, wc2wjb0, PNlcold, PNetold, PNrespold, PNcbold, dayl_factor,o3coefjmax, & PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) implicit none real(r8), intent (in) :: FNCa !Area based functional nitrogen content (g N/m2 leaf) @@ -784,7 +780,9 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR real(r8), intent (in) :: tair10 !10-day running mean of the 2m temperature (oC) real(r8), intent (in) :: tleafd10 !10-day running mean of daytime leaf temperature (oC) real(r8), intent (in) :: tleafn10 !10-day running mean of nighttime leaf temperature (oC) + real(r8), intent (in) :: jmaxb0 !Baseline proportion of nitrogen allocated for electron transport (J) real(r8), intent (in) :: jmaxb1 !coefficient determining the response of electron transport rate to light availability (unitless) + real(r8), intent (in) :: wc2wjb0 !The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) real(r8), intent (in) :: PNlcold !old value of the proportion of nitrogen allocated to light capture (unitless) real(r8), intent (in) :: PNetold !old value of the proportion of nitrogen allocated to electron transport (unitless) real(r8), intent (in) :: PNrespold !old value of the proportion of nitrogen allocated to respiration (unitless) @@ -886,7 +884,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR call Nitrogen_investments (KcKjFlag,FNCa, Nlc, forc_pbot10, relh10, CO2a10,O2a10, PARi10c, PARimx10c,rb10, hourpd, tair10, & tleafd10c,tleafn10c, & Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref, NUEr, o3coefjmax, & - Kc, Kj, ci, & + jmaxb0, wc2wjb0, Kc, Kj, ci, & Vcmax, Jmax,JmeanL,JmaxL, Net, Ncb, Nresp, PSN, RESP) Npsntarget = Nlc + Ncb + Net !target nitrogen allocated to photosynthesis, which may be lower or higher than Npsn_avail @@ -901,7 +899,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR call Nitrogen_investments (KcKjFlag,FNCa, Nlc2, forc_pbot10, relh10, CO2a10,O2a10, PARi10c, PARimx10c,rb10, hourpd, & tair10, tleafd10c,tleafn10c, & Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref,NUEr, o3coefjmax, & - Kc, Kj, ci, & + jmaxb0, wc2wjb0, Kc, Kj, ci, & Vcmax, Jmax,JmeanL,JmaxL, Net2, Ncb2, Nresp2, PSN2, RESP2) Npsntarget2 = Nlc2 + Ncb2 + Net2 @@ -930,7 +928,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR call Nitrogen_investments (KcKjFlag,FNCa, Nlc1,forc_pbot10, relh10, CO2a10,O2a10, PARi10c, PARimx10c,rb10, hourpd, & tair10, tleafd10c,tleafn10c, & Kj2Kc, JmaxCoef, Fc,Fj, NUEc, NUEj, NUEcref, NUEjref,NUEr, o3coefjmax, & - Kc, Kj, ci,& + jmaxb0, wc2wjb0, Kc, Kj, ci,& Vcmax, Jmax,JmeanL,JmaxL, Net1, Ncb1, Nresp1, PSN1, RESP1) Npsntarget1 = Nlc1 + Ncb1 + Net1 Carboncost1 = (Npsntarget - Npsntarget1) * NMCp25 * Cv * (RespTBernacchi(tleafd10c) * hourpd + & @@ -961,7 +959,7 @@ end subroutine NitrogenAllocation subroutine Nitrogen_investments (KcKjFlag, FNCa, Nlc, forc_pbot10, relh10, & CO2a10, O2a10, PARi10, PARimx10, rb10, hourpd, tair10, tleafd10, tleafn10, & Kj2Kc, JmaxCoef, Fc, Fj, NUEc, NUEj, NUEcref, NUEjref, NUEr, o3coefjmax, & - Kc, Kj, ci, Vcmax, Jmax, JmeanL, JmaxL, Net, Ncb, Nresp, PSN, RESP) + jmaxb0, wc2wjb0, Kc, Kj, ci, Vcmax, Jmax, JmeanL, JmaxL, Net, Ncb, Nresp, PSN, RESP) implicit none integer, intent (in) :: KcKjFlag !flag to indicate whether to update the Kc and Kj using the photosynthesis subroutine; 0--Kc and Kj need to be calculated; 1--Kc and Kj is prescribed. real(r8), intent (in) :: FNCa !Area based functional nitrogen content (g N/m2 leaf) @@ -987,6 +985,8 @@ subroutine Nitrogen_investments (KcKjFlag, FNCa, Nlc, forc_pbot10, relh10, & real(r8), intent (in) :: NUEjref !nitrogen use efficiency for electron transport under reference climates real(r8), intent (in) :: NUEr !nitrogen use efficiency for respiration real(r8), intent (in) :: o3coefjmax !ozone coef jmax + real(r8), intent (in) :: jmaxb0 !Baseline proportion of nitrogen allocated for electron transport (J) + real(r8), intent (in) :: wc2wjb0 !The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) real(r8), intent (inout) :: Kc !conversion factors from Vc,max to Wc real(r8), intent (inout) :: Kj !conversion factor from electron transport rate to Wj @@ -1016,7 +1016,7 @@ subroutine Nitrogen_investments (KcKjFlag, FNCa, Nlc, forc_pbot10, relh10, & theta = 0.292_r8 / (1.0_r8 + 0.076_r8 / (Nlc * Cb)) ELTRNabsorb = theta * PARi10 - Jmaxb0act = params_inst%jmaxb0 * FNCa * Fj + Jmaxb0act = jmaxb0 * FNCa * Fj ! Default value of o3coefjmax is 1 --> ! o3coefjmax is only different from 1 if ozone_inst%stress_method == 'stress_falk' @@ -1026,7 +1026,7 @@ subroutine Nitrogen_investments (KcKjFlag, FNCa, Nlc, forc_pbot10, relh10, & JmaxL = theta * PARimx10 / (sqrt(1.0_r8 + (theta * PARimx10 / Jmax)**2.0_r8)) NUEchg = (NUEc / NUEcref) * (NUEjref / NUEj) - Wc2Wj = params_inst%wc2wjb0 * (NUEchg**0.5_r8) + Wc2Wj = wc2wjb0 * (NUEchg**0.5_r8) Vcmax = Wc2Wj * JmaxL * Kj2Kc JmeanL = theta * PARi10 / (sqrt(1.0_r8 + (ELTRNabsorb / Jmax)**2.0_r8)) if(KcKjFlag.eq.0)then !update the Kc,Kj, anc ci information diff --git a/src/main/pftconMod.F90 b/src/main/pftconMod.F90 index 4f8a7f16fc..0bb9ef23da 100644 --- a/src/main/pftconMod.F90 +++ b/src/main/pftconMod.F90 @@ -164,7 +164,10 @@ module pftconMod real(r8), allocatable :: wood_density (:) ! wood density (kg/m3) real(r8), allocatable :: crit_onset_gdd_sf(:)! scale factor for crit_onset_gdd real(r8), allocatable :: ndays_on(:) ! number of days to complete leaf onset + real(r8), allocatable :: jmaxb0(:) ! Baseline proportion of nitrogen allocated for electron transport (J) real(r8), allocatable :: jmaxb1(:) ! Coefficient determining the response of electron transport rate to light availability + real(r8), allocatable :: wc2wjb0(:) ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) + real(r8), allocatable :: r_mort(:) ! Mortality rate (1/year) ! crop @@ -507,7 +510,10 @@ subroutine InitAllocate (this) allocate( this%wood_density (0:mxpft) ) allocate( this%crit_onset_gdd_sf (0:mxpft) ) allocate( this%ndays_on (0:mxpft) ) + allocate( this%jmaxb0 (0:mxpft) ) allocate( this%jmaxb1 (0:mxpft) ) + allocate( this%wc2wjb0 (0:mxpft) ) + allocate( this%r_mort (0:mxpft) ) end subroutine InitAllocate @@ -1019,9 +1025,18 @@ subroutine InitRead(this) call ncd_io('medlynintercept', this%medlynintercept, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) + call ncd_io('jmaxb0', this%jmaxb0, 'read', ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) + call ncd_io('jmaxb1', this%jmaxb1, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) + call ncd_io('wc2wjb0', this%wc2wjb0, 'read', ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) + + call ncd_io('r_mort', this%r_mort, 'read', ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) + call ncd_io('mxmat', this%mxmat, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) @@ -1601,7 +1616,10 @@ subroutine Clean(this) deallocate( this%taper) deallocate( this%crit_onset_gdd_sf) deallocate( this%ndays_on) + deallocate( this%jmaxb0) deallocate( this%jmaxb1) + deallocate( this%wc2wjb0) + deallocate( this%r_mort) end subroutine Clean end module pftconMod From b7121a6704265cd58fe1af493cf6b668d29aabe9 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 22 Oct 2024 10:46:46 -0600 Subject: [PATCH 04/17] ncd_io not needed after all --- src/biogeophys/LunaMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeophys/LunaMod.F90 b/src/biogeophys/LunaMod.F90 index 04bcf8256e..366fa68f4b 100644 --- a/src/biogeophys/LunaMod.F90 +++ b/src/biogeophys/LunaMod.F90 @@ -92,7 +92,7 @@ module LunaMod subroutine readParams( ncid ) ! ! !USES: - use ncdio_pio, only: file_desc_t,ncd_io + use ncdio_pio, only: file_desc_t use paramUtilMod, only: readNcdioScalar ! ! !ARGUMENTS: From 3f4936c91a8ca79c3fce486b34c6bbcdf074210b Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 22 Oct 2024 10:52:34 -0600 Subject: [PATCH 05/17] Other variables not needed after all --- src/biogeophys/LunaMod.F90 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/biogeophys/LunaMod.F90 b/src/biogeophys/LunaMod.F90 index 366fa68f4b..21e05dc0c6 100644 --- a/src/biogeophys/LunaMod.F90 +++ b/src/biogeophys/LunaMod.F90 @@ -12,7 +12,7 @@ module LunaMod use clm_varcon , only : rgas, tfrz,spval use abortutils , only : endrun use clm_varctl , only : iulog - use clm_varpar , only : nlevcan, mxpft + use clm_varpar , only : nlevcan use decompMod , only : bounds_type, subgrid_level_patch use pftconMod , only : pftcon use FrictionvelocityMod , only : frictionvel_type @@ -101,10 +101,6 @@ subroutine readParams( ncid ) ! ! !LOCAL VARIABLES: character(len=*), parameter :: subname = 'readParams_Luna' - character(len=100) :: errCode = '-Error reading in parameters file:' - logical :: readv ! has variable been read in or not - real(r8) :: temp1d(0:mxpft) ! temporary to read in parameter - character(len=100) :: tString ! temp. var for reading !-------------------------------------------------------------------- ! CO2 compensation point at 25°C at present day O2 levels @@ -170,7 +166,7 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & ! !USES: use clm_time_manager , only : get_step_size_real - use clm_varpar , only : nlevsoi, mxpft + use clm_varpar , only : nlevsoi use perf_mod , only : t_startf, t_stopf use clm_varctl , only : use_cn use quadraticMod , only : quadratic From bc3d51892d4e701cd8b5a57f8010c30dc6de7d49 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 22 Oct 2024 11:04:17 -0600 Subject: [PATCH 06/17] Consistent naming of units --- src/biogeophys/LunaMod.F90 | 2 +- src/biogeophys/SnowHydrologyMod.F90 | 2 +- src/main/pftconMod.F90 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/biogeophys/LunaMod.F90 b/src/biogeophys/LunaMod.F90 index 21e05dc0c6..0727e84e7a 100644 --- a/src/biogeophys/LunaMod.F90 +++ b/src/biogeophys/LunaMod.F90 @@ -777,7 +777,7 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR real(r8), intent (in) :: tleafd10 !10-day running mean of daytime leaf temperature (oC) real(r8), intent (in) :: tleafn10 !10-day running mean of nighttime leaf temperature (oC) real(r8), intent (in) :: jmaxb0 !Baseline proportion of nitrogen allocated for electron transport (J) - real(r8), intent (in) :: jmaxb1 !coefficient determining the response of electron transport rate to light availability (unitless) + real(r8), intent (in) :: jmaxb1 !coefficient determining the response of electron transport rate to light availability (-) real(r8), intent (in) :: wc2wjb0 !The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) real(r8), intent (in) :: PNlcold !old value of the proportion of nitrogen allocated to light capture (unitless) real(r8), intent (in) :: PNetold !old value of the proportion of nitrogen allocated to electron transport (unitless) diff --git a/src/biogeophys/SnowHydrologyMod.F90 b/src/biogeophys/SnowHydrologyMod.F90 index 57e9088ece..578769d9ea 100644 --- a/src/biogeophys/SnowHydrologyMod.F90 +++ b/src/biogeophys/SnowHydrologyMod.F90 @@ -87,7 +87,7 @@ module SnowHydrologyMod real(r8) :: scvng_fct_mlt_dst4 ! scavenging factor for dust species 4 inclusion in meltwater [frc] real(r8) :: ceta ! Overburden compaction constant (kg/m3) real(r8) :: snw_rds_min ! minimum allowed snow effective radius (also cold "fresh snow" value) [microns] - real(r8) :: upplim_destruct_metamorph ! Upper limit on destructive metamorphism compaction + real(r8) :: upplim_destruct_metamorph ! Upper limit on destructive metamorphism compaction (kg/m3) end type params_type type(params_type), private :: params_inst diff --git a/src/main/pftconMod.F90 b/src/main/pftconMod.F90 index 0bb9ef23da..965b21ec70 100644 --- a/src/main/pftconMod.F90 +++ b/src/main/pftconMod.F90 @@ -165,7 +165,7 @@ module pftconMod real(r8), allocatable :: crit_onset_gdd_sf(:)! scale factor for crit_onset_gdd real(r8), allocatable :: ndays_on(:) ! number of days to complete leaf onset real(r8), allocatable :: jmaxb0(:) ! Baseline proportion of nitrogen allocated for electron transport (J) - real(r8), allocatable :: jmaxb1(:) ! Coefficient determining the response of electron transport rate to light availability + real(r8), allocatable :: jmaxb1(:) ! Coefficient determining the response of electron transport rate to light availability (-) real(r8), allocatable :: wc2wjb0(:) ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) real(r8), allocatable :: r_mort(:) ! Mortality rate (1/year) From e5100a4d5949a0676103dc99d393478fc6aaf258 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Wed, 23 Oct 2024 08:33:36 -0600 Subject: [PATCH 07/17] New versions of specialized parameter files --- cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm | 2 +- .../clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm index 3462b802c7..5aa0b903d0 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm @@ -1,2 +1,2 @@ -paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c240814.nc' +paramfile = '/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm51_ciso_cwd_hr_params.c241017.nc' hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr' diff --git a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm index d51360c82b..c41856fb01 100644 --- a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm @@ -1,2 +1,2 @@ use_soil_matrixcn = .true. -paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c240822.nc' +paramfile = '/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm60_params_cn30.c241017.nc' From 28d552efb06a8bb345458e4fcbfbc73692a3fb8d Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Thu, 24 Oct 2024 09:41:35 -0600 Subject: [PATCH 08/17] Reinstate SMS_Lm1.f10_f10_mg37.I1850Clm60Bgc.derecho_intel.clm-clm60_monthly_matrixcn_soilCN30 --- cime_config/testdefs/testlist_clm.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 490748c7e7..b178570add 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -863,6 +863,15 @@ + + + + + + + + + From 157107632490551b79bc5542db5d3d3e47b5a94b Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Sat, 26 Oct 2024 09:01:55 -0600 Subject: [PATCH 09/17] Move read of jmaxb0,jmaxb1,wc2wjb0 from pftcon to LunaMod and r_mort to CNGapMortality --- src/biogeochem/CNGapMortalityMod.F90 | 38 +++++++++++++++++-- src/biogeophys/LunaMod.F90 | 56 ++++++++++++++++++++++++---- src/main/pftconMod.F90 | 24 ------------ 3 files changed, 84 insertions(+), 34 deletions(-) diff --git a/src/biogeochem/CNGapMortalityMod.F90 b/src/biogeochem/CNGapMortalityMod.F90 index 70709bce8b..73ff0bc911 100644 --- a/src/biogeochem/CNGapMortalityMod.F90 +++ b/src/biogeochem/CNGapMortalityMod.F90 @@ -9,9 +9,11 @@ module CNGapMortalityMod ! ! !USES: use shr_kind_mod , only : r8 => shr_kind_r8 + use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) use decompMod , only : bounds_type use abortutils , only : endrun use shr_log_mod , only : errMsg => shr_log_errMsg + use clm_varpar , only : mxpft use pftconMod , only : pftcon use CNDVType , only : dgvs_type use CNVegCarbonStateType , only : cnveg_carbonstate_type, spinup_factor_deadwood @@ -35,6 +37,9 @@ module CNGapMortalityMod type, private :: params_type real(r8):: k_mort ! coeff. of growth efficiency in mortality equation + real(r8), allocatable :: r_mort(:) ! Mortality rate (1/year) + contains + procedure, private :: allocParams ! Allocate the parameters end type params_type ! type(params_type), private :: params_inst @@ -48,6 +53,24 @@ module CNGapMortalityMod contains + !----------------------------------------------------------------------- + subroutine allocParams ( this ) + ! + implicit none + + ! !ARGUMENTS: + class(params_type) :: this + ! + ! !LOCAL VARIABLES: + character(len=32) :: subname = 'allocParams' + !----------------------------------------------------------------------- + + ! allocate parameters + + allocate( this%r_mort (0:mxpft) ) ; this%r_mort(:) = nan + + end subroutine allocParams + !----------------------------------------------------------------------- subroutine readParams ( ncid ) ! @@ -66,6 +89,7 @@ subroutine readParams ( ncid ) character(len=100) :: errCode = '-Error reading in parameters file:' logical :: readv ! has variable been read in or not real(r8) :: tempr ! temporary to read in constant + real(r8) :: temp1d(0:mxpft) ! temporary to read in parameter character(len=100) :: tString ! temp. var for reading !----------------------------------------------------------------------- @@ -73,6 +97,13 @@ subroutine readParams ( ncid ) call ncd_io(varname=trim(tString),data=tempr, flag='read', ncid=ncid, readvar=readv) if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) params_inst%k_mort=tempr + + call params_inst%allocParams() + + tString='r_mort' + call ncd_io(varname=trim(tString),data=temp1d, flag='read', ncid=ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) + params_inst%r_mort=temp1d end subroutine readParams @@ -134,7 +165,6 @@ subroutine CNGapMortality (bounds, num_soilp, filter_soilp, & leafcn => pftcon%leafcn , & ! Input: [real(r8) (:)] leaf C:N (gC/gN) livewdcn => pftcon%livewdcn , & ! Input: [real(r8) (:)] live wood (phloem and ray parenchyma) C:N (gC/gN) - r_mort => pftcon%r_mort , & ! Input: [real(r8) (:)] Mortality rate (1/year) laisun => canopystate_inst%laisun_patch , & ! Input: [real(r8) (:) ] sunlit projected leaf area index laisha => canopystate_inst%laisha_patch , & ! Input: [real(r8) (:) ] shaded projected leaf area index nind => dgvs_inst%nind_patch , & ! Output:[real(r8)(:)] number of individuals (#/m2) added by F. Li and S. Levis @@ -209,12 +239,14 @@ subroutine CNGapMortality (bounds, num_soilp, filter_soilp, & am = min(1._r8, am + heatstress(p)) else ! lpj didn't set this for grasses; cn does ! set the mortality rate based on annual rate - am = r_mort(ivt(p)) + am = params_inst%r_mort(ivt(p)) end if + else + am = params_inst%r_mort(ivt(p)) end if - m = r_mort(ivt(p))/(get_average_days_per_year() * secspday) + m = am/(get_average_days_per_year() * secspday) !------------------------------------------------------ ! patch-level gap mortality carbon fluxes diff --git a/src/biogeophys/LunaMod.F90 b/src/biogeophys/LunaMod.F90 index 0727e84e7a..5641846309 100644 --- a/src/biogeophys/LunaMod.F90 +++ b/src/biogeophys/LunaMod.F90 @@ -9,10 +9,11 @@ module LunaMod ! !USES: use shr_kind_mod , only : r8 => shr_kind_r8 use shr_log_mod , only : errMsg => shr_log_errMsg + use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) use clm_varcon , only : rgas, tfrz,spval use abortutils , only : endrun use clm_varctl , only : iulog - use clm_varpar , only : nlevcan + use clm_varpar , only : nlevcan, mxpft use decompMod , only : bounds_type, subgrid_level_patch use pftconMod , only : pftcon use FrictionvelocityMod , only : frictionvel_type @@ -49,6 +50,11 @@ module LunaMod real(r8) :: enzyme_turnover_daily ! The daily turnover rate for photosynthetic enzyme at 25oC in view of ~7 days of half-life time for Rubisco (Suzuki et al. 2001) (unitless) real(r8) :: relhExp ! Specifies the impact of relative humidity on electron transport rate (unitless) real(r8) :: minrelh ! Minimum relative humidity for nitrogen optimization (fraction) + real(r8), allocatable :: jmaxb0(:) ! Baseline proportion of nitrogen allocated for electron transport (J) + real(r8), allocatable :: jmaxb1(:) ! Coefficient determining the response of electron transport rate to light availability (-) + real(r8), allocatable :: wc2wjb0(:) ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) + contains + procedure, private :: allocParams ! Allocate the parameters end type params_type type(params_type), private :: params_inst @@ -88,11 +94,31 @@ module LunaMod contains + !----------------------------------------------------------------------- + subroutine allocParams ( this ) + ! + implicit none + + ! !ARGUMENTS: + class(params_type) :: this + ! + ! !LOCAL VARIABLES: + character(len=32) :: subname = 'allocParams' + !----------------------------------------------------------------------- + + ! allocate parameters + + allocate( this%jmaxb0 (0:mxpft) ) ; this%jmaxb0(:) = nan + allocate( this%jmaxb1 (0:mxpft) ) ; this%jmaxb1(:) = nan + allocate( this%wc2wjb0 (0:mxpft) ) ; this%wc2wjb0(:) = nan + + end subroutine allocParams + !---------------------------------------------------------------------------- subroutine readParams( ncid ) ! ! !USES: - use ncdio_pio, only: file_desc_t + use ncdio_pio, only: file_desc_t,ncd_io use paramUtilMod, only: readNcdioScalar ! ! !ARGUMENTS: @@ -101,6 +127,10 @@ subroutine readParams( ncid ) ! ! !LOCAL VARIABLES: character(len=*), parameter :: subname = 'readParams_Luna' + character(len=100) :: errCode = '-Error reading in parameters file:' + logical :: readv ! has variable been read in or not + real(r8) :: temp1d(0:mxpft) ! temporary to read in parameter + character(len=100) :: tString ! temp. var for reading !-------------------------------------------------------------------- ! CO2 compensation point at 25°C at present day O2 levels @@ -121,6 +151,21 @@ subroutine readParams( ncid ) ! Minimum relative humidity for nitrogen optimization (fraction) call readNcdioScalar(ncid, 'minrelh', subname, params_inst%minrelh) + call params_inst%allocParams() + + tString = "jmaxb0" + call ncd_io(varname=trim(tString),data=temp1d, flag='read', ncid=ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) + params_inst%jmaxb0=temp1d + tString = "jmaxb1" + call ncd_io(varname=trim(tString),data=temp1d, flag='read', ncid=ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) + params_inst%jmaxb1=temp1d + tString = "wc2wjb0" + call ncd_io(varname=trim(tString),data=temp1d, flag='read', ncid=ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) + params_inst%wc2wjb0=temp1d + end subroutine readParams !----------------------------------------------------------------------- @@ -247,9 +292,6 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & c3psn => pftcon%c3psn , & ! photosynthetic pathway: 0. = c4, 1. = c3 slatop => pftcon%slatop , & ! specific leaf area at top of canopy, projected area basis [m^2/gC] leafcn => pftcon%leafcn , & ! leaf C:N (gC/gN) - jmaxb0 => pftcon%jmaxb0 , & ! Baseline proportion of nitrogen allocated for electron transport (J) - jmaxb1 => pftcon%jmaxb1 , & ! Coefficient determining the response of electron transport rate to light availability (-) - wc2wjb0 => pftcon%wc2wjb0 , & ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) forc_pbot10 => atm2lnd_inst%forc_pbot240_downscaled_patch , & ! Input: [real(r8) (:) ] 10 day mean atmospheric pressure(Pa) CO2_p240 => atm2lnd_inst%forc_pco2_240_patch , & ! Input: [real(r8) (:) ] 10-day mean CO2 partial pressure (Pa) O2_p240 => atm2lnd_inst%forc_po2_240_patch , & ! Input: [real(r8) (:) ] 10-day mean O2 partial pressure (Pa) @@ -375,7 +417,8 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & PNcbold = 0.0_r8 call NitrogenAllocation(FNCa,forc_pbot10(p), relh10, CO2a10, O2a10, PARi10, PARimx10, rb10v, hourpd, & tair10, tleafd10, tleafn10, & - jmaxb0(ft), jmaxb1(ft), wc2wjb0(ft), PNlcold, PNetold, PNrespold, PNcbold, dayl_factor(p), & + params_inst%jmaxb0(ft), params_inst%jmaxb1(ft), params_inst%wc2wjb0(ft), PNlcold, PNetold, & + PNrespold, PNcbold, dayl_factor(p), & o3coefjmax(p), PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) vcmx25_opt= PNcbopt * FNCa * Fc25 jmx25_opt= PNetopt * FNCa * Fj25 @@ -1362,7 +1405,6 @@ subroutine Quadratic(a,b,c,r1,r2) end if end subroutine Quadratic - end module LunaMod diff --git a/src/main/pftconMod.F90 b/src/main/pftconMod.F90 index 965b21ec70..b987879c03 100644 --- a/src/main/pftconMod.F90 +++ b/src/main/pftconMod.F90 @@ -164,10 +164,6 @@ module pftconMod real(r8), allocatable :: wood_density (:) ! wood density (kg/m3) real(r8), allocatable :: crit_onset_gdd_sf(:)! scale factor for crit_onset_gdd real(r8), allocatable :: ndays_on(:) ! number of days to complete leaf onset - real(r8), allocatable :: jmaxb0(:) ! Baseline proportion of nitrogen allocated for electron transport (J) - real(r8), allocatable :: jmaxb1(:) ! Coefficient determining the response of electron transport rate to light availability (-) - real(r8), allocatable :: wc2wjb0(:) ! The baseline ratio of rubisco limited rate vs light limited photosynthetic rate (Wc:Wj) (-) - real(r8), allocatable :: r_mort(:) ! Mortality rate (1/year) ! crop @@ -510,10 +506,6 @@ subroutine InitAllocate (this) allocate( this%wood_density (0:mxpft) ) allocate( this%crit_onset_gdd_sf (0:mxpft) ) allocate( this%ndays_on (0:mxpft) ) - allocate( this%jmaxb0 (0:mxpft) ) - allocate( this%jmaxb1 (0:mxpft) ) - allocate( this%wc2wjb0 (0:mxpft) ) - allocate( this%r_mort (0:mxpft) ) end subroutine InitAllocate @@ -1025,18 +1017,6 @@ subroutine InitRead(this) call ncd_io('medlynintercept', this%medlynintercept, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) - call ncd_io('jmaxb0', this%jmaxb0, 'read', ncid, readvar=readv) - if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) - - call ncd_io('jmaxb1', this%jmaxb1, 'read', ncid, readvar=readv) - if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) - - call ncd_io('wc2wjb0', this%wc2wjb0, 'read', ncid, readvar=readv) - if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) - - call ncd_io('r_mort', this%r_mort, 'read', ncid, readvar=readv) - if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) - call ncd_io('mxmat', this%mxmat, 'read', ncid, readvar=readv) if ( .not. readv ) call endrun(msg=' ERROR: error in reading in pft data'//errMsg(sourcefile, __LINE__)) @@ -1616,10 +1596,6 @@ subroutine Clean(this) deallocate( this%taper) deallocate( this%crit_onset_gdd_sf) deallocate( this%ndays_on) - deallocate( this%jmaxb0) - deallocate( this%jmaxb1) - deallocate( this%wc2wjb0) - deallocate( this%r_mort) end subroutine Clean end module pftconMod From 0fd1a04d9a59c8e92d516cb0bbb992cba602589e Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Sun, 27 Oct 2024 14:15:24 -0600 Subject: [PATCH 10/17] Final paths for parameter files --- bld/namelist_files/namelist_defaults_ctsm.xml | 8 ++++---- .../testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm | 2 +- .../clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index c93c4f5696..54d3afd5c1 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -544,10 +544,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm60_params.c241017.nc -/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm51_params.c241017.nc -/glade/campaign/cgd/tss/people/oleson/modify_param/clm50_params.c241017.nc -/glade/campaign/cgd/tss/people/oleson/modify_param/clm45_params.c241017.nc +lnd/clm2/paramdata/ctsm60_params.c241017.nc +lnd/clm2/paramdata/ctsm51_params.c241017.nc +lnd/clm2/paramdata/clm50_params.c241017.nc +lnd/clm2/paramdata/clm45_params.c241017.nc diff --git a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm index 5aa0b903d0..edeb0fce21 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm @@ -1,2 +1,2 @@ -paramfile = '/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm51_ciso_cwd_hr_params.c241017.nc' +paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c241017.nc' hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr' diff --git a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm index c41856fb01..b1d856797d 100644 --- a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm @@ -1,2 +1,2 @@ use_soil_matrixcn = .true. -paramfile = '/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm60_params_cn30.c241017.nc' +paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c241017.nc' From 152f5d6d814272bd1aee2a76e0069093999de6ef Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 29 Oct 2024 18:29:17 -0600 Subject: [PATCH 11/17] Remove/replace refs to DATM_C*_YR_* variables --- ...tmospheric-forcing-to-spinup-the-model.rst | 4 +-- .../customizing-the-clm-configuration.rst | 34 ++++++------------- src/main/clm_varctl.F90 | 2 +- tools/contrib/run_clm_historical | 12 +++---- tools/contrib/run_clmtowers | 14 ++++---- 5 files changed, 27 insertions(+), 39 deletions(-) diff --git a/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst b/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst index 769755937d..a81465c699 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst @@ -10,7 +10,7 @@ Because it takes so long to spinup the CN model (as we just saw previously), if In this example we will use the ``I1850Clm50BgcSpinup compset`` to setup CLM to run with atmospheric forcing from a previous fully coupled simulation with data that is already stored on disk on Cheyenne. There are several simulations that have high frequency data for which we can do this. You can also do this on a machine other than Cheyenne, but would need to download the data from the Earth System Grid and change the datapath similar to Example :numref:`eg-sim-data-from-prev-sim`. -Example: Simulation with MOAR Data on cheyenne +Example: Simulation with MOAR Data on derecho ------------------------------------------------------------- :: @@ -21,7 +21,7 @@ Example: Simulation with MOAR Data on cheyenne > ./xmlchange DATM_CPL_CASE=b40.1850.track1.1deg.006a # The following sets the align year and years to run over for atm forcing # (you could also use an editor) - > ./xmlchange DATM_CPL_YR_ALIGN=1,DATM_CPL_YR_START=960,DATM_CPL_YR_END=1030 + > ./xmlchange DATM_YR_ALIGN=1,DATM_YR_START=960,DATM_YR_END=1030 > ./case.setup # Now build and run as normal > ./case.build diff --git a/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst b/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst index 7cd8ce9c9c..11e996ae5d 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst @@ -510,13 +510,10 @@ For running "I" cases there are several other noteworthy configuration items tha CCSM_BGC DATM_MODE DATM_PRESAERO - DATM_CLMNCEP_YR_ALIGN - DATM_CLMNCEP_YR_START - DATM_CLMNCEP_YR_END + DATM_YR_ALIGN + DATM_YR_START + DATM_YR_END DATM_CPL_CASE - DATM_CPL_YR_ALIGN - DATM_CPL_YR_START - DATM_CPL_YR_END ``CCSM_CO2_PPMV`` Sets the mixing ratio of CO2 in parts per million by volume for ALL CESM components to use. Note that most compsets already set this value to something reasonable. Also note that some compsets may tell the atmosphere model to override this value with either historic or ramped values. If the ``CCSM_BGC`` variable is set to something other than "none" the atmosphere model will determine CO2, and CLM will listen and use what the atmosphere sends it. On the CLM side the namelist item ``co2_type`` tells CLM to use the value sent from the atmosphere rather than a value set on it's own namelist. @@ -569,36 +566,27 @@ For running "I" cases there are several other noteworthy configuration items tha ``pt1_pt1`` = read in single-point or regional datasets -DATM_CLMNCEP_YR_START - ``DATM_CLMNCEP_YR_START`` sets the beginning year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` modes. +DATM_YR_START + ``DATM_YR_START`` sets the beginning year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` or ``CPLHISTForcing`` modes. -DATM_CLMNCEP_YR_END - ``DATM_CLMNCEP_YR_END`` sets the ending year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` modes. +DATM_YR_END + ``DATM_YR_END`` sets the ending year to cycle the atmospheric data over for ``CLM_QIAN`` or ``CLMCRUNCEP`` or ``CPLHISTForcing`` modes. -DATM_CLMNCEP_YR_ALIGN - ``DATM_CLMNCEP_YR_START`` and ``DATM_CLMNCEP_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_CLMNCEP_YR_ALIGN`` determines which year in that range of years the simulation will start with. +DATM_YR_ALIGN + ``DATM_YR_START`` and ``DATM_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_YR_ALIGN`` determines which year in that range of years the simulation will start with. DATM_CPL_CASE ``DATM_CPL_CASE`` sets the casename to use for the ``CPLHISTForcing`` mode. -DATM_CPL_YR_START - ``DATM_CPL_YR_START`` sets the beginning year to cycle the atmospheric data over for the ``CPLHISTForcing`` mode. - -DATM_CPL_YR_END - ``DATM_CPL_YR_END`` sets the ending year to cycle the atmospheric data over for the ``CPLHISTForcing`` mode. - -DATM_CPL_YR_ALIGN - ``DATM_CPL_YR_START`` and ``DATM_CPL_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_CPL_YR_ALIGN`` determines which year in that range of years the simulation will start with. - ----------------------------- Downloading DATM Forcing Data ----------------------------- In Chapter One of the `CESM User's Guide `_ there is a section on "Downloading input data". The normal process of setting up cases will use the "scripts/ccsm_utils/Tools/check_input_data" script to retrieve data from the CESM subversion inputdata repository. This is true for the standard `CLM_QIAN` forcing as well. -The `CLMCRUNCEP` data is uploaded into the subversion inputdata repository as well -- but as it is 1.1 Terabytes of data downloading it is problematic (*IT WILL TAKE SEVERAL DAYS TO DOWNLOAD THE ENTIRE DATASET USING SUBVERSION*). Because of its size you may also need to download it onto a separate disk space. We have done that on cheyenne for example where it resides in ``$ENV{CESMROOT}/lmwg`` while the rest of the input data resides in ``$ENV{CESMDATAROOT}/inputdata``. The data is also already available on: janus, franklin, and hopper. If you download the data, we recommend that you break your download into several chunks, by setting up a case and setting the year range for ``DATM_CPL_YR_START`` and ``DATM_CPL_YR_END`` in say 20 year sections over 1901 to 2010, and then use ``check_input_data`` to export the data. +The `CLMCRUNCEP` data is uploaded into the subversion inputdata repository as well -- but as it is 1.1 Terabytes of data downloading it is problematic (*IT WILL TAKE SEVERAL DAYS TO DOWNLOAD THE ENTIRE DATASET USING SUBVERSION*). Because of its size you may also need to download it onto a separate disk space. We have done that on derecho for example where it resides in ``$ENV{CESMROOT}/lmwg`` while the rest of the input data resides in ``$ENV{CESMDATAROOT}/inputdata``. The data is also already available on: janus, franklin, and hopper. If you download the data, we recommend that you break your download into several chunks, by setting up a case and setting the year range for ``DATM_YR_START`` and ``DATM_YR_END`` in say 20 year sections over 1901 to 2010, and then use ``check_input_data`` to export the data. -The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on cheyenne. The DATM assumes the path for the previous NCAR machine cheyenne of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine. You can download the data itself from NCAR HPSS from ``/CCSM/csm/$DATM_CPLHIST_CASE``. +The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on derecho. The DATM assumes the path for derecho of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine. You can download the data itself from NCAR HPSS from ``/CCSM/csm/$DATM_CPLHIST_CASE``. -------------------------------------- Customizing via the build script files diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 5fa2602e5a..9539060200 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -289,7 +289,7 @@ module clm_varctl logical, public :: spinup_matrixcn = .false. !.false. ! true => use acc spinup logical, public :: hist_wrt_matrixcn_diag = .false.!.false. ! true => use acc spinup ! SASU - integer, public :: nyr_forcing = 10 ! length of forcing years for the spin up. eg. if DATM_CLMNCEP_YR_START=1901;DATM_CLMNCEP_YR_END=1920, then nyr_forcing = 20 + integer, public :: nyr_forcing = 10 ! length of forcing years for the spin up. eg. if DATM_YR_START=1901;DATM_YR_END=1920, then nyr_forcing = 20 integer, public :: nyr_SASU = 1 ! length of each semi-analytic solution. eg. nyr_SASU=5, analytic solutions will be calculated every five years. ! nyr_SASU=1: the fastest SASU, but inaccurate; nyr_SASU=nyr_forcing(eg. 20): the lowest SASU but accurate integer, public :: iloop_avg = -999 ! The restart file will be based on the average of all analytic solutions within the iloop_avg^th loop. diff --git a/tools/contrib/run_clm_historical b/tools/contrib/run_clm_historical index cd293d5867..8dc9269d3b 100755 --- a/tools/contrib/run_clm_historical +++ b/tools/contrib/run_clm_historical @@ -76,9 +76,9 @@ cp original_user_nl_clm user_nl_clm ./xmlchange STOP_N=21 ./xmlchange CONTINUE_RUN=FALSE ./xmlchange RESUBMIT=0 -./xmlchange DATM_CLMNCEP_YR_ALIGN=1901 -./xmlchange DATM_CLMNCEP_YR_START=1901 -./xmlchange DATM_CLMNCEP_YR_END=1920 +./xmlchange DATM_YR_ALIGN=1901 +./xmlchange DATM_YR_START=1901 +./xmlchange DATM_YR_END=1920 # need to use user_nl_datm files to get years right cp user_nl_datm1901-1920 user_nl_datm @@ -203,9 +203,9 @@ gzip $DDIR$CASENAME*.bin # we have to resubmit the job 3 times. ./xmlchange STOP_OPTION=nyears ./xmlchange STOP_N=22 -./xmlchange DATM_CLMNCEP_YR_ALIGN=1901 -./xmlchange DATM_CLMNCEP_YR_START=1901 -./xmlchange DATM_CLMNCEP_YR_END=2014 +./xmlchange DATM_YR_ALIGN=1901 +./xmlchange DATM_YR_START=1901 +./xmlchange DATM_YR_END=2014 ./xmlchange CONTINUE_RUN=TRUE ./xmlchange RESUBMIT=3 diff --git a/tools/contrib/run_clmtowers b/tools/contrib/run_clmtowers index e4dd2519ff..7e9dbbc426 100755 --- a/tools/contrib/run_clmtowers +++ b/tools/contrib/run_clmtowers @@ -211,9 +211,9 @@ foreach mysite ( $sites ) ./xmlchange --id STOP_OPTION --val nyears ./xmlchange --id STOP_N --val $numyears ./xmlchange --id RUN_STARTDATE --val $startyear[$cnt]-01-01 - ./xmlchange --id DATM_CLMNCEP_YR_ALIGN --val $startyear[$cnt] - ./xmlchange --id DATM_CLMNCEP_YR_START --val $startyear[$cnt] - ./xmlchange --id DATM_CLMNCEP_YR_END --val $endyear[$cnt] + ./xmlchange --id DATM_YR_ALIGN --val $startyear[$cnt] + ./xmlchange --id DATM_YR_START --val $startyear[$cnt] + ./xmlchange --id DATM_YR_END --val $endyear[$cnt] ./xmlchange --id CALENDAR --val GREGORIAN if ($BGC == ON) then ./xmlchange --id CLM_BLDNML_OPTS --val "-mask navy -bgc bgc -crop" @@ -240,9 +240,9 @@ foreach mysite ( $sites ) else ./xmlchange --id RUN_STARTDATE --val $startyear[$cnt]-01-01 endif - ./xmlchange --id DATM_CLMNCEP_YR_ALIGN --val $alignyear - ./xmlchange --id DATM_CLMNCEP_YR_START --val $startyears - ./xmlchange --id DATM_CLMNCEP_YR_END --val $endyears + ./xmlchange --id DATM_YR_ALIGN --val $alignyear + ./xmlchange --id DATM_YR_START --val $startyears + ./xmlchange --id DATM_YR_END --val $endyears if ($alignyear == 1) then ./xmlchange --id CALENDAR --val NO_LEAP endif @@ -263,7 +263,7 @@ foreach mysite ( $sites ) ./preview_namelists # Have to force this for some reason if ($SPINUP_P1 == FALSE) then - ./xmlchange --id DATM_CLMNCEP_YR_END --val $endyear[$cnt] + ./xmlchange --id DATM_YR_END --val $endyear[$cnt] ./preview_namelists endif if ( $status != 0 )then From f2a8ce051099244efd3cbd38279865ea04f1d61f Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 29 Oct 2024 18:46:45 -0600 Subject: [PATCH 12/17] Remove some more DATM_C..._YR_... --- cime_config/buildnml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index e9b7a610cd..e06b9388c7 100644 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -52,16 +52,8 @@ def buildnml(case, caseroot, compname): clm_accelerated_spinup = case.get_value("CLM_ACCELERATED_SPINUP") comp_interface = case.get_value("COMP_INTERFACE") lilac_mode = case.get_value("LILAC_MODE") - if comp_interface == "nuopc": - yr_start = case.get_value("DATM_YR_START") - yr_end = case.get_value("DATM_YR_END") - else: - yr_start = case.get_value("DATM_CLMNCEP_YR_START") - yr_end = case.get_value("DATM_CLMNCEP_YR_END") - - if yr_start != None and yr_start < 0: - yr_start = case.get_value("DATM_CPLHIST_YR_START") - yr_end = case.get_value("DATM_CPLHIST_YR_END") + yr_start = case.get_value("DATM_YR_START") + yr_end = case.get_value("DATM_YR_END") # For LILAC if yr_start == None or lilac_mode == "on": From c697c76a5bec4837075f82eacef45ef36b7eeab0 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 29 Oct 2024 18:51:47 -0600 Subject: [PATCH 13/17] Remove additional DATM_C..._YR_... --- .../running-special-cases/Running-with-anomaly-forcing.rst | 2 +- ...us-simulation-as-atmospheric-forcing-to-spinup-the-model.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/users_guide/running-special-cases/Running-with-anomaly-forcing.rst b/doc/source/users_guide/running-special-cases/Running-with-anomaly-forcing.rst index 0c6009f3fe..2efa65893d 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-anomaly-forcing.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-anomaly-forcing.rst @@ -42,4 +42,4 @@ For single point simulations, the global anomaly forcing files can be used, but mapalgo = 'nn','nn','nn','nn','nn','nn','nn','nn','nn','nn','nn','nn','nn' (the number of 'nn' values will depend on the number of original streams plus the number of anomaly forcing streams) -The cycling of the present-day (base) climate is controlled through the DATM\_CLMNCEP\_YR\_START and DATM_CLMNCEP\_YR\_END variables in env\_run.xml. +The cycling of the present-day (base) climate is controlled through the DATM\_YR\_START and DATM\_YR\_END variables in env\_run.xml. diff --git a/doc/source/users_guide/running-special-cases/Running-with-your-own-previous-simulation-as-atmospheric-forcing-to-spinup-the-model.rst b/doc/source/users_guide/running-special-cases/Running-with-your-own-previous-simulation-as-atmospheric-forcing-to-spinup-the-model.rst index 2a55cbed1e..88d209c0d1 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-your-own-previous-simulation-as-atmospheric-forcing-to-spinup-the-model.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-your-own-previous-simulation-as-atmospheric-forcing-to-spinup-the-model.rst @@ -51,7 +51,7 @@ Example: Simulation Forced with Data from the Previous Simulation > ./xmlchange DATM_CPLHIST_CASE="myB1850" # The following sets the align year and years to run over for atm forcing # (you could also use an editor) - > ./xmlchange DATM_CPLHIST_YR_ALIGN="1",DATM_CPLHIST_YR_START=1,DATM_CPLHIST_YR_END=20 + > ./xmlchange DATM_YR_ALIGN="1",DATM_YR_START=1,DATM_YR_END=20 # Set the strm_datdir in the namelist_defaults_datm.xml # file to the archival path of the case above in the form of: /glade/home/achive/$USER/$DATM_CPLHIST_CASE/cpl/hist # NOTE: THIS WILL CHANGE THE PATH FOR ALL I1850Clm50BgcSpinup COMPSET CASES MADE AFTER THIS! From 862739bcbd044133e12afb9a60c0562d67bece44 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Wed, 30 Oct 2024 10:47:32 -0600 Subject: [PATCH 14/17] Replace outdated DATM_CPL_CASE with DATM_CPLHIST_CASE --- ...AR-data-as-atmospheric-forcing-to-spinup-the-model.rst | 2 +- .../customizing-the-clm-configuration.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst b/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst index a81465c699..cf9fbc773c 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst @@ -18,7 +18,7 @@ Example: Simulation with MOAR Data on derecho > ./create_newcase -case MOARforce1850 -res f19_g17_gl4 -compset I1850Clm50BgcSpinup > cd MOARforce1850 # The following sets the casename to point to for atm forcing (you could also use an editor) - > ./xmlchange DATM_CPL_CASE=b40.1850.track1.1deg.006a + > ./xmlchange DATM_CPLHIST_CASE=b40.1850.track1.1deg.006a # The following sets the align year and years to run over for atm forcing # (you could also use an editor) > ./xmlchange DATM_YR_ALIGN=1,DATM_YR_START=960,DATM_YR_END=1030 diff --git a/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst b/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst index 11e996ae5d..ec28a0d624 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/customizing-the-clm-configuration.rst @@ -513,7 +513,7 @@ For running "I" cases there are several other noteworthy configuration items tha DATM_YR_ALIGN DATM_YR_START DATM_YR_END - DATM_CPL_CASE + DATM_CPLHIST_CASE ``CCSM_CO2_PPMV`` Sets the mixing ratio of CO2 in parts per million by volume for ALL CESM components to use. Note that most compsets already set this value to something reasonable. Also note that some compsets may tell the atmosphere model to override this value with either historic or ramped values. If the ``CCSM_BGC`` variable is set to something other than "none" the atmosphere model will determine CO2, and CLM will listen and use what the atmosphere sends it. On the CLM side the namelist item ``co2_type`` tells CLM to use the value sent from the atmosphere rather than a value set on it's own namelist. @@ -575,8 +575,8 @@ DATM_YR_END DATM_YR_ALIGN ``DATM_YR_START`` and ``DATM_YR_END`` determine the range of years to cycle the atmospheric data over, and ``DATM_YR_ALIGN`` determines which year in that range of years the simulation will start with. -DATM_CPL_CASE - ``DATM_CPL_CASE`` sets the casename to use for the ``CPLHISTForcing`` mode. +DATM_CPLHIST_CASE + ``DATM_CPLHIST_CASE`` sets the casename to use for the ``CPLHISTForcing`` mode. ----------------------------- Downloading DATM Forcing Data @@ -586,7 +586,7 @@ In Chapter One of the `CESM User's Guide `_ there is a section The `CLMCRUNCEP` data is uploaded into the subversion inputdata repository as well -- but as it is 1.1 Terabytes of data downloading it is problematic (*IT WILL TAKE SEVERAL DAYS TO DOWNLOAD THE ENTIRE DATASET USING SUBVERSION*). Because of its size you may also need to download it onto a separate disk space. We have done that on derecho for example where it resides in ``$ENV{CESMROOT}/lmwg`` while the rest of the input data resides in ``$ENV{CESMDATAROOT}/inputdata``. The data is also already available on: janus, franklin, and hopper. If you download the data, we recommend that you break your download into several chunks, by setting up a case and setting the year range for ``DATM_YR_START`` and ``DATM_YR_END`` in say 20 year sections over 1901 to 2010, and then use ``check_input_data`` to export the data. -The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on derecho. The DATM assumes the path for derecho of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine. You can download the data itself from NCAR HPSS from ``/CCSM/csm/$DATM_CPLHIST_CASE``. +The ``CPLHISTForcing`` DATM forcing data is unique -- because it is large compared to the rest of the input data, and we only have a disk copy on derecho. The DATM assumes the path for derecho of ``/glade/p/cesm/shared_outputdata/cases/ccsm4/$DATM_CPLHIST_CASE`` for the data. So you will need to change this path in order to run on any other machine. -------------------------------------- Customizing via the build script files From 16d83c15cce709955a44ca75115e718e84bc6a7f Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 1 Nov 2024 12:42:17 -0600 Subject: [PATCH 15/17] Add warning box to MOAR User's Guide page. --- ...th-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst b/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst index cf9fbc773c..7c18cee009 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-MOAR-data-as-atmospheric-forcing-to-spinup-the-model.rst @@ -6,6 +6,9 @@ Running with MOAR data ======================== +.. warning:: + These instructions are outdated and will not work. This page will be either updated or removed as part of the CTSM6/CLM3 release. + Because it takes so long to spinup the CN model (as we just saw previously), if you are doing fully coupled simulations with active atmosphere and ocean, you will want to do the spinup portion of this "offline". So instead of doing expensive fully coupled simulations for the spinup duration, you run CLM in a very cheap "I" compset using atmospheric forcing from a shorter fully coupled simulation (or a simulation run previously by someone else). In this example we will use the ``I1850Clm50BgcSpinup compset`` to setup CLM to run with atmospheric forcing from a previous fully coupled simulation with data that is already stored on disk on Cheyenne. There are several simulations that have high frequency data for which we can do this. You can also do this on a machine other than Cheyenne, but would need to download the data from the Earth System Grid and change the datapath similar to Example :numref:`eg-sim-data-from-prev-sim`. From 000b70d74e627ff457b7353bc88921f3035fdd68 Mon Sep 17 00:00:00 2001 From: Adrianna Foster Date: Sat, 9 Nov 2024 12:42:16 -0700 Subject: [PATCH 16/17] adding izumi nag fails --- cime_config/testdefs/ExpectedTestFails.xml | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 7049e9672b..b403c95b7e 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -283,6 +283,57 @@ #2325 + + + + + FAIL + #2861 + + + + + + FAIL + #2861 + + + + + + FAIL + #2861 + + + + + + FAIL + #2861 + + + + + + FAIL + #2861 + + + + + + FAIL + #2861 + + + + + + FAIL + #2861 + + + From bbe061dfa37394d2ffcd541ebd19aaae1dfbef5f Mon Sep 17 00:00:00 2001 From: Adrianna Foster Date: Sat, 9 Nov 2024 12:54:31 -0700 Subject: [PATCH 17/17] changelog --- doc/ChangeLog | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 58 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 3620cd8c15..7dcda101aa 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,61 @@ =============================================================== +Tag name: ctsm5.3.010 +Originator(s): afoster (Adrianna Foster) +Date: Sat Nov 9 12:54:18 MST 2024 +One-line Summary: Merge b4b-dev + +Purpose and description of changes +---------------------------------- + +- moves namelist variables to parameter file for PPE and makes some parameter variables pft-dimensioned (resolves ESCOMP/CTSM#2830 and resolves ESCOMP/CTSM#2831) +- removes/replaces references to DATM_C* _YR_* variables (resolves ESCOMP/CTSM#2743) +- documents that fincl1 and fexcl1 map to 'h0' history files + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +- ESCOMP/CTSM#2830 (allow LUNA & mortality parameter to vary by PFT; https://github.com/ESCOMP/CTSM/issues/2830) +- ESCOMP/CTSM#2831 (Move namelist parameters to paramfile; https://github.com/ESCOMP/CTSM/issues/2831) +- ESCOMP/CTSM#2743 (Docs: Remove refs to DATM_CLMNCEP_YR_* and DATM_CPL_YR_* variables; https://github.com/ESCOMP/CTSM/issues/2743) + + +Testing summary: +---------------- + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +- ESCOMP/CTSM#2845: PPE parameter work -Addresses issues 2830 and 2831 (https://github.com/ESCOMP/CTSM/pull/2845) +- ESCOMP/CTSM#2852: Remove/replace refs to DATM_C*_YR_* variables (https://github.com/ESCOMP/CTSM/pull/2852) +- ESCOMP/CTSM#2866: Document that fincl1 maps to 'h0' history file. And fexcl1 (https://github.com/ESCOMP/CTSM/pull/2866) + +=============================================================== +=============================================================== Tag name: ctsm5.3.009 Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) Date: Tue Oct 15 17:35:40 MDT 2024 diff --git a/doc/ChangeSum b/doc/ChangeSum index af6e1675b4..46e1176fd3 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.3.010 afoster 11/09/2024 Merge b4b-dev ctsm5.3.009 samrabin 10/15/2024 Reduce outputs from matrixcnOn tests ctsm5.3.008 olyson 10/14/2024 PPE change to sa_leaf in CanopyFluxesMod.F90 ctsm5.3.007 slevis 10/14/2024 Clm60 finidat updates for ne30, f09, f19 grids