From 7d8d0f6e2b47de2c0cb7a989942c995481a9c775 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 14 Aug 2024 17:35:00 -0600 Subject: [PATCH 01/60] Add failing tests for running with dust set by CAM so LND_SETS_DUST_EMIS_DRV_FLDS is FALSE --- bld/unit_testers/build-namelist_test.pl | 29 +++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index c51b0b0cb3..28e6084f0e 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -447,7 +447,32 @@ sub cat_and_create_namelistinfile { &cleanup(); } } - +print "\n===============================================================================\n"; +print "Test setting drv_flds_in fields in CAM"; +print "=================================================================================\n"; +foreach my $phys ( "clm5_0", "clm6_0" ) { + $mode = "-phys $phys CAM_SETS_DRV_FLDS"; + &make_config_cache($phys); + foreach my $options ( + "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0", + "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0", + ) { + &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); + eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; + is( $@, '', "options: $options" ); + $cfiles->checkfilesexist( "$options", $mode ); + $cfiles->shownmldiff( "default", $mode ); + if ( defined($opts{'compare'}) ) { + $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); + $cfiles->dodiffonfile( "lnd_in", "$options", $mode ); + $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); + } + if ( defined($opts{'generate'}) ) { + $cfiles->copyfiles( "$options", $mode ); + } + &cleanup(); + } +} print "\n==============================================================\n"; print "Test several use_cases and specific configurations for clm5_0\n"; print "==============================================================\n"; @@ -518,7 +543,7 @@ sub cat_and_create_namelistinfile { phys=>"clm4_5", }, "LeungDust_WO_Prigent" =>{ options=>" -envxml_dir . -bgc sp", - namelst=>"use_prigent_roughness=.false.", + namelst=>"use_prigent_roughness=.true.", phys=>"clm5_1", }, "soilm_stream off w file" =>{ options=>"-res 0.9x1.25 -envxml_dir .", From a590ca7e57c965e1cfc46779cb5c6f1dc34bfb27 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 15 Aug 2024 01:59:10 -0600 Subject: [PATCH 02/60] When LND_SETS_DUST_EMIS_DRV_FLDS is FALSE read in CAM drv_flds_in namelist to use to determine dust_emis settings, still check that they aren't set in the user_nl_clm file --- bld/CLMBuildNamelist.pm | 51 +++++++++++++++---------- bld/unit_testers/build-namelist_test.pl | 4 +- bld/unit_testers/empty_user_nl_clm | 1 + 3 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 bld/unit_testers/empty_user_nl_clm diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index b99be288e7..daf4320c18 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1470,6 +1470,32 @@ sub process_namelist_commandline_namelist { } } +sub process_namelist_infile { + my ($definition, $nl, $envxml_ref, $infile) = @_; + + # Make sure a valid file was found + if ( -f "$infile" ) { + # Otherwise abort as a valid file doesn't exist + } else { + $log->fatal_error("input namelist file does NOT exist $infile.\n $@"); + } + # Parse namelist input from the next file + my $nl_infile = Build::Namelist->new($infile); + + # Validate input namelist -- trap exceptions + my $nl_infile_valid; + eval { $nl_infile_valid = $definition->validate($nl_infile); }; + if ($@) { + $log->fatal_error("Invalid namelist variable in '-infile' $infile.\n $@"); + } + # Go through all variables and expand any XML env settings in them + expand_xml_variables_in_namelist( $nl_infile_valid, $envxml_ref ); + + # Merge input values into namelist. Previously specified values have higher precedence + # and are not overwritten. + $nl->merge_nl($nl_infile_valid); +} + #------------------------------------------------------------------------------- sub process_namelist_commandline_infile { @@ -1479,27 +1505,7 @@ sub process_namelist_commandline_infile { if (defined $opts->{'infile'}) { my @infiles = split( /,/, $opts->{'infile'} ); foreach my $infile ( @infiles ) { - # Make sure a valid file was found - if ( -f "$infile" ) { - # Otherwise abort as a valid file doesn't exist - } else { - $log->fatal_error("input namelist file does NOT exist $infile.\n $@"); - } - # Parse namelist input from the next file - my $nl_infile = Build::Namelist->new($infile); - - # Validate input namelist -- trap exceptions - my $nl_infile_valid; - eval { $nl_infile_valid = $definition->validate($nl_infile); }; - if ($@) { - $log->fatal_error("Invalid namelist variable in '-infile' $infile.\n $@"); - } - # Go through all variables and expand any XML env settings in them - expand_xml_variables_in_namelist( $nl_infile_valid, $envxml_ref ); - - # Merge input values into namelist. Previously specified values have higher precedence - # and are not overwritten. - $nl->merge_nl($nl_infile_valid); + process_namelist_infile( $definition, $nl, $envxml_ref, $infile ); } } } @@ -4086,6 +4092,9 @@ sub setup_logic_dust_emis { " connected to CAM as CAM should set them"); } } + # Now process the CAM drv_flds_in to get the dust settings + my $infile = $opts->{'envxml_dir'} . "/Buildconf/camconf/drv_flds_in"; + process_namelist_infile( $definition, $nl, $envxml_ref, $infile ); } } diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 28e6084f0e..1b54f29d92 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -454,8 +454,8 @@ sub cat_and_create_namelistinfile { $mode = "-phys $phys CAM_SETS_DRV_FLDS"; &make_config_cache($phys); foreach my $options ( - "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0", - "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0", + "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", + "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; diff --git a/bld/unit_testers/empty_user_nl_clm b/bld/unit_testers/empty_user_nl_clm new file mode 100644 index 0000000000..45fda13d2c --- /dev/null +++ b/bld/unit_testers/empty_user_nl_clm @@ -0,0 +1 @@ +! empty user_nl_clm file From 733cf9918178fc89a1c6ee2c34447160e5e944fb Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 15 Aug 2024 15:20:33 -0600 Subject: [PATCH 03/60] Add missing cmeps drv_flds_in variables fixing #2170 --- .../namelist_definition_drv_flds.xml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/bld/namelist_files/namelist_definition_drv_flds.xml b/bld/namelist_files/namelist_definition_drv_flds.xml index 89bab07f4f..9bb1a3e3b0 100644 --- a/bld/namelist_files/namelist_definition_drv_flds.xml +++ b/bld/namelist_files/namelist_definition_drv_flds.xml @@ -123,6 +123,10 @@ List of fluxes needed by the CARMA model, from CLM to CAM. + + + + Which dust emission method is going to be used. Either the Zender 2003 scheme or the Leung 2023 scheme. @@ -136,4 +140,27 @@ (only used when dust_emis_method is Zender_2003) + + + + + + Frequency of surface ozone field passed from CAM to surface components. + Surface ozone is passed every coupling interval, but this namelist flag + indicates whether the timestep-level values are interpolated from a + coarser temporal resolution. + Default: set by CAM + + + + + + + + If TRUE atmosphere model will provide prognosed lightning flash frequency. + (NOTE: NOT CONNECTED INTO CTSM YET) + + From 3f3541b37b7ff9abe37050c98575b61b3702e688 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 15 Aug 2024 15:41:00 -0600 Subject: [PATCH 04/60] Current drv_flds_in file from CAM for a FHIST case, including some fields that weren't being set in CLM --- bld/unit_testers/Buildconf/camconf/drv_flds_in | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bld/unit_testers/Buildconf/camconf/drv_flds_in diff --git a/bld/unit_testers/Buildconf/camconf/drv_flds_in b/bld/unit_testers/Buildconf/camconf/drv_flds_in new file mode 100644 index 0000000000..e8e95ad369 --- /dev/null +++ b/bld/unit_testers/Buildconf/camconf/drv_flds_in @@ -0,0 +1,13 @@ +&drydep_inparm + dep_data_file = '/glade/campaign/cesm/cesmdata/inputdata/atm/cam/chem/trop_mozart/dvel/dep_data_c20221208.nc' +/ +&dust_emis_inparm + dust_emis_method = 'Zender_2003' + zender_soil_erod_source = 'atm' +/ +&lightning_coupling_nl + atm_provides_lightning = .true. +/ +&ozone_coupling_nl + atm_ozone_frequency = 'multiday_average' +/ From 6268e5907d7563d350fba6f7bb79b0bae3e6344d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 16 Aug 2024 09:55:02 -0600 Subject: [PATCH 05/60] Add megan and drydep settings as per a cam6_4_015 SMS_Ln9.f19_f19_mg17.FHIST.derecho_intel.cam-outfrq9s test --- bld/unit_testers/Buildconf/camconf/drv_flds_in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bld/unit_testers/Buildconf/camconf/drv_flds_in b/bld/unit_testers/Buildconf/camconf/drv_flds_in index e8e95ad369..c551ccacf5 100644 --- a/bld/unit_testers/Buildconf/camconf/drv_flds_in +++ b/bld/unit_testers/Buildconf/camconf/drv_flds_in @@ -1,5 +1,16 @@ &drydep_inparm - dep_data_file = '/glade/campaign/cesm/cesmdata/inputdata/atm/cam/chem/trop_mozart/dvel/dep_data_c20221208.nc' + dep_data_file = '/glade/campaign/cesm/cesmdata/inputdata/atm/cam/chem/trop_mozart/dvel/dep_data_c20221208.nc' + drydep_list = 'DMS','H2O2','H2SO4','SO2','SOAG' +/ +&megan_emis_nl + megan_factors_file = '/glade/campaign/cesm/cesmdata/inputdata/atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc' + megan_mapped_emisfctrs = .false. + megan_specifier = 'SOAE = 0.5954*isoprene + 5.1004*(carene_3 + pinene_a + thujene_a + bornene +', ' terpineol_4 + terpineol_a + terpinyl_ACT_a + myrtenal + sabinene + pinene_b + camphene +', + ' fenchene_a + limonene + phellandrene_a + terpinene_a + terpinene_g + terpinolene +', ' phellandrene_b + linalool + ionone_b + geranyl_acetone + neryl_acetone + jasmone +', + ' verbenene + ipsenol + myrcene + ocimene_t_b + ocimene_al + ocimene_c_b + 2met_nonatriene) + ', ' 12.3942*(farnescene_a + caryophyllene_b + acoradiene + aromadendrene + bergamotene_a +', + ' bergamotene_b + bisabolene_a + bisabolene_b + bourbonene_b + cadinene_d + cadinene_g +', ' cedrene_a + copaene_a + cubebene_a + cubebene_b + elemene_b + farnescene_b +', + ' germacrene_B + germacrene_D + gurjunene_b + humulene_a + humulene_g + isolongifolene +', ' longifolene + longipinene + muurolene_a + muurolene_g + selinene_b + selinene_d +', + ' nerolidol_c + nerolidol_t)' / &dust_emis_inparm dust_emis_method = 'Zender_2003' From 6b0b655c7fe46ad73d61e1f1acf6cbd4581f1483 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 16 Aug 2024 14:01:49 -0600 Subject: [PATCH 06/60] Improve peat burning dependence on climate. --- src/biogeochem/CNFireLi2024Mod.F90 | 26 +++++++++++-------------- src/biogeophys/Wateratm2lndBulkType.F90 | 20 +++++++++++++++++++ 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 503ed28488..5f1c88811f 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -151,11 +151,9 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ real(r8) :: afuel !weight for arh and arh30 real(r8) :: btran_col(bounds%begc:bounds%endc) logical :: transient_landcover ! whether this run has any prescribed transient landcover - real(r8), target :: prec60_col_target(bounds%begc:bounds%endc) - real(r8), target :: prec10_col_target(bounds%begc:bounds%endc) + real(r8), target :: prec30_col_target(bounds%begc:bounds%endc) real(r8), target :: rh30_col_target(bounds%begc:bounds%endc) - real(r8), pointer :: prec60_col(:) - real(r8), pointer :: prec10_col(:) + real(r8), pointer :: prec30_col(:) real(r8), pointer :: rh30_col(:) !----------------------------------------------------------------------- @@ -194,8 +192,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ forc_t => atm2lnd_inst%forc_t_downscaled_col , & ! Input: [real(r8) (:) ] downscaled atmospheric temperature (Kelvin) forc_rain => wateratm2lndbulk_inst%forc_rain_downscaled_col , & ! Input: [real(r8) (:) ] downscaled rain forc_snow => wateratm2lndbulk_inst%forc_snow_downscaled_col , & ! Input: [real(r8) (:) ] downscaled snow - prec60 => wateratm2lndbulk_inst%prec60_patch , & ! Input: [real(r8) (:) ] 60-day running mean of tot. precipitation - prec10 => wateratm2lndbulk_inst%prec10_patch , & ! Input: [real(r8) (:) ] 10-day running mean of tot. precipitation + prec30 => wateratm2lndbulk_inst%prec30_patch , & rh30 => wateratm2lndbulk_inst%rh30_patch , & ! Input: [real(r8) (:) ] 10-day running mean of tot. precipitation dwt_smoothed => cnveg_state_inst%dwt_smoothed_patch , & ! Input: [real(r8) (:) ] change in patch weight (-1 to 1) on the gridcell, smoothed over the year cropf_col => cnveg_state_inst%cropf_col , & ! Input: [real(r8) (:) ] cropland fraction in veg column @@ -246,15 +243,11 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ transient_landcover = run_has_transient_landcover() !pft to column average - prec10_col =>prec10_col_target + prec30_col =>prec30_col_target call p2c(bounds, num_soilc, filter_soilc, & - prec10(bounds%begp:bounds%endp), & - prec10_col(bounds%begc:bounds%endc)) + prec30(bounds%begp:bounds%endp), & + prec30_col(bounds%begc:bounds%endc)) - prec60_col =>prec60_col_target - call p2c(bounds, num_soilc, filter_soilc, & - prec60(bounds%begp:bounds%endp), & - prec60_col(bounds%begc:bounds%endc)) rh30_col =>rh30_col_target call p2c(bounds, num_soilc, filter_soilc, & @@ -545,9 +538,12 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ c = filter_soilc(fc) g= col%gridcell(c) if(grc%latdeg(g) < cnfire_const%borealat )then + if((trotr1_col(c)+trotr2_col(c))*col%wtgcell(c)<=0.8_r8.and.trotr1_col(c)+trotr2_col(c)>0.0_r8) then baf_peatf(c) = non_boreal_peatfire_c/secsphr*max(0._r8, & - min(1._r8,(4.0_r8-prec60_col(c)*secspday)/ & - 4.0_r8))**2*peatf_lf(c)*(1._r8-fsat(c)) + min(1._r8,(1._r8-prec30_col(c)*secspday/6._r8)))*peatf_lf(c) + else + baf_peatf(c)=0._r8 + end if else baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/0.3_r8))* & max(0._r8,min(1._r8,(tsoi17(c)-SHR_CONST_TKFRZ)/10._r8))*peatf_lf(c)* & diff --git a/src/biogeophys/Wateratm2lndBulkType.F90 b/src/biogeophys/Wateratm2lndBulkType.F90 index 4aacbe11c2..bcc0e6b0d9 100644 --- a/src/biogeophys/Wateratm2lndBulkType.F90 +++ b/src/biogeophys/Wateratm2lndBulkType.F90 @@ -35,6 +35,7 @@ module Wateratm2lndBulkType real(r8), pointer :: forc_rh_grc (:) ! atmospheric relative humidity (%) real(r8) , pointer :: prec365_col (:) ! col 365-day running mean of tot. precipitation (see comment in UpdateAccVars regarding why this is col-level despite other prec accumulators being patch-level) real(r8) , pointer :: prec60_patch (:) ! patch 60-day running mean of tot. precipitation (mm/s) + real(r8) , pointer :: prec30_patch (:) real(r8) , pointer :: prec10_patch (:) ! patch 10-day running mean of tot. precipitation (mm/s) real(r8) , pointer :: rh30_patch (:) ! patch 30-day running mean of relative humidity real(r8) , pointer :: prec24_patch (:) ! patch 24-hour running mean of tot. precipitation (mm/s) @@ -126,6 +127,7 @@ subroutine InitBulkAllocate(this, bounds) allocate(this%forc_rh_grc (begg:endg)) ; this%forc_rh_grc (:) = ival allocate(this%prec365_col (begc:endc)) ; this%prec365_col (:) = nan allocate(this%prec60_patch (begp:endp)) ; this%prec60_patch(:) = nan + allocate(this%prec30_patch (begp:endp)) ; this%prec30_patch(:) = nan allocate(this%prec10_patch (begp:endp)) ; this%prec10_patch(:) = nan allocate(this%rh30_patch (begp:endp)) ; this%rh30_patch (:) = nan if (use_fates) then @@ -198,6 +200,12 @@ subroutine InitBulkHistory(this, bounds) call hist_addfld1d (fname=this%info%fname('PREC60'), units='MM H2O/S', & avgflag='A', long_name=this%info%lname('60-day running mean of PREC'), & ptr_patch=this%prec60_patch, default='inactive') + + this%prec30_patch(begp:endp) = spval + call hist_addfld1d (fname=this%info%fname('PREC30'), units='MM H2O/S', & + avgflag='A', long_name=this%info%lname('30-day running mean of PREC'), & + ptr_patch=this%prec30_patch, default='inactive') + end if end subroutine InitBulkHistory @@ -245,6 +253,11 @@ subroutine InitAccBuffer (this, bounds) desc='60-day running mean of total precipitation', accum_type='runmean', accum_period=-60, & subgrid_type='pft', numlev=1, init_value=0._r8) + call init_accum_field (name='PREC30', units='MM H2O/S', & + desc='30-day running mean of total precipitation', accum_type='runmean', accum_period=-30, & + subgrid_type='pft', numlev=1, init_value=0._r8) + + call init_accum_field (name='RH30', units='%', & desc='30-day running mean of relative humidity', accum_type='runmean', accum_period=-30, & subgrid_type='pft', numlev=1, init_value=100._r8) @@ -324,6 +337,9 @@ subroutine InitAccVars(this, bounds) call extract_accum_field ('PREC60', rbufslp, nstep) this%prec60_patch(begp:endp) = rbufslp(begp:endp) + call extract_accum_field ('PREC30', rbufslp, nstep) + this%prec30_patch(begp:endp) = rbufslp(begp:endp) + call extract_accum_field ('RH30', rbufslp, nstep) this%rh30_patch(begp:endp) = rbufslp(begp:endp) end if @@ -404,6 +420,9 @@ subroutine UpdateAccVars (this, bounds) call update_accum_field ('PREC60', rbufslp, nstep) call extract_accum_field ('PREC60', this%prec60_patch, nstep) + call update_accum_field ('PREC30', rbufslp, nstep) + call extract_accum_field ('PREC30', this%prec30_patch, nstep) + ! Accumulate and extract PREC10 (accumulates total precipitation as 10-day running mean) call update_accum_field ('PREC10', rbufslp, nstep) call extract_accum_field ('PREC10', this%prec10_patch, nstep) @@ -483,6 +502,7 @@ subroutine Clean(this) ! anomaly forcing deallocate(this%prec365_col) deallocate(this%prec60_patch) + deallocate(this%prec30_patch) deallocate(this%prec10_patch) if (use_fates) then deallocate(this%prec24_patch) From 617f88b2e6ea00f16371d83dc5392b844202df64 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 16 Aug 2024 14:02:17 -0600 Subject: [PATCH 07/60] Improve dependence of deforestation burning on climate. --- src/biogeochem/CNFireLi2024Mod.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 5f1c88811f..7495438d9b 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -625,17 +625,17 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ fbac1(c) = 0._r8 farea_burned(c) = baf_crop(c)+baf_peatf(c) else - cri = (4.0_r8*trotr1_col(c)+1.8_r8*trotr2_col(c))/(trotr1_col(c)+trotr2_col(c)) - cli = (max(0._r8,min(1._r8,(cri-prec60_col(c)*secspday)/cri))**0.5)* & - (max(0._r8,min(1._r8,(cri-prec10_col(c)*secspday)/cri))**0.5)* & + cri = (1.4_r8*trotr1_col(c)+0.5_r8*trotr2_col(c))/(trotr1_col(c)+trotr2_col(c)) + cli = max(0._r8,min(1._r8,1._r8-prec30_col(c)*secspday/cri))* & (15._r8*min(0.0016_r8,dtrotr_col(c)/dt*dayspyr*secspday)+0.009_r8)* & max(0._r8,min(1._r8,(0.25_r8-(forc_rain(c)+forc_snow(c))*secsphr)/0.25_r8)) - farea_burned(c) = fb*cli*(cli_scale/secspday)+baf_crop(c)+baf_peatf(c) + + farea_burned(c) = farea_burned(c)+fb*cli*(0.01_r8/secspday) ! burned area out of conversion region due to land use fire fbac1(c) = max(0._r8,fb*cli*(cli_scale/secspday) - 2.0_r8*lfc(c)/dt) end if ! total burned area out of conversion - fbac(c) = fbac1(c)+baf_crop(c)+baf_peatf(c) + fbac(c) = farea_burned(c) + fbac1(c) else fbac(c) = farea_burned(c) end if From 97405d769255605cc26b2a5cc96d31a039e68ed0 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 16 Aug 2024 14:03:23 -0600 Subject: [PATCH 08/60] Add (1) lightning igns in trop. closed forests, (2) landscape frag suppression. - Previously, neither lightning nor human ignitions (other than deforestation fire) were allowed there. - Landscape fragmentation suppression effect has to do with lfwt. --- src/biogeochem/CNFireLi2024Mod.F90 | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 7495438d9b..0dc12d4df9 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -297,9 +297,9 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ if( patch%itype(p) > nc4_grass )then cropf_col(c) = cropf_col(c) + patch%wtcol(p) end if - ! For natural vegetation (non-crop and non-bare-soil) - if( patch%itype(p) >= ndllf_evr_tmp_tree .and. patch%itype(p) <= nc4_grass )then - lfwt(c) = lfwt(c) + patch%wtcol(p) + ! For natural vegetation + if(patch%itype(p) <= nc4_grass )then + lfwt(c) = lfwt(c) + patch%wtgcell(p) end if end do ! @@ -589,7 +589,6 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ end if fuelc(c) = fuelc(c)/(1._r8-cropf_col(c)) fb = max(0.0_r8,min(1.0_r8,(fuelc(c)-lfuel)/(ufuel-lfuel))) - if (trotr1_col(c)+trotr2_col(c)<=0.6_r8) then afuel =min(1._r8,max(0._r8,(fuelc(c)-2500._r8)/(5000._r8-2500._r8))) arh=1._r8-max(0._r8, min(1._r8,(forc_rh(g)-rh_low)/(rh_hgh-rh_low))) arh30=1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/90._r8)) @@ -601,19 +600,24 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ end if lh = pot_hmn_ign_counts_alpha*6.8_r8*hdmlf**(0.43_r8)/30._r8/24._r8 fs = 1._r8-(0.01_r8+0.98_r8*exp(-0.025_r8*hdmlf)) + if (trotr1_col(c)+trotr2_col(c)<=0.6_r8) then ig = (lh+this%forc_lnfm(g)/(5.16_r8+2.16_r8* & cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & - cnfire_params%ignition_efficiency)*(1._r8-fs)*(1._r8-cropf_col(c)) + cnfire_params%ignition_efficiency)*(1._r8-fs)* & + (lfwt(c)**0.5) + else + ig = this%forc_lnfm(g)/(5.16_r8+2.16_r8* & + cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & + cnfire_params%ignition_efficiency*(1._r8-fs)* & + (lfwt(c)**0.5) + end if nfire(c) = ig/secsphr*fb*fire_m*lgdp_col(c) !fire counts/km2/sec Lb_lf = 1._r8+10._r8*(1._r8-EXP(-0.06_r8*forc_wind(g))) spread_m = fire_m**0.5_r8 + fd_col(c)=(lfwt(c)*lgdp1_col(c)*lpop_col(c))**0.5_r8 * fd_col(c) farea_burned(c) = min(1._r8,(cnfire_const%g0*spread_m*fsr_col(c)* & - fd_col(c)/1000._r8)**2*lgdp1_col(c)* & - lpop_col(c)*nfire(c)*SHR_CONST_PI*Lb_lf+ & + fd_col(c)/1000._r8)**2*nfire(c)*SHR_CONST_PI*Lb_lf+ & baf_crop(c)+baf_peatf(c)) ! fraction (0-1) per sec - else - farea_burned(c)=min(1._r8,baf_crop(c)+baf_peatf(c)) - end if ! ! if landuse change data is used, calculate deforestation fires and ! add it in the total of burned area fraction From 8418ec491f1dba682708b433805ae20b46be7b10 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 16 Aug 2024 14:04:54 -0600 Subject: [PATCH 09/60] Recalibrate li2024gswpfrc (namelist parameters only). --- bld/namelist_files/namelist_defaults_ctsm.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 674effd165..1d60fa9adc 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -355,14 +355,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 80.0d00 0.85d00 0.98d00 -0.025d00 -0.09d-4 +0.01d00 +0.28d-4 0.010d00 -0.17d-3 -0.21d00 +0.71d-4 +0.3d00 0.33d00 75.d00 -1050.d00 +825.d00 0.5d00 0.28d00 From 8de658065a6d94427052cffe0867acc280a37bb2 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 16 Aug 2024 14:12:32 -0600 Subject: [PATCH 10/60] Add fire_method li2024crujra. Same as li2024gswpfrc except rh_hgh now 85 (was 80). --- bld/namelist_files/namelist_defaults_ctsm.xml | 16 ++++++++++++++++ bld/namelist_files/namelist_definition_ctsm.xml | 3 ++- cime_config/testdefs/testlist_clm.xml | 10 ++++++++++ .../clm/FireLi2024CruJra/include_user_mods | 1 + .../clm/FireLi2024CruJra/user_nl_clm | 1 + src/biogeochem/CNFireFactoryMod.F90 | 2 +- 6 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/user_nl_clm diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 1d60fa9adc..777b7c4cff 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -366,6 +366,22 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 0.5d00 0.28d00 +30.0d00 +85.0d00 +0.85d00 +0.98d00 +0.01d00 +0.28d-4 +0.010d00 +0.71d-4 +0.3d00 +0.33d00 +75.d00 +825.d00 +0.5d00 +0.28d00 + + .false. .true. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 4cc50da391..134f0c41c7 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -252,7 +252,7 @@ formulation (1). + group="cnfire_inparm" valid_values="nofire,li2014qianfrc,li2016crufrc,li2021gswpfrc,li2024gswpfrc,li2024crujra" > The method type to use for CNFire nofire: Turn fire effects off @@ -260,6 +260,7 @@ li2014qianfrc: Reference paper Li, et. al.(2014) tuned with QIAN atmospheric for li2016crufrc: Reference paper Li, et. al.(2016) tuned with CRU-NCEP atmospheric forcing li2021gswpfrc: Reference paper Li, et. al.(2021?) tuned with GSWP3 atmospheric forcing li2024gswpfrc: No reference paper yet +li2024crujra: No reference paper yet, tuned with CRU-JRA forcing + + + + + + + + + + diff --git a/cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/include_user_mods new file mode 100644 index 0000000000..fe0e18cf88 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/include_user_mods @@ -0,0 +1 @@ +../default diff --git a/cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/user_nl_clm new file mode 100644 index 0000000000..437e4ef86e --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FireLi2024CruJra/user_nl_clm @@ -0,0 +1 @@ +fire_method = 'li2024crujra' diff --git a/src/biogeochem/CNFireFactoryMod.F90 b/src/biogeochem/CNFireFactoryMod.F90 index 876e28a5e3..27a1085336 100644 --- a/src/biogeochem/CNFireFactoryMod.F90 +++ b/src/biogeochem/CNFireFactoryMod.F90 @@ -116,7 +116,7 @@ subroutine create_cnfire_method( NLFilename, cnfire_method ) allocate(cnfire_li2016_type :: cnfire_method) case ("li2021gswpfrc") allocate(cnfire_li2021_type :: cnfire_method) - case ("li2024gswpfrc") + case ("li2024gswpfrc", "li2024crujra") allocate(cnfire_li2024_type :: cnfire_method) case default From 5e82825e8b5da4f5170181d764924872b958ec81 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 16 Aug 2024 14:16:00 -0600 Subject: [PATCH 11/60] Whitespace and comment fixes. --- src/biogeochem/CNFireLi2024Mod.F90 | 36 ++++++++++++------------- src/biogeophys/Wateratm2lndBulkType.F90 | 4 +-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 0dc12d4df9..d749e8000c 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -192,8 +192,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ forc_t => atm2lnd_inst%forc_t_downscaled_col , & ! Input: [real(r8) (:) ] downscaled atmospheric temperature (Kelvin) forc_rain => wateratm2lndbulk_inst%forc_rain_downscaled_col , & ! Input: [real(r8) (:) ] downscaled rain forc_snow => wateratm2lndbulk_inst%forc_snow_downscaled_col , & ! Input: [real(r8) (:) ] downscaled snow - prec30 => wateratm2lndbulk_inst%prec30_patch , & - rh30 => wateratm2lndbulk_inst%rh30_patch , & ! Input: [real(r8) (:) ] 10-day running mean of tot. precipitation + prec30 => wateratm2lndbulk_inst%prec30_patch , & ! Input: [real(r8) (:) ] 10-day running mean of tot. precipitation + rh30 => wateratm2lndbulk_inst%rh30_patch , & ! Input: [real(r8) (:) ] 10-day running mean of tot. relative humidity dwt_smoothed => cnveg_state_inst%dwt_smoothed_patch , & ! Input: [real(r8) (:) ] change in patch weight (-1 to 1) on the gridcell, smoothed over the year cropf_col => cnveg_state_inst%cropf_col , & ! Input: [real(r8) (:) ] cropland fraction in veg column gdp_lf => this%gdp_lf_col , & ! Input: [real(r8) (:) ] gdp data @@ -298,7 +298,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ cropf_col(c) = cropf_col(c) + patch%wtcol(p) end if ! For natural vegetation - if(patch%itype(p) <= nc4_grass )then + if (patch%itype(p) <= nc4_grass ) then lfwt(c) = lfwt(c) + patch%wtgcell(p) end if end do @@ -538,12 +538,12 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ c = filter_soilc(fc) g= col%gridcell(c) if(grc%latdeg(g) < cnfire_const%borealat )then - if((trotr1_col(c)+trotr2_col(c))*col%wtgcell(c)<=0.8_r8.and.trotr1_col(c)+trotr2_col(c)>0.0_r8) then - baf_peatf(c) = non_boreal_peatfire_c/secsphr*max(0._r8, & - min(1._r8,(1._r8-prec30_col(c)*secspday/6._r8)))*peatf_lf(c) - else - baf_peatf(c)=0._r8 - end if + if ((trotr1_col(c)+trotr2_col(c))*col%wtgcell(c)<=0.8_r8.and.trotr1_col(c)+trotr2_col(c)>0.0_r8) then + baf_peatf(c) = non_boreal_peatfire_c/secsphr*max(0._r8, & + min(1._r8,(1._r8-prec30_col(c)*secspday/6._r8)))*peatf_lf(c) + else + baf_peatf(c) = 0._r8 + end if else baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/0.3_r8))* & max(0._r8,min(1._r8,(tsoi17(c)-SHR_CONST_TKFRZ)/10._r8))*peatf_lf(c)* & @@ -601,15 +601,15 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ lh = pot_hmn_ign_counts_alpha*6.8_r8*hdmlf**(0.43_r8)/30._r8/24._r8 fs = 1._r8-(0.01_r8+0.98_r8*exp(-0.025_r8*hdmlf)) if (trotr1_col(c)+trotr2_col(c)<=0.6_r8) then - ig = (lh+this%forc_lnfm(g)/(5.16_r8+2.16_r8* & - cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & - cnfire_params%ignition_efficiency)*(1._r8-fs)* & - (lfwt(c)**0.5) + ig = (lh+this%forc_lnfm(g)/(5.16_r8+2.16_r8* & + cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & + cnfire_params%ignition_efficiency)*(1._r8-fs)* & + (lfwt(c)**0.5) else - ig = this%forc_lnfm(g)/(5.16_r8+2.16_r8* & - cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & - cnfire_params%ignition_efficiency*(1._r8-fs)* & - (lfwt(c)**0.5) + ig = this%forc_lnfm(g)/(5.16_r8+2.16_r8* & + cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & + cnfire_params%ignition_efficiency*(1._r8-fs)* & + (lfwt(c)**0.5) end if nfire(c) = ig/secsphr*fb*fire_m*lgdp_col(c) !fire counts/km2/sec Lb_lf = 1._r8+10._r8*(1._r8-EXP(-0.06_r8*forc_wind(g))) @@ -633,7 +633,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ cli = max(0._r8,min(1._r8,1._r8-prec30_col(c)*secspday/cri))* & (15._r8*min(0.0016_r8,dtrotr_col(c)/dt*dayspyr*secspday)+0.009_r8)* & max(0._r8,min(1._r8,(0.25_r8-(forc_rain(c)+forc_snow(c))*secsphr)/0.25_r8)) - + farea_burned(c) = farea_burned(c)+fb*cli*(0.01_r8/secspday) ! burned area out of conversion region due to land use fire fbac1(c) = max(0._r8,fb*cli*(cli_scale/secspday) - 2.0_r8*lfc(c)/dt) diff --git a/src/biogeophys/Wateratm2lndBulkType.F90 b/src/biogeophys/Wateratm2lndBulkType.F90 index bcc0e6b0d9..b3a28196f1 100644 --- a/src/biogeophys/Wateratm2lndBulkType.F90 +++ b/src/biogeophys/Wateratm2lndBulkType.F90 @@ -35,7 +35,7 @@ module Wateratm2lndBulkType real(r8), pointer :: forc_rh_grc (:) ! atmospheric relative humidity (%) real(r8) , pointer :: prec365_col (:) ! col 365-day running mean of tot. precipitation (see comment in UpdateAccVars regarding why this is col-level despite other prec accumulators being patch-level) real(r8) , pointer :: prec60_patch (:) ! patch 60-day running mean of tot. precipitation (mm/s) - real(r8) , pointer :: prec30_patch (:) + real(r8) , pointer :: prec30_patch (:) real(r8) , pointer :: prec10_patch (:) ! patch 10-day running mean of tot. precipitation (mm/s) real(r8) , pointer :: rh30_patch (:) ! patch 30-day running mean of relative humidity real(r8) , pointer :: prec24_patch (:) ! patch 24-hour running mean of tot. precipitation (mm/s) @@ -337,7 +337,7 @@ subroutine InitAccVars(this, bounds) call extract_accum_field ('PREC60', rbufslp, nstep) this%prec60_patch(begp:endp) = rbufslp(begp:endp) - call extract_accum_field ('PREC30', rbufslp, nstep) + call extract_accum_field ('PREC30', rbufslp, nstep) this%prec30_patch(begp:endp) = rbufslp(begp:endp) call extract_accum_field ('RH30', rbufslp, nstep) From e9b629db2cc57ac52e4ff691b4762968d364e80d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 16 Aug 2024 16:22:53 -0600 Subject: [PATCH 12/60] Simplify the validation checking for megan specifier as the expressions allowed are much more complex now, this resolves #2709 --- bld/CLMBuildNamelist.pm | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index daf4320c18..e4cc50614c 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -5652,26 +5652,10 @@ sub check_megan_spec { my $megan_spec = $nl->get_value('megan_specifier'); my @megan_spec_list = split( /\s*,\s*/, $megan_spec ); - foreach $megan_spec ( @megan_spec_list ) { - if ( $megan_spec =~ /^['"]+[A-Za-z0-9]+\s*\=\s*([\sA-Za-z0-9+_-]+)["']+$/ ) { - my $megan_list = $1; - my @megan_cmpds = split( /\s*\+\s*/, $megan_list ); - my $var = "megan_cmpds"; - my $warn = 0; - foreach my $megan_cmpd ( @megan_cmpds ) { - if ( ! $definition->is_valid_value( $var, $megan_cmpd, 'noquotes'=>1 ) ) { - $log->warning("megan_compound $megan_cmpd NOT found in list" ); - $warn++; - } - } - if ( $warn > 0 ) { - my @valid_values = $definition->get_valid_values( $var, 'noquotes'=>1 ); - $log->warning("list of megan compounds includes:\n" . - "@valid_values\n" . - "Does your megan_factors_file include more compounds?\n" . - "If NOT your simulation will fail." ); - } - } else { + foreach my $spec ( @megan_spec_list ) { + $megan_spec = remove_leading_and_trailing_quotes($spec); + # Do simple validation of the expressions to just check for valid characters + if ( ! $megan_spec =~ /[\s=A-Za-z0-9_\+\.\*\(\)-]+/ ) { $log->fatal_error("Bad format for megan_specifier = $megan_spec"); } } From bedff9cb7166472094026e774066706acf48af4c Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Tue, 20 Aug 2024 13:56:59 -0600 Subject: [PATCH 13/60] Whitespace and comment improvements. --- .../namelist_definition_ctsm.xml | 4 +- src/biogeochem/CNFireLi2024Mod.F90 | 60 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 134f0c41c7..8f39a4e9dd 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -258,8 +258,8 @@ The method type to use for CNFire nofire: Turn fire effects off li2014qianfrc: Reference paper Li, et. al.(2014) tuned with QIAN atmospheric forcing li2016crufrc: Reference paper Li, et. al.(2016) tuned with CRU-NCEP atmospheric forcing -li2021gswpfrc: Reference paper Li, et. al.(2021?) tuned with GSWP3 atmospheric forcing -li2024gswpfrc: No reference paper yet +li2021gswpfrc: No reference paper yet, tuned with GSWP3 atmospheric forcing +li2024gswpfrc: No reference paper yet, tuned with GSWP3 atmospheric forcing li2024crujra: No reference paper yet, tuned with CRU-JRA forcing diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index d749e8000c..b9158d9a17 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -588,36 +588,36 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ end do end if fuelc(c) = fuelc(c)/(1._r8-cropf_col(c)) - fb = max(0.0_r8,min(1.0_r8,(fuelc(c)-lfuel)/(ufuel-lfuel))) - afuel =min(1._r8,max(0._r8,(fuelc(c)-2500._r8)/(5000._r8-2500._r8))) - arh=1._r8-max(0._r8, min(1._r8,(forc_rh(g)-rh_low)/(rh_hgh-rh_low))) - arh30=1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/90._r8)) - if (forc_rh(g) < rh_hgh.and. wtlf(c) > 0._r8 .and. tsoi17(c)> SHR_CONST_TKFRZ)then - fire_m = ((afuel*arh30+(1._r8-afuel)*arh)**1.5_r8) & - *((1._r8-btran_col(c)/wtlf(c))**0.5_r8) - else - fire_m = 0._r8 - end if - lh = pot_hmn_ign_counts_alpha*6.8_r8*hdmlf**(0.43_r8)/30._r8/24._r8 - fs = 1._r8-(0.01_r8+0.98_r8*exp(-0.025_r8*hdmlf)) - if (trotr1_col(c)+trotr2_col(c)<=0.6_r8) then - ig = (lh+this%forc_lnfm(g)/(5.16_r8+2.16_r8* & - cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & - cnfire_params%ignition_efficiency)*(1._r8-fs)* & - (lfwt(c)**0.5) - else - ig = this%forc_lnfm(g)/(5.16_r8+2.16_r8* & - cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & - cnfire_params%ignition_efficiency*(1._r8-fs)* & - (lfwt(c)**0.5) - end if - nfire(c) = ig/secsphr*fb*fire_m*lgdp_col(c) !fire counts/km2/sec - Lb_lf = 1._r8+10._r8*(1._r8-EXP(-0.06_r8*forc_wind(g))) - spread_m = fire_m**0.5_r8 - fd_col(c)=(lfwt(c)*lgdp1_col(c)*lpop_col(c))**0.5_r8 * fd_col(c) - farea_burned(c) = min(1._r8,(cnfire_const%g0*spread_m*fsr_col(c)* & - fd_col(c)/1000._r8)**2*nfire(c)*SHR_CONST_PI*Lb_lf+ & - baf_crop(c)+baf_peatf(c)) ! fraction (0-1) per sec + fb = max(0.0_r8,min(1.0_r8,(fuelc(c)-lfuel)/(ufuel-lfuel))) + afuel = min(1._r8,max(0._r8,(fuelc(c)-2500._r8)/(5000._r8-2500._r8))) + arh = 1._r8-max(0._r8, min(1._r8,(forc_rh(g)-rh_low)/(rh_hgh-rh_low))) + arh30 = 1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/90._r8)) + if (forc_rh(g) < rh_hgh.and. wtlf(c) > 0._r8 .and. tsoi17(c)> SHR_CONST_TKFRZ)then + fire_m = ((afuel*arh30+(1._r8-afuel)*arh)**1.5_r8) & + *((1._r8-btran_col(c)/wtlf(c))**0.5_r8) + else + fire_m = 0._r8 + end if + lh = pot_hmn_ign_counts_alpha*6.8_r8*hdmlf**(0.43_r8)/30._r8/24._r8 + fs = 1._r8-(0.01_r8+0.98_r8*exp(-0.025_r8*hdmlf)) + if (trotr1_col(c)+trotr2_col(c)<=0.6_r8) then + ig = (lh+this%forc_lnfm(g)/(5.16_r8+2.16_r8* & + cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & + cnfire_params%ignition_efficiency)*(1._r8-fs)* & + (lfwt(c)**0.5) + else + ig = this%forc_lnfm(g)/(5.16_r8+2.16_r8* & + cos(SHR_CONST_PI/180._r8*3*min(60._r8,abs(grc%latdeg(g)))))* & + cnfire_params%ignition_efficiency*(1._r8-fs)* & + (lfwt(c)**0.5) + end if + nfire(c) = ig/secsphr*fb*fire_m*lgdp_col(c) !fire counts/km2/sec + Lb_lf = 1._r8+10._r8*(1._r8-EXP(-0.06_r8*forc_wind(g))) + spread_m = fire_m**0.5_r8 + fd_col(c) = (lfwt(c)*lgdp1_col(c)*lpop_col(c))**0.5_r8 * fd_col(c) + farea_burned(c) = min(1._r8,(cnfire_const%g0*spread_m*fsr_col(c)* & + fd_col(c)/1000._r8)**2*nfire(c)*SHR_CONST_PI*Lb_lf+ & + baf_crop(c)+baf_peatf(c)) ! fraction (0-1) per sec ! ! if landuse change data is used, calculate deforestation fires and ! add it in the total of burned area fraction From 861004b3b141102eb35199ee151dfbf13816d445 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Tue, 20 Aug 2024 16:05:15 -0600 Subject: [PATCH 14/60] Add parameter max_rh30_affecting_fuel. Value above which 30-day running relative humidity has no effect on fuel combustibility. --- bld/CLMBuildNamelist.pm | 2 +- bld/namelist_files/namelist_defaults_ctsm.xml | 5 +++++ bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/biogeochem/CNFireBaseMod.F90 | 8 +++++++- src/biogeochem/CNFireLi2016Mod.F90 | 3 ++- src/biogeochem/CNFireLi2021Mod.F90 | 3 ++- src/biogeochem/CNFireLi2024Mod.F90 | 3 ++- 7 files changed, 24 insertions(+), 5 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index b99be288e7..d09f79afe1 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2266,7 +2266,7 @@ sub setup_logic_cnfire { my @fire_consts = ( "rh_low", "rh_hgh", "bt_min", "bt_max", "cli_scale", "boreal_peatfire_c", "non_boreal_peatfire_c", "pot_hmn_ign_counts_alpha", "cropfire_a1", "occur_hi_gdp_tree", "lfuel", "ufuel", - "cmb_cmplt_fact_litter", "cmb_cmplt_fact_cwd" ); + "cmb_cmplt_fact_litter", "cmb_cmplt_fact_cwd", "max_rh30_affecting_fuel" ); if ( &value_is_true($nl->get_value('use_cn')) ) { foreach my $item ( @fire_consts ) { if ( ! &value_is_true($nl_flags->{'cnfireson'} ) ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 777b7c4cff..ef797f567a 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -244,6 +244,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). li2016crufrc li2014qianfrc +90. + 30.0d00 80.0d00 0.3d00 @@ -350,6 +352,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 1050.d00 0.5d00 0.28d00 +90. 30.0d00 80.0d00 @@ -365,6 +368,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 825.d00 0.5d00 0.28d00 +90. 30.0d00 85.0d00 @@ -380,6 +384,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 825.d00 0.5d00 0.28d00 +95. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 8f39a4e9dd..3e9a0b6b0b 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -333,6 +333,11 @@ Combustion completeness factor for litter (unitless) Combustion completeness factor for CWD[Course Woody Debris] (unitless) + +Value above which 30-day running relative humidity has no effect on fuel combustibility + + Critical threshold for truncation of Nitrogen (truncate Nitrogen states to zero below this value) diff --git a/src/biogeochem/CNFireBaseMod.F90 b/src/biogeochem/CNFireBaseMod.F90 index 7cc7750809..b66e44f8fb 100644 --- a/src/biogeochem/CNFireBaseMod.F90 +++ b/src/biogeochem/CNFireBaseMod.F90 @@ -68,6 +68,7 @@ module CNFireBaseMod real(r8) :: cmb_cmplt_fact_litter = 0.5_r8 ! combustion completion factor for litter (unitless) real(r8) :: cmb_cmplt_fact_cwd = 0.25_r8 ! combustion completion factor for CWD (unitless) + real(r8) :: max_rh30_affecting_fuel = 90._r8 ! Value above which 30-day running relative humidity has no effect on fuel combustibility (%) end type type, public :: params_type @@ -343,11 +344,13 @@ subroutine FireReadNML( this, NLFilename ) real(r8) :: non_boreal_peatfire_c, cropfire_a1 real(r8) :: rh_low, rh_hgh, bt_min, bt_max, occur_hi_gdp_tree real(r8) :: lfuel, ufuel, cmb_cmplt_fact_litter, cmb_cmplt_fact_cwd + real(r8) :: max_rh30_affecting_fuel namelist /lifire_inparm/ cli_scale, boreal_peatfire_c, pot_hmn_ign_counts_alpha, & non_boreal_peatfire_c, cropfire_a1, & rh_low, rh_hgh, bt_min, bt_max, occur_hi_gdp_tree, & - lfuel, ufuel, cmb_cmplt_fact_litter, cmb_cmplt_fact_cwd + lfuel, ufuel, cmb_cmplt_fact_litter, cmb_cmplt_fact_cwd, & + max_rh30_affecting_fuel if ( this%need_lightning_and_popdens() ) then cli_scale = cnfire_const%cli_scale @@ -364,6 +367,7 @@ subroutine FireReadNML( this, NLFilename ) occur_hi_gdp_tree = cnfire_const%occur_hi_gdp_tree cmb_cmplt_fact_litter = cnfire_const%cmb_cmplt_fact_litter cmb_cmplt_fact_cwd = cnfire_const%cmb_cmplt_fact_cwd + max_rh30_affecting_fuel = cnfire_const%max_rh30_affecting_fuel ! Initialize options to default values, in case they are not specified in ! the namelist @@ -397,6 +401,7 @@ subroutine FireReadNML( this, NLFilename ) call shr_mpi_bcast (occur_hi_gdp_tree , mpicom) call shr_mpi_bcast (cmb_cmplt_fact_litter , mpicom) call shr_mpi_bcast (cmb_cmplt_fact_cwd , mpicom) + call shr_mpi_bcast (max_rh30_affecting_fuel , mpicom) cnfire_const%cli_scale = cli_scale cnfire_const%boreal_peatfire_c = boreal_peatfire_c @@ -412,6 +417,7 @@ subroutine FireReadNML( this, NLFilename ) cnfire_const%occur_hi_gdp_tree = occur_hi_gdp_tree cnfire_const%cmb_cmplt_fact_litter = cmb_cmplt_fact_litter cnfire_const%cmb_cmplt_fact_cwd = cmb_cmplt_fact_cwd + cnfire_const%max_rh30_affecting_fuel = max_rh30_affecting_fuel if (masterproc) then write(iulog,*) ' ' diff --git a/src/biogeochem/CNFireLi2016Mod.F90 b/src/biogeochem/CNFireLi2016Mod.F90 index 955d7fe398..44e33edafc 100644 --- a/src/biogeochem/CNFireLi2016Mod.F90 +++ b/src/biogeochem/CNFireLi2016Mod.F90 @@ -179,6 +179,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ non_boreal_peatfire_c => cnfire_const%non_boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for non-boreal peatland fire pot_hmn_ign_counts_alpha => cnfire_const%pot_hmn_ign_counts_alpha , & ! Input: [real(r8) ] (/person/month) Potential human ignition counts boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire + max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -597,7 +598,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ if (trotr1_col(c)+trotr2_col(c)<=0.6_r8) then afuel =min(1._r8,max(0._r8,(fuelc(c)-2500._r8)/(5000._r8-2500._r8))) arh=1._r8-max(0._r8, min(1._r8,(forc_rh(g)-rh_low)/(rh_hgh-rh_low))) - arh30=1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/90._r8)) + arh30=1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/max_rh30_affecting_fuel)) if (forc_rh(g) < rh_hgh.and. wtlf(c) > 0._r8 .and. tsoi17(c)> SHR_CONST_TKFRZ)then fire_m = ((afuel*arh30+(1._r8-afuel)*arh)**1.5_r8)*((1._r8 -max(0._r8,& min(1._r8,(btran_col(c)/wtlf(c)-bt_min)/(bt_max-bt_min))))**0.5_r8) diff --git a/src/biogeochem/CNFireLi2021Mod.F90 b/src/biogeochem/CNFireLi2021Mod.F90 index 6d504a1e26..93c384f65a 100644 --- a/src/biogeochem/CNFireLi2021Mod.F90 +++ b/src/biogeochem/CNFireLi2021Mod.F90 @@ -177,6 +177,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ non_boreal_peatfire_c => cnfire_const%non_boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for non-boreal peatland fire pot_hmn_ign_counts_alpha => cnfire_const%pot_hmn_ign_counts_alpha , & ! Input: [real(r8) ] (/person/month) Potential human ignition counts boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire + max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -598,7 +599,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ if (trotr1_col(c)+trotr2_col(c)<=0.6_r8) then afuel =min(1._r8,max(0._r8,(fuelc(c)-2500._r8)/(5000._r8-2500._r8))) arh=1._r8-max(0._r8, min(1._r8,(forc_rh(g)-rh_low)/(rh_hgh-rh_low))) - arh30=1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/90._r8)) + arh30=1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/max_rh30_affecting_fuel)) if (forc_rh(g) < rh_hgh.and. wtlf(c) > 0._r8 .and. tsoi17(c)> SHR_CONST_TKFRZ)then fire_m = ((afuel*arh30+(1._r8-afuel)*arh)**1.5_r8) & *((1._r8-btran_col(c)/wtlf(c))**0.5_r8) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index b9158d9a17..8602ff4e46 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -175,6 +175,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ non_boreal_peatfire_c => cnfire_const%non_boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for non-boreal peatland fire pot_hmn_ign_counts_alpha => cnfire_const%pot_hmn_ign_counts_alpha , & ! Input: [real(r8) ] (/person/month) Potential human ignition counts boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire + max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -591,7 +592,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ fb = max(0.0_r8,min(1.0_r8,(fuelc(c)-lfuel)/(ufuel-lfuel))) afuel = min(1._r8,max(0._r8,(fuelc(c)-2500._r8)/(5000._r8-2500._r8))) arh = 1._r8-max(0._r8, min(1._r8,(forc_rh(g)-rh_low)/(rh_hgh-rh_low))) - arh30 = 1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/90._r8)) + arh30 = 1._r8-max(cnfire_params%prh30, min(1._r8,rh30_col(c)/max_rh30_affecting_fuel)) if (forc_rh(g) < rh_hgh.and. wtlf(c) > 0._r8 .and. tsoi17(c)> SHR_CONST_TKFRZ)then fire_m = ((afuel*arh30+(1._r8-afuel)*arh)**1.5_r8) & *((1._r8-btran_col(c)/wtlf(c))**0.5_r8) From 2d2e093671c922df10222243fde06cee1bf6fbe0 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Tue, 20 Aug 2024 21:49:20 -0600 Subject: [PATCH 15/60] Add parameters for thresholds of precip for deforestation fire: "PFT-dependent thresholds of P60d and P10d" in Li et al. (2013, doi:10.5194/bg-10-2293-2013): - defo_fire_precip_thresh_bet: Value (mm/d) above which running mean daily precipitation (10 or 60 days) does not allow deforestation fire for a column with broadleaf evergreen tropical trees but no broadleaf deciduous tropical trees. - defo_fire_precip_thresh_bdt: Vice versa --- bld/CLMBuildNamelist.pm | 3 ++- bld/namelist_files/namelist_defaults_ctsm.xml | 8 ++++++++ bld/namelist_files/namelist_definition_ctsm.xml | 10 ++++++++++ src/biogeochem/CNFireBaseMod.F90 | 12 +++++++++++- src/biogeochem/CNFireLi2014Mod.F90 | 8 +++++++- src/biogeochem/CNFireLi2016Mod.F90 | 8 +++++++- src/biogeochem/CNFireLi2021Mod.F90 | 8 +++++++- src/biogeochem/CNFireLi2024Mod.F90 | 8 +++++++- 8 files changed, 59 insertions(+), 6 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index d09f79afe1..155d4bb4bb 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2266,7 +2266,8 @@ sub setup_logic_cnfire { my @fire_consts = ( "rh_low", "rh_hgh", "bt_min", "bt_max", "cli_scale", "boreal_peatfire_c", "non_boreal_peatfire_c", "pot_hmn_ign_counts_alpha", "cropfire_a1", "occur_hi_gdp_tree", "lfuel", "ufuel", - "cmb_cmplt_fact_litter", "cmb_cmplt_fact_cwd", "max_rh30_affecting_fuel" ); + "cmb_cmplt_fact_litter", "cmb_cmplt_fact_cwd", "max_rh30_affecting_fuel", + "defo_fire_precip_thresh_bet", "defo_fire_precip_thresh_bdt" ); if ( &value_is_true($nl->get_value('use_cn')) ) { foreach my $item ( @fire_consts ) { if ( ! &value_is_true($nl_flags->{'cnfireson'} ) ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index ef797f567a..246efe04bb 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -245,6 +245,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). li2014qianfrc 90. +4.0 +1.8 30.0d00 80.0d00 @@ -353,6 +355,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 0.5d00 0.28d00 90. +4.0 +1.8 30.0d00 80.0d00 @@ -369,6 +373,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 0.5d00 0.28d00 90. +1.4 +0.5 30.0d00 85.0d00 @@ -385,6 +391,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 0.5d00 0.28d00 95. +1.8 +0.6 diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 3e9a0b6b0b..92a08ab1a7 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -338,6 +338,16 @@ Combustion completeness factor for CWD[Course Woody Debris] (unitless) Value above which 30-day running relative humidity has no effect on fuel combustibility + +Value (mm/d) above which running mean daily precipitation (10 or 60 days) does not allow deforestation fire for a column with broadleaf evergreen tropical trees but no broadleaf deciduous tropical trees. "PFT-dependent thresholds of P60d and P10d" in Li et al. (2013, doi:10.5194/bg-10-2293-2013). + + + +Value (mm/d) above which running mean daily precipitation (10 or 60 days) does not allow deforestation fire for a column with broadleaf deciduous tropical trees but no broadleaf evergreen tropical trees. "PFT-dependent thresholds of P60d and P10d" in Li et al. (2013, doi:10.5194/bg-10-2293-2013). + + Critical threshold for truncation of Nitrogen (truncate Nitrogen states to zero below this value) diff --git a/src/biogeochem/CNFireBaseMod.F90 b/src/biogeochem/CNFireBaseMod.F90 index b66e44f8fb..4f590ce701 100644 --- a/src/biogeochem/CNFireBaseMod.F90 +++ b/src/biogeochem/CNFireBaseMod.F90 @@ -69,6 +69,8 @@ module CNFireBaseMod real(r8) :: cmb_cmplt_fact_litter = 0.5_r8 ! combustion completion factor for litter (unitless) real(r8) :: cmb_cmplt_fact_cwd = 0.25_r8 ! combustion completion factor for CWD (unitless) real(r8) :: max_rh30_affecting_fuel = 90._r8 ! Value above which 30-day running relative humidity has no effect on fuel combustibility (%) + real(r8) :: defo_fire_precip_thresh_bet = 4.0_r8 ! Max running mean daily precip (mm/d) allowing deforestation fire for broadleaf evergreen trees + real(r8) :: defo_fire_precip_thresh_bdt = 1.8_r8 ! Max running mean daily precip (mm/d) allowing deforestation fire for broadleaf deciduous trees end type type, public :: params_type @@ -345,12 +347,14 @@ subroutine FireReadNML( this, NLFilename ) real(r8) :: rh_low, rh_hgh, bt_min, bt_max, occur_hi_gdp_tree real(r8) :: lfuel, ufuel, cmb_cmplt_fact_litter, cmb_cmplt_fact_cwd real(r8) :: max_rh30_affecting_fuel + real(r8) :: defo_fire_precip_thresh_bet, defo_fire_precip_thresh_bdt namelist /lifire_inparm/ cli_scale, boreal_peatfire_c, pot_hmn_ign_counts_alpha, & non_boreal_peatfire_c, cropfire_a1, & rh_low, rh_hgh, bt_min, bt_max, occur_hi_gdp_tree, & lfuel, ufuel, cmb_cmplt_fact_litter, cmb_cmplt_fact_cwd, & - max_rh30_affecting_fuel + max_rh30_affecting_fuel, & + defo_fire_precip_thresh_bet, defo_fire_precip_thresh_bdt if ( this%need_lightning_and_popdens() ) then cli_scale = cnfire_const%cli_scale @@ -368,6 +372,8 @@ subroutine FireReadNML( this, NLFilename ) cmb_cmplt_fact_litter = cnfire_const%cmb_cmplt_fact_litter cmb_cmplt_fact_cwd = cnfire_const%cmb_cmplt_fact_cwd max_rh30_affecting_fuel = cnfire_const%max_rh30_affecting_fuel + defo_fire_precip_thresh_bet = cnfire_const%defo_fire_precip_thresh_bet + defo_fire_precip_thresh_bdt = cnfire_const%defo_fire_precip_thresh_bdt ! Initialize options to default values, in case they are not specified in ! the namelist @@ -402,6 +408,8 @@ subroutine FireReadNML( this, NLFilename ) call shr_mpi_bcast (cmb_cmplt_fact_litter , mpicom) call shr_mpi_bcast (cmb_cmplt_fact_cwd , mpicom) call shr_mpi_bcast (max_rh30_affecting_fuel , mpicom) + call shr_mpi_bcast (defo_fire_precip_thresh_bet, mpicom) + call shr_mpi_bcast (defo_fire_precip_thresh_bdt, mpicom) cnfire_const%cli_scale = cli_scale cnfire_const%boreal_peatfire_c = boreal_peatfire_c @@ -418,6 +426,8 @@ subroutine FireReadNML( this, NLFilename ) cnfire_const%cmb_cmplt_fact_litter = cmb_cmplt_fact_litter cnfire_const%cmb_cmplt_fact_cwd = cmb_cmplt_fact_cwd cnfire_const%max_rh30_affecting_fuel = max_rh30_affecting_fuel + cnfire_const%defo_fire_precip_thresh_bet = defo_fire_precip_thresh_bet + cnfire_const%defo_fire_precip_thresh_bdt = defo_fire_precip_thresh_bdt if (masterproc) then write(iulog,*) ' ' diff --git a/src/biogeochem/CNFireLi2014Mod.F90 b/src/biogeochem/CNFireLi2014Mod.F90 index fcd27a7951..11b0e79655 100644 --- a/src/biogeochem/CNFireLi2014Mod.F90 +++ b/src/biogeochem/CNFireLi2014Mod.F90 @@ -172,6 +172,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ non_boreal_peatfire_c => cnfire_const%non_boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for non-boreal peatland fire pot_hmn_ign_counts_alpha => cnfire_const%pot_hmn_ign_counts_alpha , & ! Input: [real(r8) ] (/person/month) Potential human ignition counts boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire + defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees + defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -607,7 +609,11 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ fbac1(c) = 0._r8 farea_burned(c) = baf_crop(c)+baf_peatf(c) else - cri = (4.0_r8*trotr1_col(c)+1.8_r8*trotr2_col(c))/(trotr1_col(c)+trotr2_col(c)) + ! Calculate the precip threshold as the area-weighted mean of that for BET and BDT + cri = (defo_fire_precip_thresh_bet * trotr1_col(c) & + + defo_fire_precip_thresh_bdt * trotr2_col(c)) & + / (trotr1_col(c) + trotr2_col(c)) + cli = (max(0._r8,min(1._r8,(cri-prec60_col(c)*secspday)/cri))**0.5)* & (max(0._r8,min(1._r8,(cri-prec10_col(c)*secspday)/cri))**0.5)* & max(0.0005_r8,min(1._r8,19._r8*dtrotr_col(c)*dayspyr*secspday/dt-0.001_r8))* & diff --git a/src/biogeochem/CNFireLi2016Mod.F90 b/src/biogeochem/CNFireLi2016Mod.F90 index 44e33edafc..5396158221 100644 --- a/src/biogeochem/CNFireLi2016Mod.F90 +++ b/src/biogeochem/CNFireLi2016Mod.F90 @@ -180,6 +180,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ pot_hmn_ign_counts_alpha => cnfire_const%pot_hmn_ign_counts_alpha , & ! Input: [real(r8) ] (/person/month) Potential human ignition counts boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility + defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet , & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees + defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt , & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -630,7 +632,11 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ fbac1(c) = 0._r8 farea_burned(c) = baf_crop(c)+baf_peatf(c) else - cri = (4.0_r8*trotr1_col(c)+1.8_r8*trotr2_col(c))/(trotr1_col(c)+trotr2_col(c)) + ! Calculate the precip threshold as the area-weighted mean of that for BET and BDT + cri = (defo_fire_precip_thresh_bet * trotr1_col(c) & + + defo_fire_precip_thresh_bdt * trotr2_col(c)) & + / (trotr1_col(c) + trotr2_col(c)) + cli = (max(0._r8,min(1._r8,(cri-prec60_col(c)*secspday)/cri))**0.5)* & (max(0._r8,min(1._r8,(cri-prec10_col(c)*secspday)/cri))**0.5)* & max(0.0005_r8,min(1._r8,19._r8*dtrotr_col(c)*dayspyr*secspday/dt-0.001_r8))* & diff --git a/src/biogeochem/CNFireLi2021Mod.F90 b/src/biogeochem/CNFireLi2021Mod.F90 index 93c384f65a..1eecee70d8 100644 --- a/src/biogeochem/CNFireLi2021Mod.F90 +++ b/src/biogeochem/CNFireLi2021Mod.F90 @@ -178,6 +178,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ pot_hmn_ign_counts_alpha => cnfire_const%pot_hmn_ign_counts_alpha , & ! Input: [real(r8) ] (/person/month) Potential human ignition counts boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility + defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees + defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -632,7 +634,11 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ fbac1(c) = 0._r8 farea_burned(c) = baf_crop(c)+baf_peatf(c) else - cri = (4.0_r8*trotr1_col(c)+1.8_r8*trotr2_col(c))/(trotr1_col(c)+trotr2_col(c)) + ! Calculate the precip threshold as the area-weighted mean of that for BET and BDT + cri = (defo_fire_precip_thresh_bet * trotr1_col(c) & + + defo_fire_precip_thresh_bdt * trotr2_col(c)) & + / (trotr1_col(c) + trotr2_col(c)) + cli = (max(0._r8,min(1._r8,(cri-prec60_col(c)*secspday)/cri))**0.5)* & (max(0._r8,min(1._r8,(cri-prec10_col(c)*secspday)/cri))**0.5)* & (15._r8*min(0.0016_r8,dtrotr_col(c)/dt*dayspyr*secspday)+0.009_r8)* & diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 8602ff4e46..7e46a35198 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -176,6 +176,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ pot_hmn_ign_counts_alpha => cnfire_const%pot_hmn_ign_counts_alpha , & ! Input: [real(r8) ] (/person/month) Potential human ignition counts boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility + defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees + defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -630,7 +632,11 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ fbac1(c) = 0._r8 farea_burned(c) = baf_crop(c)+baf_peatf(c) else - cri = (1.4_r8*trotr1_col(c)+0.5_r8*trotr2_col(c))/(trotr1_col(c)+trotr2_col(c)) + ! Calculate the precip threshold as the area-weighted mean of that for BET and BDT + cri = (defo_fire_precip_thresh_bet * trotr1_col(c) & + + defo_fire_precip_thresh_bdt * trotr2_col(c)) & + / (trotr1_col(c) + trotr2_col(c)) + cli = max(0._r8,min(1._r8,1._r8-prec30_col(c)*secspday/cri))* & (15._r8*min(0.0016_r8,dtrotr_col(c)/dt*dayspyr*secspday)+0.009_r8)* & max(0._r8,min(1._r8,(0.25_r8-(forc_rain(c)+forc_snow(c))*secsphr)/0.25_r8)) From fbb2d89b531d9f1ccf73ba4bf23cf99f456a341d Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 21 Aug 2024 08:01:04 -0600 Subject: [PATCH 16/60] Add parameters relating to peat fire. - nonborpeat_fire_precip_denom: Denominator of precipitation in equation relating that to non-boreal peat fire (unitless). Eq. 9 in Li et al. (2013, doi:10.5194/bg-10-2293-2013). - borpeat_fire_soilmoist_denom: Denominator of exponential in soil moisture term of equation relating that and temperature to boreal peat fire (unitless). Eq. 10 in Li et al. (2013, doi:10.5194/bg-10-2293-2013). --- bld/CLMBuildNamelist.pm | 3 ++- bld/namelist_files/namelist_defaults_ctsm.xml | 5 +++++ bld/namelist_files/namelist_definition_ctsm.xml | 10 ++++++++++ src/biogeochem/CNFireBaseMod.F90 | 14 ++++++++++++-- src/biogeochem/CNFireLi2014Mod.F90 | 7 +++++-- src/biogeochem/CNFireLi2016Mod.F90 | 6 ++++-- src/biogeochem/CNFireLi2021Mod.F90 | 6 ++++-- src/biogeochem/CNFireLi2024Mod.F90 | 6 ++++-- 8 files changed, 46 insertions(+), 11 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 155d4bb4bb..bd710066b6 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -2267,7 +2267,8 @@ sub setup_logic_cnfire { my @fire_consts = ( "rh_low", "rh_hgh", "bt_min", "bt_max", "cli_scale", "boreal_peatfire_c", "non_boreal_peatfire_c", "pot_hmn_ign_counts_alpha", "cropfire_a1", "occur_hi_gdp_tree", "lfuel", "ufuel", "cmb_cmplt_fact_litter", "cmb_cmplt_fact_cwd", "max_rh30_affecting_fuel", - "defo_fire_precip_thresh_bet", "defo_fire_precip_thresh_bdt" ); + "defo_fire_precip_thresh_bet", "defo_fire_precip_thresh_bdt", + "borpeat_fire_soilmoist_denom", "nonborpeat_fire_precip_denom" ); if ( &value_is_true($nl->get_value('use_cn')) ) { foreach my $item ( @fire_consts ) { if ( ! &value_is_true($nl_flags->{'cnfireson'} ) ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 246efe04bb..faf7877302 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -247,6 +247,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 90. 4.0 1.8 +0.3 +1.0 30.0d00 80.0d00 @@ -375,6 +377,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 90. 1.4 0.5 +6.0 30.0d00 85.0d00 @@ -393,6 +396,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 95. 1.8 0.6 + 0.35 +6.5 diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 92a08ab1a7..d2347121c1 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -348,6 +348,16 @@ Value (mm/d) above which running mean daily precipitation (10 or 60 days) does n Value (mm/d) above which running mean daily precipitation (10 or 60 days) does not allow deforestation fire for a column with broadleaf deciduous tropical trees but no broadleaf evergreen tropical trees. "PFT-dependent thresholds of P60d and P10d" in Li et al. (2013, doi:10.5194/bg-10-2293-2013). + +Denominator of precipitation in equation relating that to non-boreal peat fire (unitless). Eq. 9 in Li et al. (2013, doi:10.5194/bg-10-2293-2013). + + + +Denominator of exponential in soil moisture term of equation relating that and temperature to boreal peat fire (unitless). Eq. 10 in Li et al. (2013, doi:10.5194/bg-10-2293-2013). + + Critical threshold for truncation of Nitrogen (truncate Nitrogen states to zero below this value) diff --git a/src/biogeochem/CNFireBaseMod.F90 b/src/biogeochem/CNFireBaseMod.F90 index 4f590ce701..5e4fd2caef 100644 --- a/src/biogeochem/CNFireBaseMod.F90 +++ b/src/biogeochem/CNFireBaseMod.F90 @@ -71,7 +71,9 @@ module CNFireBaseMod real(r8) :: max_rh30_affecting_fuel = 90._r8 ! Value above which 30-day running relative humidity has no effect on fuel combustibility (%) real(r8) :: defo_fire_precip_thresh_bet = 4.0_r8 ! Max running mean daily precip (mm/d) allowing deforestation fire for broadleaf evergreen trees real(r8) :: defo_fire_precip_thresh_bdt = 1.8_r8 ! Max running mean daily precip (mm/d) allowing deforestation fire for broadleaf deciduous trees - end type + real(r8) :: borpeat_fire_soilmoist_denom = 0.3 ! Denominator of exponential in soil moisture term of equation relating that and temperature to boreal peat fire (unitless) + real(r8) :: nonborpeat_fire_precip_denom = 1.0 ! Denominator of precipitation in equation relating that to non-boreal peat fire (unitless) + end type type, public :: params_type real(r8) :: prh30 ! Factor related to dependence of fuel combustibility on 30-day running mean of relative humidity (unitless) @@ -348,13 +350,15 @@ subroutine FireReadNML( this, NLFilename ) real(r8) :: lfuel, ufuel, cmb_cmplt_fact_litter, cmb_cmplt_fact_cwd real(r8) :: max_rh30_affecting_fuel real(r8) :: defo_fire_precip_thresh_bet, defo_fire_precip_thresh_bdt + real(r8) :: borpeat_fire_soilmoist_denom, nonborpeat_fire_precip_denom namelist /lifire_inparm/ cli_scale, boreal_peatfire_c, pot_hmn_ign_counts_alpha, & non_boreal_peatfire_c, cropfire_a1, & rh_low, rh_hgh, bt_min, bt_max, occur_hi_gdp_tree, & lfuel, ufuel, cmb_cmplt_fact_litter, cmb_cmplt_fact_cwd, & max_rh30_affecting_fuel, & - defo_fire_precip_thresh_bet, defo_fire_precip_thresh_bdt + defo_fire_precip_thresh_bet, defo_fire_precip_thresh_bdt, & + borpeat_fire_soilmoist_denom, nonborpeat_fire_precip_denom if ( this%need_lightning_and_popdens() ) then cli_scale = cnfire_const%cli_scale @@ -374,6 +378,8 @@ subroutine FireReadNML( this, NLFilename ) max_rh30_affecting_fuel = cnfire_const%max_rh30_affecting_fuel defo_fire_precip_thresh_bet = cnfire_const%defo_fire_precip_thresh_bet defo_fire_precip_thresh_bdt = cnfire_const%defo_fire_precip_thresh_bdt + borpeat_fire_soilmoist_denom = cnfire_const%borpeat_fire_soilmoist_denom + nonborpeat_fire_precip_denom = cnfire_const%nonborpeat_fire_precip_denom ! Initialize options to default values, in case they are not specified in ! the namelist @@ -410,6 +416,8 @@ subroutine FireReadNML( this, NLFilename ) call shr_mpi_bcast (max_rh30_affecting_fuel , mpicom) call shr_mpi_bcast (defo_fire_precip_thresh_bet, mpicom) call shr_mpi_bcast (defo_fire_precip_thresh_bdt, mpicom) + call shr_mpi_bcast (borpeat_fire_soilmoist_denom, mpicom) + call shr_mpi_bcast (nonborpeat_fire_precip_denom, mpicom) cnfire_const%cli_scale = cli_scale cnfire_const%boreal_peatfire_c = boreal_peatfire_c @@ -428,6 +436,8 @@ subroutine FireReadNML( this, NLFilename ) cnfire_const%max_rh30_affecting_fuel = max_rh30_affecting_fuel cnfire_const%defo_fire_precip_thresh_bet = defo_fire_precip_thresh_bet cnfire_const%defo_fire_precip_thresh_bdt = defo_fire_precip_thresh_bdt + cnfire_const%borpeat_fire_soilmoist_denom = borpeat_fire_soilmoist_denom + cnfire_const%nonborpeat_fire_precip_denom = nonborpeat_fire_precip_denom if (masterproc) then write(iulog,*) ' ' diff --git a/src/biogeochem/CNFireLi2014Mod.F90 b/src/biogeochem/CNFireLi2014Mod.F90 index 11b0e79655..4078da740b 100644 --- a/src/biogeochem/CNFireLi2014Mod.F90 +++ b/src/biogeochem/CNFireLi2014Mod.F90 @@ -174,6 +174,9 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ boreal_peatfire_c => cnfire_const%boreal_peatfire_c , & ! Input: [real(r8) ] (/hr) c parameter for boreal peatland fire defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees + borpeat_fire_soilmoist_denom => cnfire_const%borpeat_fire_soilmoist_denom, & ! Input: [real(r8) ] (unitless) Denominator of exponential in soil moisture term of equation relating that and temperature to boreal peat fire (unitless) + nonborpeat_fire_precip_denom => cnfire_const%nonborpeat_fire_precip_denom, & ! Input: [real(r8) ] (unitless) Denominator of precipitation in equation relating that to non-boreal peat fire (unitless) + fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -534,10 +537,10 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ g= col%gridcell(c) if(grc%latdeg(g) < cnfire_const%borealat )then baf_peatf(c) = non_boreal_peatfire_c/secsphr*max(0._r8, & - min(1._r8,(4.0_r8-prec60_col(c)*secspday)/ & + min(1._r8,(4.0_r8-prec60_col(c)*secspday/nonborpeat_fire_precip_denom)/ & 4.0_r8))**2*peatf_lf(c)*(1._r8-fsat(c)) else - baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/0.3_r8))* & + baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/borpeat_fire_soilmoist_denom))* & max(0._r8,min(1._r8,(tsoi17(c)-SHR_CONST_TKFRZ)/10._r8))*peatf_lf(c)* & (1._r8-fsat(c)) end if diff --git a/src/biogeochem/CNFireLi2016Mod.F90 b/src/biogeochem/CNFireLi2016Mod.F90 index 5396158221..b7c14938f7 100644 --- a/src/biogeochem/CNFireLi2016Mod.F90 +++ b/src/biogeochem/CNFireLi2016Mod.F90 @@ -182,6 +182,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet , & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt , & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees + borpeat_fire_soilmoist_denom => cnfire_const%borpeat_fire_soilmoist_denom, & ! Input: [real(r8) ] (unitless) Denominator of exponential in soil moisture term of equation relating that and temperature to boreal peat fire (unitless) + nonborpeat_fire_precip_denom => cnfire_const%nonborpeat_fire_precip_denom, & ! Input: [real(r8) ] (unitless) Denominator of precipitation in equation relating that to non-boreal peat fire (unitless) fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -550,10 +552,10 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ g= col%gridcell(c) if(grc%latdeg(g) < cnfire_const%borealat )then baf_peatf(c) = non_boreal_peatfire_c/secsphr*max(0._r8, & - min(1._r8,(4.0_r8-prec60_col(c)*secspday)/ & + min(1._r8,(4.0_r8-prec60_col(c)*secspday/nonborpeat_fire_precip_denom)/ & 4.0_r8))**2*peatf_lf(c)*(1._r8-fsat(c)) else - baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/0.3_r8))* & + baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/borpeat_fire_soilmoist_denom))* & max(0._r8,min(1._r8,(tsoi17(c)-SHR_CONST_TKFRZ)/10._r8))*peatf_lf(c)* & (1._r8-fsat(c)) end if diff --git a/src/biogeochem/CNFireLi2021Mod.F90 b/src/biogeochem/CNFireLi2021Mod.F90 index 1eecee70d8..d1fd9338b8 100644 --- a/src/biogeochem/CNFireLi2021Mod.F90 +++ b/src/biogeochem/CNFireLi2021Mod.F90 @@ -180,6 +180,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees + borpeat_fire_soilmoist_denom => cnfire_const%borpeat_fire_soilmoist_denom, & ! Input: [real(r8) ] (unitless) Denominator of exponential in soil moisture term of equation relating that and temperature to boreal peat fire (unitless) + nonborpeat_fire_precip_denom => cnfire_const%nonborpeat_fire_precip_denom, & ! Input: [real(r8) ] (unitless) Denominator of precipitation in equation relating that to non-boreal peat fire (unitless) fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -551,10 +553,10 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ g= col%gridcell(c) if(grc%latdeg(g) < cnfire_const%borealat )then baf_peatf(c) = non_boreal_peatfire_c/secsphr*max(0._r8, & - min(1._r8,(4.0_r8-prec60_col(c)*secspday)/ & + min(1._r8,(4.0_r8-prec60_col(c)*secspday/nonborpeat_fire_precip_denom)/ & 4.0_r8))**2*peatf_lf(c)*(1._r8-fsat(c)) else - baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/0.3_r8))* & + baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/borpeat_fire_soilmoist_denom))* & max(0._r8,min(1._r8,(tsoi17(c)-SHR_CONST_TKFRZ)/10._r8))*peatf_lf(c)* & (1._r8-fsat(c)) end if diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 7e46a35198..4b7182f252 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -178,6 +178,8 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ max_rh30_affecting_fuel => cnfire_const%max_rh30_affecting_fuel , & ! Input: [real(r8) ] (%) Value above which 30-day running relative humidity has no effect on fuel combustibility defo_fire_precip_thresh_bet => cnfire_const%defo_fire_precip_thresh_bet, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf evergreen trees defo_fire_precip_thresh_bdt => cnfire_const%defo_fire_precip_thresh_bdt, & ! Input: [real(r8) ] (mm/day) Max running mean daily precip allowing deforestation fire for broadleaf deciduous trees + borpeat_fire_soilmoist_denom => cnfire_const%borpeat_fire_soilmoist_denom, & ! Input: [real(r8) ] (unitless) Denominator of exponential in soil moisture term of equation relating that and temperature to boreal peat fire (unitless) + nonborpeat_fire_precip_denom => cnfire_const%nonborpeat_fire_precip_denom, & ! Input: [real(r8) ] (unitless) Denominator of precipitation in equation relating that to non-boreal peat fire (unitless) fsr_pft => pftcon%fsr_pft , & ! Input: fd_pft => pftcon%fd_pft , & ! Input: @@ -543,12 +545,12 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ if(grc%latdeg(g) < cnfire_const%borealat )then if ((trotr1_col(c)+trotr2_col(c))*col%wtgcell(c)<=0.8_r8.and.trotr1_col(c)+trotr2_col(c)>0.0_r8) then baf_peatf(c) = non_boreal_peatfire_c/secsphr*max(0._r8, & - min(1._r8,(1._r8-prec30_col(c)*secspday/6._r8)))*peatf_lf(c) + min(1._r8,(1._r8-prec30_col(c)*secspday/nonborpeat_fire_precip_denom)))*peatf_lf(c) else baf_peatf(c) = 0._r8 end if else - baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/0.3_r8))* & + baf_peatf(c) = boreal_peatfire_c/secsphr*exp(-SHR_CONST_PI*(max(wf2(c),0._r8)/borpeat_fire_soilmoist_denom))* & max(0._r8,min(1._r8,(tsoi17(c)-SHR_CONST_TKFRZ)/10._r8))*peatf_lf(c)* & (1._r8-fsat(c)) end if From a3edb472cff1078bc702b4f9666c33d5d458590b Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 21 Aug 2024 11:32:20 -0600 Subject: [PATCH 17/60] Ensure new parameters are double-precision. --- bld/namelist_files/namelist_defaults_ctsm.xml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index faf7877302..e18066848e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -244,11 +244,11 @@ attributes from the config_cache.xml file (with keys converted to upper-case). li2016crufrc li2014qianfrc -90. -4.0 -1.8 -0.3 -1.0 +90.d00 +4.0d00 +1.8d00 +0.3d00 +1.0d00 30.0d00 80.0d00 @@ -357,8 +357,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 0.5d00 0.28d00 90. -4.0 -1.8 +4.0d00 +1.8d00 30.0d00 80.0d00 @@ -374,10 +374,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 825.d00 0.5d00 0.28d00 -90. -1.4 -0.5 -6.0 +90.d00 +1.4d00 +0.5d00 +6.0d00 30.0d00 85.0d00 @@ -394,10 +394,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 0.5d00 0.28d00 95. -1.8 -0.6 - 0.35 -6.5 +1.8d00 +0.6d00 + 0.35d00 +6.5d00 From 53a1874b48c82591f45212ba7df5c29254e61a4c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 21 Aug 2024 12:01:57 -0600 Subject: [PATCH 18/60] CAM_SETS_DRV_FLDS tests don't need to have drv_flds_in settings to be explicit --- bld/unit_testers/build-namelist_test.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 1b54f29d92..de5a9b0e13 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -454,8 +454,8 @@ sub cat_and_create_namelistinfile { $mode = "-phys $phys CAM_SETS_DRV_FLDS"; &make_config_cache($phys); foreach my $options ( - "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", - "--res 1.9x2.5 --mask gx1v7 --bgc sp --no-megan --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", + "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; @@ -1286,7 +1286,7 @@ sub cat_and_create_namelistinfile { phys=>"clm5_0", }, "bad_megan_spec" =>{ options=>"-envxml_dir . -bgc bgc -megan", - namelst=>"megan_specifier='ZZTOP=zztop'", + namelst=>"megan_specifier='ZZTOP=zztop%'", phys=>"clm4_5", }, "FUN_wo_flexCN" =>{ options=>"-envxml_dir . -bgc bgc", From 717f957123f1b10dd2676438f7dcb7b95aa31c59 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 21 Aug 2024 12:10:19 -0600 Subject: [PATCH 19/60] Get working with bringing in CAM drv_flds_in Get it working with bringing in the CAM drv_flds_in file. And make it not matter on the --megan --drydep --fire_emis options. Also do dust_emis before the other drv_flds_in namelists, so the CAM namelist is loaded. --- bld/CLMBuildNamelist.pm | 72 ++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index e4cc50614c..1fad577c51 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1449,7 +1449,7 @@ sub setup_cmdl_vichydro { sub process_namelist_commandline_namelist { # Process the commandline '-namelist' arg. - my ($opts, $definition, $nl, $envxml_ref) = @_; + my ($opts, $definition, $nl, $envxml_ref, %settings) = @_; if (defined $opts->{'namelist'}) { # Parse commandline namelist @@ -1471,7 +1471,7 @@ sub process_namelist_commandline_namelist { } sub process_namelist_infile { - my ($definition, $nl, $envxml_ref, $infile) = @_; + my ($definition, $nl, $envxml_ref, $infile, %settings) = @_; # Make sure a valid file was found if ( -f "$infile" ) { @@ -1493,7 +1493,7 @@ sub process_namelist_infile { # Merge input values into namelist. Previously specified values have higher precedence # and are not overwritten. - $nl->merge_nl($nl_infile_valid); + $nl->merge_nl($nl_infile_valid, %settings); } #------------------------------------------------------------------------------- @@ -1756,6 +1756,12 @@ sub process_namelist_inline_logic { ################################## setup_logic_lightning_streams($opts, $nl_flags, $definition, $defaults, $nl); + ###################################### + # namelist options for dust emissions + ###################################### + setup_logic_dust_emis($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref); + setup_logic_prigent_roughness($opts, $nl_flags, $definition, $defaults, $nl); + ################################# # namelist group: drydep_inparm # ################################# @@ -1766,12 +1772,6 @@ sub process_namelist_inline_logic { ################################# setup_logic_fire_emis($opts, $nl_flags, $definition, $defaults, $nl); - ###################################### - # namelist options for dust emissions - ###################################### - setup_logic_dust_emis($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref); - setup_logic_prigent_roughness($opts, $nl_flags, $definition, $defaults, $nl); - ################################# # namelist group: megan_emis_nl # ################################# @@ -3998,17 +3998,18 @@ sub setup_logic_lightning_streams { sub setup_logic_dry_deposition { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; + my @list = ( "drydep_list", "dep_data_file"); if ($opts->{'drydep'} ) { - if ( &value_is_true( $nl_flags->{'use_fates'}) && not &value_is_true( $nl_flags->{'use_fates_sp'}) ) { - $log->warning("DryDeposition can NOT be on when FATES is also on unless FATES-SP mode is on.\n" . - " Use the '--no-drydep' option when '-bgc fates' is activated"); - } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'drydep_list'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'dep_data_file'); - } else { - if ( defined($nl->get_value('drydep_list')) ) { - $log->fatal_error("drydep_list defined, but drydep option NOT set"); - } + } + if ( &value_is_true( $nl_flags->{'use_fates'}) && not &value_is_true( $nl_flags->{'use_fates_sp'}) ) { + foreach my $var ( @list ) { + if ( defined($nl->get_value($var)) ) { + $log->warning("DryDeposition $var is being set and can NOT be on when FATES is also on unless FATES-SP mode is on.\n" . + " Use the '--no-drydep' option when '-bgc fates' is activated"); + } + } } } @@ -4017,20 +4018,20 @@ sub setup_logic_dry_deposition { sub setup_logic_fire_emis { my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; + my @list = ( "fire_emis_eleveated", "fire_emis_factors_file", "fire_emis_specifier"); + if ($opts->{'fire_emis'} ) { - if ( &value_is_true( $nl_flags->{'use_fates'} ) ) { - $log->warning("Fire emission can NOT be on when FATES is also on.\n" . - " DON'T use the '-fire_emis' option when '-bgc fates' is activated"); - } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fire_emis_factors_file'); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fire_emis_specifier'); - } else { - if ( defined($nl->get_value('fire_emis_elevated')) || - defined($nl->get_value('fire_emis_factors_file')) || - defined($nl->get_value('fire_emis_specifier')) ) { - $log->fatal_error("fire_emission setting defined: fire_emis_elevated, fire_emis_factors_file, or fire_emis_specifier, but fire_emis option NOT set"); - } } + foreach my $var ( @list ) { + if ( defined($nl->get_value($var)) ) { + if ( &value_is_true( $nl_flags->{'use_fates'} ) ) { + $log->warning("Fire emission option $var can NOT be on when FATES is also on.\n" . + " DON'T use the '--fire_emis' option when '--bgc fates' is activated"); + } + } + } } #------------------------------------------------------------------------------- @@ -4094,7 +4095,8 @@ sub setup_logic_dust_emis { } # Now process the CAM drv_flds_in to get the dust settings my $infile = $opts->{'envxml_dir'} . "/Buildconf/camconf/drv_flds_in"; - process_namelist_infile( $definition, $nl, $envxml_ref, $infile ); + $log->verbose_message("Read in the drv_flds_in file generated by CAM's build-namelist"); + process_namelist_infile( $definition, $nl, $envxml_ref, $infile, 'die_on_conflict'=>1 ); } } @@ -4115,17 +4117,15 @@ sub setup_logic_megan { } if ($nl_flags->{'megan'} ) { - if ( &value_is_true( $nl_flags->{'use_fates'} ) ) { - $log->warning("MEGAN can NOT be on when FATES is also on.\n" . - " Use the '-no-megan' option when '-bgc fates' is activated"); - } add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'megan_specifier'); - check_megan_spec( $opts, $nl, $definition ); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'megan_factors_file'); - } else { - if ( defined($nl->get_value('megan_specifier')) || + } + if ( defined($nl->get_value('megan_specifier')) || defined($nl->get_value('megan_factors_file')) ) { - $log->fatal_error("megan_specifier or megan_factors_file defined, but megan option NOT set"); + check_megan_spec( $opts, $nl, $definition ); + if ( &value_is_true( $nl_flags->{'use_fates'} ) ) { + $log->warning("MEGAN can NOT be on when FATES is also on.\n" . + " Use the '-no-megan' option when '-bgc fates' is activated"); } } } From 973f5e7bbcf1f6d9ac1867a7c6cc85e352373828 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 21 Aug 2024 13:21:52 -0600 Subject: [PATCH 20/60] Make one more constant double-precision. --- bld/namelist_files/namelist_defaults_ctsm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index e18066848e..8aacd3a64d 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -356,7 +356,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 1050.d00 0.5d00 0.28d00 -90. +90.d00 4.0d00 1.8d00 From 89e56cebdb35def494c63334310137b24a38e0cf Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Thu, 22 Aug 2024 11:15:29 -0600 Subject: [PATCH 21/60] Update ChangeLog/ChangeSum. --- doc/ChangeLog | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 68 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 7a6d764c14..42907da404 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,71 @@ =============================================================== +Tag name: ctsm5.2.024 +Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) +Date: Thu Aug 22 11:07:11 MDT 2024 +One-line Summary: Improve li2024 fire methods + +Purpose and description of changes +---------------------------------- + +For fire methods li2024gswpfrc and (new) li2024crujra: +- Improves peat burning dependence on climate +- Improves dependence of deforestation burning on climate. +- Allows lightning ignitions in tropical closed forest. (Human ignitions, other than deforestation, still not allowed.) +- Adds effect of landscape fragmentation on ignitions and fire duration. +- Recalibrates some parameters. + + +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.) + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Notes of particular relevance for users +--------------------------------------- +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): +- Adds optional fire_method li2024crujra. + + +Testing summary: +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- DIFF + + +Answer changes +-------------- + +Changes answers relative to baseline: Yes + + Summarize any changes to answers, i.e., + - what code configurations: Only with optional fire_method li2024gswpfrc + - what platforms/compilers: All + - nature of change (roundoff; larger than roundoff/same climate; new climate): new climate, probably + + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +- ESCOMP/CTSM#2711: [Fang summer '24 PR 2.1] More improvements to fire model (https://github.com/ESCOMP/CTSM/pull/2711) + +=============================================================== +=============================================================== Tag name: ctsm5.2.023 Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) Date: Fri Aug 16 11:00:32 MDT 2024 diff --git a/doc/ChangeSum b/doc/ChangeSum index 176ac066d2..f4b14775b2 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.2.024 samrabin 08/22/2024 Improve li2024 fire methods ctsm5.2.023 samrabin 08/16/2024 Merge b4b-dev ctsm5.2.022 samrabin 08/14/2024 Rework crop_calendars suite and cropMonthOutput ctsm5.2.021 rgknox 08/13/2024 Adding on-the-fly parameter settings for prescribed N and P in FATES From 406edd4596fe6bba3d3d5095996fe729d0bccbd3 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 22 Aug 2024 14:39:14 -0600 Subject: [PATCH 22/60] Add some comments about some of this being temporary and point to the issue regarding it --- bld/CLMBuildNamelist.pm | 32 +++++++++++++++++++++----------- cime_config/config_component.xml | 1 + 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 1fad577c51..52ac4c1d6f 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -1756,25 +1756,29 @@ sub process_namelist_inline_logic { ################################## setup_logic_lightning_streams($opts, $nl_flags, $definition, $defaults, $nl); - ###################################### + ############################################################################################ # namelist options for dust emissions - ###################################### + # NOTE: This MUST be done before other drv_flds_in settings (megan, drydep, fire_emis etc.) + ############################################################################################ setup_logic_dust_emis($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref); setup_logic_prigent_roughness($opts, $nl_flags, $definition, $defaults, $nl); - ################################# - # namelist group: drydep_inparm # - ################################# + ##################################### + # namelist group: drydep_inparm # + # NOTE: After setup_logic_dust_emis # + ##################################### setup_logic_dry_deposition($opts, $nl_flags, $definition, $defaults, $nl); - ################################# - # namelist group: fire_emis_nl # - ################################# + ##################################### + # namelist group: fire_emis_nl # + # NOTE: After setup_logic_dust_emis # + ##################################### setup_logic_fire_emis($opts, $nl_flags, $definition, $defaults, $nl); - ################################# - # namelist group: megan_emis_nl # - ################################# + ##################################### + # namelist group: megan_emis_nl # + # NOTE: After setup_logic_dust_emis # + ##################################### setup_logic_megan($opts, $nl_flags, $definition, $defaults, $nl); ################################## @@ -4041,6 +4045,8 @@ sub setup_logic_dust_emis { my ($opts, $nl_flags, $definition, $defaults, $nl, $envxml_ref) = @_; # Only set dust emission settings -- if not connected to CAM + # Longer term plan is to remove this logic and have CTSM just set it and for CAM to use what CLM decides + # See: https://github.com/ESCOMP/CTSM/issues/2713 my $lnd_sets_dust = logical_to_fortran($envxml_ref->{'LND_SETS_DUST_EMIS_DRV_FLDS'}); if ( &value_is_true( $lnd_sets_dust)) { @@ -4094,8 +4100,12 @@ sub setup_logic_dust_emis { } } # Now process the CAM drv_flds_in to get the dust settings + # This requires that the CAM drv_flds_in namelist be created BEFORE CLM + # and that the path below NOT be changed. Hence, there's some fragility here + # to future changes. my $infile = $opts->{'envxml_dir'} . "/Buildconf/camconf/drv_flds_in"; $log->verbose_message("Read in the drv_flds_in file generated by CAM's build-namelist"); + # When merging the CAM namelist in -- die with an error if there's a conflict between CAM and CLM process_namelist_infile( $definition, $nl, $envxml_ref, $infile, 'die_on_conflict'=>1 ); } } diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 3c48e16651..e3f559b08a 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -167,6 +167,7 @@ + logical TRUE,FALSE TRUE From fa7f8f5928609f67cd710149802db30bf886428b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 22 Aug 2024 15:22:19 -0600 Subject: [PATCH 23/60] Fix bug in setting of init_interp_attributes that should have been for clm6_0_cam6.0, that came about due to XML code duplication --- bld/namelist_files/namelist_defaults_ctsm.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 167ded8c62..668ea1e05f 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1193,12 +1193,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case). -hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. -hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. From 796bd834fb575153d681992cc3641ee0636333bd Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 22 Aug 2024 15:35:14 -0600 Subject: [PATCH 24/60] Get the megan_spec checker working for identifying bad characters in a string --- bld/CLMBuildNamelist.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 52ac4c1d6f..37eedff6e5 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -5665,7 +5665,7 @@ sub check_megan_spec { foreach my $spec ( @megan_spec_list ) { $megan_spec = remove_leading_and_trailing_quotes($spec); # Do simple validation of the expressions to just check for valid characters - if ( ! $megan_spec =~ /[\s=A-Za-z0-9_\+\.\*\(\)-]+/ ) { + if ( $megan_spec !~ /^([\s=A-Za-z0-9_\+\.\*\(\)-]+)$/ ) { $log->fatal_error("Bad format for megan_specifier = $megan_spec"); } } From 5cf4216f279ad55739b17570a97b8555fa50a8fc Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 22 Aug 2024 16:28:26 -0600 Subject: [PATCH 25/60] Turn on explicit AC, Leung_2023, and excess ice by default --- bld/namelist_files/namelist_defaults_ctsm.xml | 10 +++++----- bld/namelist_files/namelist_defaults_dust_emis.xml | 2 +- 2 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 8aacd3a64d..70ba56e69b 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -161,7 +161,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). NONE -.false. +.true. .false. .false. .false. @@ -2449,15 +2449,15 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc /glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc +>lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc /glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc +>lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc /glade/work/xinchang/02_Explicit_AC_Adoption/02_data_present_day/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc +>lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CLM45_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc @@ -2694,7 +2694,7 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c -.false. +.true. -1.0 0.5 -3.15 diff --git a/bld/namelist_files/namelist_defaults_dust_emis.xml b/bld/namelist_files/namelist_defaults_dust_emis.xml index 40bf3d9078..319110cc55 100644 --- a/bld/namelist_files/namelist_defaults_dust_emis.xml +++ b/bld/namelist_files/namelist_defaults_dust_emis.xml @@ -14,7 +14,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). --> -Zender_2003 +Leung_2023 atm From e4a3c18c03deaa40df15bbff42f03204a3a93d4b Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 22 Aug 2024 16:59:10 -0600 Subject: [PATCH 26/60] Add finidat entries for f09/1850/clm6 cases --- bld/namelist_files/namelist_defaults_ctsm.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 70ba56e69b..e94863b32e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1345,6 +1345,18 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd_tuning_mode="clm6_0_GSWP3v1" use_init_interp=".true." >lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm60BgcCrop-ciso.1361-01-01.ne30pg3_mg17_c240317.nc +lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + +lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + +.false. .true. -.false. -.false. -.false. .false. @@ -2706,7 +2704,9 @@ lnd/clm2/surfdata_esmf/NEON/surfdata_1x1_NEON_TOOL_hist_78pfts_CMIP6_simyr2000_c -.true. +.false. +.true. + -1.0 0.5 -3.15 diff --git a/bld/namelist_files/namelist_defaults_dust_emis.xml b/bld/namelist_files/namelist_defaults_dust_emis.xml index 319110cc55..a13a23d14b 100644 --- a/bld/namelist_files/namelist_defaults_dust_emis.xml +++ b/bld/namelist_files/namelist_defaults_dust_emis.xml @@ -14,7 +14,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). --> -Leung_2023 +Zender_2003 +Leung_2023 atm From b2d7edf8f629406b01ec0044ea8655de9d670da5 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 22 Aug 2024 17:14:44 -0600 Subject: [PATCH 28/60] Duplicate a bunch of XML so that the namelist unit tester works for all the tests --- bld/namelist_files/namelist_defaults_ctsm.xml | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 668ea1e05f..394f72a62e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1059,12 +1059,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. -hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. -hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. @@ -1144,6 +1144,26 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. @@ -1213,6 +1233,26 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. +hgrid=0.9x1.25 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=1.9x2.5 maxpft=17 mask=gx1v7 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=ne0np4.ARCTIC.ne30x4 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + +hgrid=ne0np4.ARCTICGRIS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. + + Date: Thu, 22 Aug 2024 17:15:17 -0600 Subject: [PATCH 29/60] Change fatal error to warning for megan_specifier --- bld/CLMBuildNamelist.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 37eedff6e5..94f6bf7e38 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -5666,7 +5666,7 @@ sub check_megan_spec { $megan_spec = remove_leading_and_trailing_quotes($spec); # Do simple validation of the expressions to just check for valid characters if ( $megan_spec !~ /^([\s=A-Za-z0-9_\+\.\*\(\)-]+)$/ ) { - $log->fatal_error("Bad format for megan_specifier = $megan_spec"); + $log->warning("Bad format for megan_specifier = $megan_spec"); } } } From a5a15ed19bd7517e3abfd9994353c3f42bd49e8d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 22 Aug 2024 17:17:11 -0600 Subject: [PATCH 30/60] Correct test number and remove fail tests that are now allowed to happen because you can set drv_flds_in settings without using the CLM_BLDNML_OPTS options for it --- bld/unit_testers/build-namelist_test.pl | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index de5a9b0e13..8b2827b069 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3339; +my $ntests = 3349; if ( defined($opts{'compare'}) ) { - $ntests += 1999; + $ntests += 2007; } plan( tests=>$ntests ); @@ -1093,14 +1093,6 @@ sub cat_and_create_namelistinfile { namelst=>"use_hydrstress=.true.", phys=>"clm5_0", }, - "specWOfireemis" =>{ options=>"-envxml_dir . -no-fire_emis", - namelst=>"fire_emis_specifier='bc_a1 = BC'", - phys=>"clm5_0", - }, - "elevWOfireemis" =>{ options=>"-envxml_dir . -no-fire_emis", - namelst=>"fire_emis_elevated=.false.", - phys=>"clm5_0", - }, "noanthro_w_crop" =>{ options=>"-envxml_dir . -res 0.9x1.25 -bgc bgc -crop -use_case 1850_noanthro_control", namelst=>"", phys=>"clm5_0", From c61aca3708a8908639a884a3bd5926b23b8b5aa5 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 23 Aug 2024 02:07:57 -0600 Subject: [PATCH 31/60] Update to use the new ctsm5.3 finidat file for f09 1850 --- bld/namelist_files/namelist_defaults_ctsm.xml | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 20f6d4702a..8e6b9b5d51 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -928,13 +928,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). hgrid=ne30np4.pg3 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 hgrid=ne30np4.pg3 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 +>hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 + hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. @@ -1335,23 +1336,17 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >lnd/clm2/initdata_map/clmi.I1850Clm50SpCru.1706-01-01.0.9x1.25_gx1v7_simyr1850_c200806.nc - - -lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm60BgcCrop-ciso.1361-01-01.ne30pg3_mg17_c240317.nc - + + lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc From 86a8db9acb0574de9f126b86013ee9f040e3651a Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 23 Aug 2024 08:55:29 -0600 Subject: [PATCH 32/60] Allow non-agri fire in trop. forests in last timestep of month. --- src/biogeochem/CNFireLi2024Mod.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 4b7182f252..1332cfb773 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -632,7 +632,6 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ if(( kmo == 1 .and. kda == 1 .and. mcsec == 0) .or. & dtrotr_col(c) <=0._r8 )then fbac1(c) = 0._r8 - farea_burned(c) = baf_crop(c)+baf_peatf(c) else ! Calculate the precip threshold as the area-weighted mean of that for BET and BDT cri = (defo_fire_precip_thresh_bet * trotr1_col(c) & From bb08dbf2793cd5ab3f20c9a31d32e36486dfcb9b Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 23 Aug 2024 09:00:31 -0600 Subject: [PATCH 33/60] li2024 fire now fully obeys cli_scale. --- src/biogeochem/CNFireLi2024Mod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index 1332cfb773..e1530c9717 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -642,7 +642,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ (15._r8*min(0.0016_r8,dtrotr_col(c)/dt*dayspyr*secspday)+0.009_r8)* & max(0._r8,min(1._r8,(0.25_r8-(forc_rain(c)+forc_snow(c))*secsphr)/0.25_r8)) - farea_burned(c) = farea_burned(c)+fb*cli*(0.01_r8/secspday) + farea_burned(c) = farea_burned(c)+fb*cli*(cli_scale/secspday) ! burned area out of conversion region due to land use fire fbac1(c) = max(0._r8,fb*cli*(cli_scale/secspday) - 2.0_r8*lfc(c)/dt) end if From 5645313482fc3337325ff537bf8792b285d109db Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 23 Aug 2024 09:09:51 -0600 Subject: [PATCH 34/60] Add a comment to guide future refactoring. --- src/biogeochem/CNFireLi2024Mod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeochem/CNFireLi2024Mod.F90 b/src/biogeochem/CNFireLi2024Mod.F90 index e1530c9717..5f7c0019f6 100644 --- a/src/biogeochem/CNFireLi2024Mod.F90 +++ b/src/biogeochem/CNFireLi2024Mod.F90 @@ -632,7 +632,7 @@ subroutine CNFireArea (this, bounds, num_soilc, filter_soilc, num_soilp, filter_ if(( kmo == 1 .and. kda == 1 .and. mcsec == 0) .or. & dtrotr_col(c) <=0._r8 )then fbac1(c) = 0._r8 - else + else ! SSR: Why are the code blocks above and below this else mutually exclusive? ! Calculate the precip threshold as the area-weighted mean of that for BET and BDT cri = (defo_fire_precip_thresh_bet * trotr1_col(c) & + defo_fire_precip_thresh_bdt * trotr2_col(c)) & From 00d288b297be5806e7abdbb16f42ba37f4e0d54c Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Wed, 21 Aug 2024 15:24:09 -0600 Subject: [PATCH 35/60] Change CTSM machine default for Derecho to develop queue w/ 32 cpus. --- python/ctsm/machine_defaults.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ctsm/machine_defaults.py b/python/ctsm/machine_defaults.py index a17f063a4b..f07a313dcb 100644 --- a/python/ctsm/machine_defaults.py +++ b/python/ctsm/machine_defaults.py @@ -77,13 +77,13 @@ create_test_queue=CREATE_TEST_QUEUE_UNSPECIFIED, job_launcher_defaults={ JOB_LAUNCHER_QSUB: QsubDefaults( - queue="main", + queue="develop", walltime="03:50:00", extra_args="", # The following assumes a single node, with a single mpi proc; we may want # to add more flexibility in the future, making the node / proc counts # individually selectable - required_args="-l select=1:ncpus=128:mpiprocs=1 -V -r n -k oed", + required_args="-l select=1:ncpus=32:mpiprocs=1 -V -r n -k oed", ) }, ), From add600b14f1a7ddaea6b163a501bb61fb824905f Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 23 Aug 2024 09:43:49 -0600 Subject: [PATCH 36/60] Change to 16 to match GMAKE_J. --- python/ctsm/machine_defaults.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ctsm/machine_defaults.py b/python/ctsm/machine_defaults.py index f07a313dcb..16742da47e 100644 --- a/python/ctsm/machine_defaults.py +++ b/python/ctsm/machine_defaults.py @@ -83,7 +83,7 @@ # The following assumes a single node, with a single mpi proc; we may want # to add more flexibility in the future, making the node / proc counts # individually selectable - required_args="-l select=1:ncpus=32:mpiprocs=1 -V -r n -k oed", + required_args="-l select=1:ncpus=16:mpiprocs=1 -V -r n -k oed", ) }, ), From d4042ee5074e57bce27d11394264f4c786212ba5 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 23 Aug 2024 10:47:32 -0600 Subject: [PATCH 37/60] This may be the finidat fix (based on the aux_clm failures on izumi) --- bld/namelist_files/namelist_defaults_ctsm.xml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 20f6d4702a..cee86cdbd2 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1341,18 +1341,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="18500101" sim_year="1850" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".false." lnd_tuning_mode="clm6_0_GSWP3v1" use_init_interp=".true." ->lnd/clm2/initdata_esmf/ctsm5.2/clmi.I1850Clm60BgcCrop-ciso.1361-01-01.ne30pg3_mg17_c240317.nc - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc @@ -1394,7 +1382,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20110101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm6_0_GSWP3v1" ->lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm52BgcCrop.2000-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240515.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc From 585935a94cc16397fb16b7df1ad3d1da43981f31 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 23 Aug 2024 12:32:17 -0600 Subject: [PATCH 38/60] Update ChangeLog and ChangeSum. --- doc/ChangeLog | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 62 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 42907da404..f283f8a20c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,65 @@ =============================================================== +Tag name: ctsm5.2.025 +Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) +Date: Fri Aug 23 12:27:51 MDT 2024 +One-line Summary: Minor fixes to li2024 fire methods + +Purpose and description of changes +---------------------------------- + +- Allow non-agricultural fire in tropical closed forests in the last timestep of the month +- li2024 fire now fully obeys cli_scale (b4b change because default parameter matched the magic number) + +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.) + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description): +- Resolves ESCOMP/CTSM#2725: Minor bugs in li2024 fire (https://github.com/ESCOMP/CTSM/issues/2725) + + +Testing summary: +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + Note that some Derecho tests did not complete. However, all the fire tests did, and none + of the other tests use the code that was modified here. + + +Answer changes +-------------- + +Changes answers relative to baseline: No + + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +- ESCOMP/CTSM#2726: Bug fixes to li2024 fire (https://github.com/ESCOMP/CTSM/pull/2726) + +=============================================================== +=============================================================== Tag name: ctsm5.2.024 Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) Date: Thu Aug 22 11:07:11 MDT 2024 diff --git a/doc/ChangeSum b/doc/ChangeSum index f4b14775b2..ce290045fa 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.2.025 samrabin 08/23/2024 Minor fixes to li2024 fire methods ctsm5.2.024 samrabin 08/22/2024 Improve li2024 fire methods ctsm5.2.023 samrabin 08/16/2024 Merge b4b-dev ctsm5.2.022 samrabin 08/14/2024 Rework crop_calendars suite and cropMonthOutput From 5d6987ed5bce252961f0ca011f9762019ef20dc2 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 23 Aug 2024 12:44:58 -0600 Subject: [PATCH 39/60] More finidat changes based on aux_clm failure on derecho --- bld/namelist_files/namelist_defaults_ctsm.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index c6afee6f90..fdaee2bcaa 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1473,7 +1473,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20000101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm5_1_cam7.0" use_init_interp=".true." ->lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc @@ -1481,7 +1481,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20000101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm6_0_cam7.0" use_init_interp=".true." ->lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc @@ -1545,7 +1545,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20000101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm5_1_cam7.0" use_init_interp=".true." ->lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc @@ -1608,7 +1608,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20000101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm6_0_cam7.0" use_init_interp=".true." ->lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc @@ -1682,14 +1682,14 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20000101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm5_1_cam6.0" use_init_interp=".true." ->lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc @@ -1753,7 +1753,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20000101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm5_1_cam6.0" use_init_interp=".true." ->lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc @@ -1817,7 +1817,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ic_ymd="20000101" sim_year="2000" do_transient_pfts=".false." ic_tod="0" glc_nec="10" use_crop=".true." irrigate=".true." lnd_tuning_mode="clm6_0_cam6.0" use_init_interp=".true." ->lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc From 8594b7d9c2b3e8a07c8d383d4218fc231a0e64ab Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 23 Aug 2024 14:49:09 -0600 Subject: [PATCH 40/60] Add comments about the new finidat file --- bld/namelist_files/namelist_defaults_ctsm.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index fdaee2bcaa..dacf75be02 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1385,6 +1385,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd_tuning_mode="clm5_1_GSWP3v1" >lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc + + + + + lnd/clm2/initdata_map/clmi.BHIST.2000-01-01.0.9x1.25_gx1v7_simyr2000_c200728.nc + lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc + + + Date: Fri, 23 Aug 2024 14:49:39 -0600 Subject: [PATCH 41/60] Draft ChangeLog/ChangeSum --- doc/ChangeLog | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 85 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index f283f8a20c..d3fd86e6ac 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,88 @@ =============================================================== +Tag name: ctsm5.2.026 +Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) +Date: Fri 23 Aug 2024 01:23:43 PM MDT +One-line Summary: Turn on excess ice, explicit AC, Leung_2023 for clm6 + +Purpose and description of changes +---------------------------------- + + Turn on excess ice, explicit AC, Leung_2023 for clm6. + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[X] clm6_0 + +[X] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: +Fixes #2466 Turn excess ice on by default in CESM3 +Fixes #2568 Turn on explicit AC, Leung_2023, and excess ice by default + +Notes of particular relevance for users +--------------------------------------- +Changes made to namelist defaults (e.g., changed parameter values): + Namelist defaults changed to turn on excess ice, explicit AC, Leung_2023 + in clm6; also to pick up new finidat files for clm6. + +Changes to the datasets (e.g., parameter, surface or initial files): + CLM6 cases need new finidat files. We use 1850 finidat files for + all clm6 cases because that's all that we have generated for now. + +Notes of particular relevance for developers: +--------------------------------------------- +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + CLM6 cases need new finidat files. We use 1850 finidat files for + all clm6 cases because that's all that we have generated for now. + +Testing summary: +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - OK, expected FAIL> Date: Fri, 23 Aug 2024 15:52:29 -0600 Subject: [PATCH 42/60] Add use_init_interp to an f19 test using the new f09 finidat --- bld/namelist_files/namelist_defaults_ctsm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index dacf75be02..df3927fd0e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -1389,7 +1389,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd/clm2/initdata_esmf/ctsm5.3/ctsm52018_f09_xsiceON_acON_pSASU.clm2.r.0201-01-01-00000.nc From 7f76dc031638b399546d15c07effa25522c52422 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Fri, 23 Aug 2024 17:28:15 -0600 Subject: [PATCH 43/60] Updated ChangeLog --- doc/ChangeLog | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index d3fd86e6ac..96c0d6735b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.2.026 Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) -Date: Fri 23 Aug 2024 01:23:43 PM MDT +Date: Fri 23 Aug 2024 05:17:56 PM MDT One-line Summary: Turn on excess ice, explicit AC, Leung_2023 for clm6 Purpose and description of changes @@ -38,17 +38,17 @@ Fixes #2568 Turn on explicit AC, Leung_2023, and excess ice by default Notes of particular relevance for users --------------------------------------- Changes made to namelist defaults (e.g., changed parameter values): - Namelist defaults changed to turn on excess ice, explicit AC, Leung_2023 - in clm6; also to pick up new finidat files for clm6. + Namelist defaults now turn on excess ice, explicit AC, Leung_2023 + in clm6; they also pick up new finidat files for clm6. Changes to the datasets (e.g., parameter, surface or initial files): - CLM6 cases need new finidat files. We use 1850 finidat files for + CLM6 cases need new finidat files. We use a f09 1850 finidat for all clm6 cases because that's all that we have generated for now. Notes of particular relevance for developers: --------------------------------------------- Caveats for developers (e.g., code that is duplicated that requires double maintenance): - CLM6 cases need new finidat files. We use 1850 finidat files for + CLM6 cases need new finidat files. We use a f09 1850 finidat for all clm6 cases because that's all that we have generated for now. Testing summary: @@ -62,8 +62,8 @@ Testing summary: regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - derecho ----- IN PROG - izumi ------- IN PROG + derecho ----- OK + izumi ------- OK Answer changes -------------- @@ -75,6 +75,8 @@ Changes answers relative to baseline: Yes - what platforms/compilers: all - nature of change: more than roundoff + Details about the diffs from excess ice and explicit AC may be found in + the earlier entries of this ChangeLog for ctsm5.2.018 and ctsm5.2.010. Other details ------------- From b35320a2c452dcb99e82a183bffda126c1206eb1 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 8 Dec 2021 13:54:28 -0700 Subject: [PATCH 44/60] Also include the mizuRoute expected fails list --- parse_cime.cs.status | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/parse_cime.cs.status b/parse_cime.cs.status index 08bb1bfc86..269878d0bd 100755 --- a/parse_cime.cs.status +++ b/parse_cime.cs.status @@ -302,6 +302,7 @@ sub print_categories { if ( ! -f $expectedfailfile ) { $expectedfailfile = "$scrdir/cime_config/testdefs/ExpectedTestFails.xml"; } + my @failfiles = ( $expectedfailfile, "$scrdir/components/mizuRoute/cime_config/testdefs/ExpectedTestFails.xml" ); my @passes; my @fails; my @pendings; @@ -341,8 +342,10 @@ sub print_categories { print( "================================================================================\n" ); foreach my $key ( @passes ) { my $expect = ""; - `grep $key $expectedfailfile > /dev/null`; - if ( $? == 0 ) { $expect = "FAILED PREVIOUSLY"; } + foreach my $expectedfailfile ( @failfiles ) { + `grep $key $expectedfailfile > /dev/null`; + if ( $? == 0 ) { $expect = "FAILED PREVIOUSLY"; } + } print( "$key\t\t\t$expect\n" ); } } @@ -368,8 +371,10 @@ sub print_categories { print( "================================================================================\n" ); foreach my $key ( @pendings ) { my $expect = ""; - `grep $key $expectedfailfile > /dev/null`; - if ( $? == 0 ) { $expect = "EXPECTED"; } + foreach my $expectedfailfile ( @failfiles ) { + `grep $key $expectedfailfile > /dev/null`; + if ( $? == 0 ) { $expect = "EXPECTED"; } + } print( "$key\t\t$expect\n" ); } } @@ -379,8 +384,10 @@ sub print_categories { print( "================================================================================\n" ); foreach my $key ( @fails ) { my $expect = ""; - `grep $key $expectedfailfile > /dev/null`; - if ( $? == 0 ) { $expect = "EXPECTED"; } + foreach my $expectedfailfile ( @failfiles ) { + `grep $key $expectedfailfile > /dev/null`; + if ( $? == 0 ) { $expect = "EXPECTED"; } + } print( "$key\t\t$expect\n" ); } } From 463e85d8f624fb8f8b64592f4a6824b80683bdd9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 19 Jan 2022 22:45:47 -0700 Subject: [PATCH 45/60] Add bit from SLIM that includes what parts FAIL when reporting summary of fails --- parse_cime.cs.status | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parse_cime.cs.status b/parse_cime.cs.status index 269878d0bd..8ef8ef2bf6 100755 --- a/parse_cime.cs.status +++ b/parse_cime.cs.status @@ -384,11 +384,12 @@ sub print_categories { print( "================================================================================\n" ); foreach my $key ( @fails ) { my $expect = ""; + my $fails = $csstatus{$key}{'FAIL'}; foreach my $expectedfailfile ( @failfiles ) { `grep $key $expectedfailfile > /dev/null`; if ( $? == 0 ) { $expect = "EXPECTED"; } } - print( "$key\t\t$expect\n" ); + print( "$key\t$fails\t$expect\n" ); } } } From 8fbfcc009c26459e5c76c03309d1d58c678583c8 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 25 Jan 2022 14:32:09 -0700 Subject: [PATCH 46/60] Add an extra tab --- parse_cime.cs.status | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse_cime.cs.status b/parse_cime.cs.status index 8ef8ef2bf6..fb2d8e4283 100755 --- a/parse_cime.cs.status +++ b/parse_cime.cs.status @@ -389,7 +389,7 @@ sub print_categories { `grep $key $expectedfailfile > /dev/null`; if ( $? == 0 ) { $expect = "EXPECTED"; } } - print( "$key\t$fails\t$expect\n" ); + print( "$key\t$fails\t\t$expect\n" ); } } } From 0d1a867beb91d1e8a1aacd57a3165dd297c33a1b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 26 Aug 2024 16:06:00 -0600 Subject: [PATCH 47/60] Make a little subroutine to check the expected fails --- parse_cime.cs.status | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/parse_cime.cs.status b/parse_cime.cs.status index fb2d8e4283..885b53c6c4 100755 --- a/parse_cime.cs.status +++ b/parse_cime.cs.status @@ -290,7 +290,15 @@ sub print_sumperline { } } - +sub expectedFails { + my ($key, $message, @failfiles) = @_; + my $expect = ""; + foreach my $expectedfailfile ( @failfiles ) { + `grep $key $expectedfailfile > /dev/null`; + if ( $? == 0 ) { $expect = $message; } + } + return( $expect ); +} sub print_categories { # Seperate tests into categories @@ -341,11 +349,7 @@ sub print_categories { print( "These tests passed\n" ); print( "================================================================================\n" ); foreach my $key ( @passes ) { - my $expect = ""; - foreach my $expectedfailfile ( @failfiles ) { - `grep $key $expectedfailfile > /dev/null`; - if ( $? == 0 ) { $expect = "FAILED PREVIOUSLY"; } - } + my $expect = &expectedFails( $key, "FAILED PREVIOUSLY", @failfiles ); print( "$key\t\t\t$expect\n" ); } } @@ -370,26 +374,19 @@ sub print_categories { print( "These tests are pending (some tests may fail in the pending state)\n" ); print( "================================================================================\n" ); foreach my $key ( @pendings ) { - my $expect = ""; - foreach my $expectedfailfile ( @failfiles ) { - `grep $key $expectedfailfile > /dev/null`; - if ( $? == 0 ) { $expect = "EXPECTED"; } - } + my $expect = &expectedFails( $key, "EXPECTED", @failfiles ); print( "$key\t\t$expect\n" ); } } if ( $#fails >= 0 ) { print( "================================================================================\n" ); print( "These tests failed\n" ); + print( "Test (what Failed) If expected\n" ); print( "================================================================================\n" ); foreach my $key ( @fails ) { - my $expect = ""; + my $expect = &expectedFails( $key, "EXPECTED", @failfiles ); my $fails = $csstatus{$key}{'FAIL'}; - foreach my $expectedfailfile ( @failfiles ) { - `grep $key $expectedfailfile > /dev/null`; - if ( $? == 0 ) { $expect = "EXPECTED"; } - } - print( "$key\t$fails\t\t$expect\n" ); + print( "$key\t($fails)\t\t$expect\n" ); } } } From cd6a94b3512bf9d4def7b7db1af85e77fb3e1690 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 26 Aug 2024 17:03:09 -0600 Subject: [PATCH 48/60] Report on the expected fails for tests --- parse_cime.cs.status | 46 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/parse_cime.cs.status b/parse_cime.cs.status index 885b53c6c4..264ba0708f 100755 --- a/parse_cime.cs.status +++ b/parse_cime.cs.status @@ -204,7 +204,11 @@ sub run_csstatus { do { $newline = shift(@lines); if ( $newline =~ /FAIL[ ]+$test ([^ ]+)/ ) { - $fails .= " $1"; + if ( $fails eq "" ) { + $fails = $1; + } else { + $fails .= " $1"; + } chomp( $fails ); if ( $1 eq "BASELINE" ) { if ( $newline =~ /ERROR BFAIL baseline directory/ ) { @@ -291,13 +295,31 @@ sub print_sumperline { } sub expectedFails { + # Query expected fail file for the input testname key my ($key, $message, @failfiles) = @_; my $expect = ""; + my $expectedfails = ""; foreach my $expectedfailfile ( @failfiles ) { - `grep $key $expectedfailfile > /dev/null`; - if ( $? == 0 ) { $expect = $message; } + my $fh = IO::File->new($expectedfailfile, '<') or die "ERROR:: failure opening $expectedfailfile\n"; + while( my $line = <$fh> ) { + if ( $line =~ /$key/ ) { + $expect = $message; + # Read past the testname until the test end is found... + # Keep track of all of the expected fails and return it at the end + while( my $testline = <$fh> ) { + if ( $testline =~ /phase\s+name\s*=\s*\"([a-zA-Z0-9_]+)/ ) { + if ( $expectedfails eq "" ) { + $expectedfails = $1; + } else { + $expectedfails = "$expectedfails $1"; + } + } + if ( $testline =~ /\<\/test\>/ ) { last; } + } + } + } } - return( $expect ); + return( $expect, $expectedfails ); } sub print_categories { @@ -349,7 +371,9 @@ sub print_categories { print( "These tests passed\n" ); print( "================================================================================\n" ); foreach my $key ( @passes ) { - my $expect = &expectedFails( $key, "FAILED PREVIOUSLY", @failfiles ); + my ($expect, $expectFails) = &expectedFails( $key, "FAILED PREVIOUSLY", @failfiles ); + if ( $expect ne "" ) { $expect = "$expect ($expectFails)"; } + if ($expectFails =~ /BASELINE/ ) { $expect = ""; } print( "$key\t\t\t$expect\n" ); } } @@ -358,7 +382,9 @@ sub print_categories { print( "These tests compare different to the baseline\n" ); print( "================================================================================\n" ); foreach my $key ( @compares_diff ) { - print( "$key\n" ); + my ($expect, $expectFails) = &expectedFails( $key, "EXPECTED POSSIBILITY", @failfiles ); + if ($expectFails !~ /BASELINE/ ) { $expect = ""; } + print( "$key\t\t$expect\n" ); } } if ( $#compares_diff_nobase >= 0 ) { @@ -374,17 +400,19 @@ sub print_categories { print( "These tests are pending (some tests may fail in the pending state)\n" ); print( "================================================================================\n" ); foreach my $key ( @pendings ) { - my $expect = &expectedFails( $key, "EXPECTED", @failfiles ); + my ($expect, $expectFails) = &expectedFails( $key, "EXPECTED", @failfiles ); + if ( $expect ne "" ) { $expect = "$expect ($expectFails)"; } print( "$key\t\t$expect\n" ); } } if ( $#fails >= 0 ) { print( "================================================================================\n" ); print( "These tests failed\n" ); - print( "Test (what Failed) If expected\n" ); + print( "Test (what Failed) EXPECTED (what expected to fail)\n" ); print( "================================================================================\n" ); foreach my $key ( @fails ) { - my $expect = &expectedFails( $key, "EXPECTED", @failfiles ); + my ($expect, $expectFails) = &expectedFails( $key, "EXPECTED", @failfiles ); + if ( $expect ne "" ) { $expect = "$expect ($expectFails)"; } my $fails = $csstatus{$key}{'FAIL'}; print( "$key\t($fails)\t\t$expect\n" ); } From c5aeec66333b37050bd426c678ac36f9ec3f0c62 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 26 Aug 2024 21:43:31 -0600 Subject: [PATCH 49/60] Add some more notes about -drydep, -fire_emis, -no-megan options options that they add testing namelists, but you can always add the fields to user_nl_clm even when they are turned off --- bld/CLMBuildNamelist.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 94f6bf7e38..15d51ccfcb 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -159,16 +159,20 @@ OPTIONS This turns on the namelist variable: use_crop -csmdata "dir" Root directory of CESM input data. Can also be set by using the CSMDATA environment variable. - -drydep Produce a drydep_inparm namelist that will go into the + -drydep Produce a drydep_inparm namelist for testing that will go into the "drv_flds_in" file for the driver to pass dry-deposition to the atm. + This populates the namelist with valid drydep settings for testing. Default: -no-drydep + Note: Can always add drydep fields to user_nl_clm even with --no-drydep (Note: buildnml copies the file for use by the driver) -dynamic_vegetation Toggle for dynamic vegetation model. (default is off) (can ONLY be turned on when BGC type is 'bgc') This turns on the namelist variable: use_cndv (Deprecated, this will be removed) - -fire_emis Produce a fire_emis_nl namelist that will go into the + -fire_emis Produce a fire_emis_nl namelist for testing that will go into the "drv_flds_in" file for the driver to pass fire emissions to the atm. + This populates the namelist with valid fire-emiss settings for testing. + Note: Can always add fire_emis fields to user_nl_clm even with --no-fire_emis (Note: buildnml copies the file for use by the driver) -glc_nec Glacier number of elevation classes [0 | 3 | 5 | 10 | 36] (default is 0) (standard option with land-ice model is 10) @@ -204,9 +208,11 @@ OPTIONS -namelist "namelist" Specify namelist settings directly on the commandline by supplying a string containing FORTRAN namelist syntax, e.g., -namelist "&clm_inparm dt=1800 /" - -no-megan DO NOT PRODUCE a megan_emis_nl namelist that will go into the + -no-megan DO NOT PRODUCE a megan_emis_nl namelist for testing that will go into the "drv_flds_in" file for the driver to pass VOCs to the atm. MEGAN (Model of Emissions of Gases and Aerosols from Nature) + This removes setting default values for testing MEGAN fields + Note: Can always add megan fields to user_nl_clm even with --no-megan (Note: buildnml copies the file for use by the driver) -[no-]note Add note to output namelist [do NOT add note] about the arguments to build-namelist. From 46a09d91c08cf39a5352f9b2e78e7622f3376503 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 26 Aug 2024 22:10:27 -0600 Subject: [PATCH 50/60] Update some of the documentation around the -drydep, -fire_emis and --no-megan build-namelist options --- bld/namelist_files/namelist_defaults_drydep.xml | 6 +++--- bld/namelist_files/namelist_defaults_fire_emis.xml | 4 ++-- bld/namelist_files/namelist_definition_drv_flds.xml | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_drydep.xml b/bld/namelist_files/namelist_defaults_drydep.xml index 08bb5adaef..fb73ab6646 100644 --- a/bld/namelist_files/namelist_defaults_drydep.xml +++ b/bld/namelist_files/namelist_defaults_drydep.xml @@ -5,7 +5,7 @@ - + 'O3','NO2','HNO3','NO','HO2NO2','CH3OOH','CH2O','CO','H2O2','CH3COOOH','PAN','MPAN','C2H5OOH','ONIT','POOH','C3H7OOH','ROOH','CH3COCHO','CH3COCH3','Pb','ONITR','MACROOH','XOOH','ISOPOOH','CH3OH','C2H5OH','CH3CHO','GLYALD','HYAC','HYDRALD','ALKOOH','MEKOOH','TOLOOH','TERPOOH','CH3COOH','CB1','CB2','OC1','OC2','SOA','SO2','SO4','NH3','NH4NO3' @@ -21,7 +21,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case). atm/cam/chem/trop_mozart/dvel/dep_data_c201019.nc - + 'ISOP = isoprene', 'C10H16 = pinene_a + carene_3 + thujene_a', 'CH3OH = methanol', 'C2H5OH = ethanol', 'CH2O = formaldehyde', 'CH3CHO = acetaldehyde', 'CH3COOH = acetic_acid', 'CH3COCH3 = acetone' diff --git a/bld/namelist_files/namelist_defaults_fire_emis.xml b/bld/namelist_files/namelist_defaults_fire_emis.xml index b7536ba66b..54e67424d5 100644 --- a/bld/namelist_files/namelist_defaults_fire_emis.xml +++ b/bld/namelist_files/namelist_defaults_fire_emis.xml @@ -5,7 +5,7 @@ - + 'bc_a1 = BC','pom_a1 = 1.4*OC','SO2 = SO2' diff --git a/bld/namelist_files/namelist_definition_drv_flds.xml b/bld/namelist_files/namelist_definition_drv_flds.xml index 9bb1a3e3b0..f440a9a678 100644 --- a/bld/namelist_files/namelist_definition_drv_flds.xml +++ b/bld/namelist_files/namelist_definition_drv_flds.xml @@ -35,10 +35,14 @@ group="megan_emis_nl" valid_values="" > MEGAN specifier. This is in the form of: Chem-compound = megan_compound(s) - where megan_compound(s) can be the sum of megan compounds with a "+" between them. + where megan_compound(s) can be an equation with megan compounds added or subtracted together with multiplication In each equation, the item to the left of the equal sign is a CAM chemistry compound, the items to the right are compounds known to the MEGAN model (single or combinations). + Long lines for equations can be split into multiple specifiers For example: megan_specifier = 'ISOP = isoprene', 'C10H16 = pinene_a + carene_3 + thujene_a' + or... megan_specifier = 'SOAE = 0.5954*isoprene + 5.1004*(carene_3 + pinene_a + thujene_a + bornene +', + ' terpineol_4 + terpineol_a + terpinyl_ACT_a + myrtenal + sabinene + pinene_b + camphene +', + and etcetera... Date: Mon, 26 Aug 2024 23:11:11 -0600 Subject: [PATCH 51/60] Update documentation around the drv_flds_in testing namelists and command line options to build-namelist -drydep, -fire_emis and -no-megan --- .../customizing-the-clm-configuration.rst | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) 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 e76a9cc6f0..a1efac897e 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 @@ -140,10 +140,17 @@ CLM_BLDNML_OPTS Can also be set by using the CSMDATA environment variable. -d "directory" Directory where output namelist file will be written Default: current working directory. - -drydep Produce a drydep_inparm namelist that will go into the + -drydep Produce a drydep_inparm namelist for testing that will go into the "drv_flds_in" file for the driver to pass dry-deposition to the atm. + This populates the namelist with valid drydep settings for testing. Default: -no-drydep - (Note: buildnml.csh copies the file for use by the driver) + Note: Can always add drydep fields to user_nl_clm even with --no-drydep + (Note: buildnml copies the file for use by the driver) + -fire_emis Produce a fire_emis_nl namelist for testing that will go into the + "drv_flds_in" file for the driver to pass fire emissions to the atm. + This populates the namelist with valid fire-emiss settings for testing. + Note: Can always add fire_emis fields to user_nl_clm even with --no-fire_emis + (Note: buildnml copies the file for use by the driver) -glc_grid "grid" Glacier model grid and resolution when glacier model, Only used if glc_nec > 0 for determining fglcmask Default: gland5UM @@ -185,10 +192,12 @@ CLM_BLDNML_OPTS -namelist "namelist" Specify namelist settings directly on the commandline by supplying a string containing FORTRAN namelist syntax, e.g., -namelist "&clm_inparm dt=1800 /" - -no-megan DO NOT PRODUCE a megan_emis_nl namelist that will go into the + -no-megan DO NOT PRODUCE a megan_emis_nl namelist for testing that will go into the "drv_flds_in" file for the driver to pass VOCs to the atm. MEGAN (Model of Emissions of Gases and Aerosols from Nature) - (Note: buildnml.csh copies the file for use by the driver) + This removes setting default values for testing MEGAN fields + Note: Can always add megan fields to user_nl_clm even with --no-megan + (Note: buildnml copies the file for use by the driver) -[no-]note Add note to output namelist [do NOT add note] about the arguments to build-namelist. -rcp "value" Representative concentration pathway (rcp) to use for @@ -258,6 +267,8 @@ The **$CTSMROOT/cime_config/buildnml** script already sets the resolution and ma #. -drydep +#. -fire_emis + #. -ignore_ic_date #. -ignore_ic_year @@ -291,7 +302,7 @@ To see a list of valid variables that you could set do this: .. note:: Using a 20th-Century transient compset or the ``20thC_transient`` use-case using ``CLM_NML_USE_CASE`` would set this as well, but would also use dynamic nitrogen and aerosol deposition files, so using ``-clm_demand`` would be a way to get *just* dynamic vegetation types and NOT the other files as well. -"-drydep" adds the dry-deposition namelist to the driver. This is a driver namelist, but adding the option here has CLM **build-namelist** create the ``drv_flds_in`` file that the driver will copy over and use. Invoking this option does have an impact on performance even for I compsets and will slow the model down. It's also only useful when running with an active atmosphere model that makes use of this information. +"-drydep" adds a dry-deposition namelist for testing to the driver. This is a driver namelist, but adding the option here has CLM **build-namelist** create the ``drv_flds_in`` file that the driver will copy over and use. Invoking this option does have an impact on performance even for I compsets and will slow the model down. It's also only useful when running with an active atmosphere model that makes use of this information. "-ignore_ic_date" ignores the Initial Conditions (IC) date completely for finding initial condition files to startup from. Without this option or the "-ignore_ic_year" option below, the date of the file comes into play. @@ -299,7 +310,7 @@ To see a list of valid variables that you could set do this: When "-irrig on" is used **build-namelist** will try to find surface datasets that have the irrigation model enabled (when running with Sattellitte Phenology). When running with the prognostic crop model on, "-irrig on" will turn irrigate crops on, while "-irrig off" will manage all crop areas as rain-fed without irrigation. -"no-megan" means do NOT add the MEGAN model Biogenic Volatile Organic Compounds (BVOC) namelist to the driver. This namelist is created by default, so normally this WILL be done. This is a driver namelist, so unless "no-megan" is specified the CLM **build-namelist** will create the ``drv_flds_in`` file that the driver will copy over and use (if you are running with CAM and CAM produces this file as well, it's file will have precedence). +"no-megan" means do NOT add a MEGAN model Biogenic Volatile Organic Compounds (BVOC) testing namelist to the driver. This namelist is created by default, so normally this WILL be done. This is a driver namelist, so unless "no-megan" is specified the CLM **build-namelist** will create the ``drv_flds_in`` file that the driver will copy over and use (if you are running with CAM and CAM produces this file as well, it's file will have precedence). "-note" adds a note to the bottom of the namelist file, that gives the details of how **build-namelist** was called, giving the specific command-line options given to it. @@ -363,18 +374,20 @@ Example: user_nl_clm namelist file ! Users should add all user specific namelist changes below in the form of ! namelist_var = new_namelist_value ! - ! Include namelist variables for drv_flds_in ONLY if -megan and/or -drydep options - ! are set in the CLM_NAMELIST_OPTS env variable. - ! ! EXCEPTIONS: + ! Set use_cndv by the compset you use and the CLM_BLDNML_OPTS -dynamic_vegetation setting + ! Set use_vichydro by the compset you use and the CLM_BLDNML_OPTS -vichydro setting + ! Set use_cn by the compset you use and CLM_BLDNML_OPTS -bgc setting + ! Set use_crop by the compset you use and CLM_BLDNML_OPTS -crop setting + ! Set spinup_state by the CLM_BLDNML_OPTS -bgc_spinup setting ! Set co2_ppmv with CCSM_CO2_PPMV option - ! Set dtime with L_NCPL option ! Set fatmlndfrc with LND_DOMAIN_PATH/LND_DOMAIN_FILE options ! Set finidat with RUN_REFCASE/RUN_REFDATE/RUN_REFTOD options for hybrid or branch cases ! (includes $inst_string for multi-ensemble cases) - ! Set glc_grid with GLC_GRID option - ! Set glc_smb with GLC_SMB option - ! Set maxpatch_glc with GLC_NEC option + ! or with CLM_FORCE_COLDSTART to do a cold start + ! or set it with an explicit filename here. + ! Set maxpatch_glc with GLC_NEC option + ! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable !---------------------------------------------------------------------------------- hist_fincl2 = 'TG','TBOT','FIRE','FIRA','FLDS','FSDS', 'FSR','FSA','FGEV','FSH','FGR','TSOI', From f1ad74d8ee0e081f1c1448a9c3b19a8710cdbed0 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 27 Aug 2024 10:43:20 -0600 Subject: [PATCH 52/60] Update change log for new b4b-dev tag, make standard for python testing to be run on derecho --- doc/.ChangeLog_template | 2 +- doc/ChangeLog | 86 +++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/doc/.ChangeLog_template b/doc/.ChangeLog_template index 60a7f49288..c95ea482e3 100644 --- a/doc/.ChangeLog_template +++ b/doc/.ChangeLog_template @@ -98,7 +98,7 @@ infrastructure should be run when appropriate, as described below. python testing (if python code has changed; see instructions in python/README.md; document testing done): - (any machine) - + derecho - [If python code has changed and you are NOT running aux_clm (e.g., because the only changes are in python code) then also run the clm_pymods test suite; this is a small subset of aux_clm that runs the system diff --git a/doc/ChangeLog b/doc/ChangeLog index 96c0d6735b..c77ec2204f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,90 @@ =============================================================== +Tag name: ctsm5.2.027 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Tue 27 Aug 2024 10:39:39 AM MDT +One-line Summary: Merge b4b-dev + +Purpose and description of changes +---------------------------------- + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + +Changes made to namelist defaults (e.g., changed parameter values): + +Changes to the datasets (e.g., parameter, surface or initial files): + +Changes to documentation: + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + +Changes to tests or testing: + + +Testing summary: regular +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +Answer changes +-------------- + +Changes answers relative to baseline: No bit-for-bit + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): cdeps + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + +=============================================================== +=============================================================== Tag name: ctsm5.2.026 Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) Date: Fri 23 Aug 2024 05:17:56 PM MDT diff --git a/doc/ChangeSum b/doc/ChangeSum index 6071278954..468cbe0077 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.2.027 erik 08/27/2024 Merge b4b-dev ctsm5.2.026 slevis 08/23/2024 Turn on excess ice, explicit AC, Leung_2023 for clm6 ctsm5.2.025 samrabin 08/23/2024 Minor fixes to li2024 fire methods ctsm5.2.024 samrabin 08/22/2024 Improve li2024 fire methods From ddec5536cd6ae2e040315f550c71d464302ae09f Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 27 Aug 2024 13:13:51 -0600 Subject: [PATCH 53/60] Update change files --- doc/ChangeLog | 48 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index c77ec2204f..e481310125 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -7,6 +7,17 @@ One-line Summary: Merge b4b-dev Purpose and description of changes ---------------------------------- +Bring b4b-dev branch to main CTSM development. + +- PLUMBER2 for ctsm5.2 datasets +- Last bit of PPE changes for namelist and parameter file settings +- Update run_sys_tests on Derecho for compiler jobs to run using 16 tasks +- Bring in a fix for dust emissions for coupling with CAM + +Update cs.status parsing script to make expected BASELINE fails more obvious + +Fix some issues with finding IC files for certain lnd_tuning_modes: all for cam7, + clm5_0_cam6.0, and clm6_0_cam6.0 Significant changes to scientifically-supported configurations -------------------------------------------------------------- @@ -31,27 +42,52 @@ Bugs fixed ---------- List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #2687 -- Error in Prigent streams setting when coupled to CAM + Fixes #2709 -- Problem in megan_specifier checking in namelist due to update in CMEPS + Fixes #2712 -- Allow user to change drydep, fire_emiss, megan namelists in user_nl_clm + even when those CLM_BLDNML_OPTS are off + Fixes #2567 -- PPE prep work + Fixes #1652 -- c3psn is wrong for some PFT's not currently used + Fixes #2484 -- update PLUMBER2 user-mods to ctsm5.2 surface datasets Notes of particular relevance for users --------------------------------------- Caveats for users (e.g., need to interpolate initial conditions): + atm_provides_lightning can be set in drv_flds_in now, but doesn't do anything Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + Changed behavior for CLM_BLDNML_OPTS command line options: -drydep, -megan, and -fire_emis + Turning them on now only adds test namelists to use, you can add custom settings for them + in user_nl_clm with or without them on -Changes made to namelist defaults (e.g., changed parameter values): + atm_provides_lightning and atm_ozone_frequency can be set in user_nl_clm for drv_flds_in + The first is not active, and the second you should probably have CAM set -Changes to the datasets (e.g., parameter, surface or initial files): + New XML variable: PLUMBER2SITE to set the site name for PLUMBER2 cases -Changes to documentation: +Changes made to namelist defaults (e.g., changed parameter values): PLUMBER2 datasets + + Using PLUMBER2 user-mods now gives you ctsm5.2 surface datasets + +Changes to the datasets (e.g., parameter, surface or initial files): parameter files + New parameter file with c3psn corrected and ndays_on changed to PFT + new parameters: crit_onset_gdd_sf, zbedrock, zbedrock_sf + +Changes to documentation: Yes regarding build-namelist command line options listed above Notes of particular relevance for developers: --------------------------------------------- Caveats for developers (e.g., code that is duplicated that requires double maintenance): + When LND_SETS_DUST_EMIS_DRV_FLD==FALSE (so coupled to CAM) -- The CAM $CASEDIR/Buildconf/camconf/drv_flds_in namelist is read in to get the CAM drv_flds_in settings. For this to work correctly + the drydep, and fire-emiss subroutines need to be after the dust_emis subroutine which reads in + the CAM drv_flds_in. + See plan to phase out LND_SETS_DUST_EMIS_DRV_FLD here: + https://github.com/ESCOMP/CTSM/issues/2713 Changes to tests or testing: - + Updated parameter files for some specific test mods Testing summary: regular ---------------- @@ -59,7 +95,7 @@ Testing summary: regular build-namelist tests (if CLMBuildNamelist.pm has changed): - derecho - PASS + derecho - PASS (1005 different because of new parameter files) python testing (if python code has changed; see instructions in python/README.md; document testing done): @@ -79,9 +115,11 @@ Other details ------------- List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): cdeps + cdeps to cdeps1.0.47 Pull Requests that document the changes (include PR ids): (https://github.com/ESCOMP/ctsm/pull) + https://github.com/ESCOMP/CTSM/pull/2731 -- merge b4b-dev =============================================================== =============================================================== From bae5c8c9553d4ea9cb986a98187720478f524281 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 27 Aug 2024 22:10:38 -0600 Subject: [PATCH 54/60] Update ChangeLog with more details --- doc/ChangeLog | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index e481310125..cf160fce82 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.2.027 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) -Date: Tue 27 Aug 2024 10:39:39 AM MDT +Date: Tue 27 Aug 2024 10:09:39 PM MDT One-line Summary: Merge b4b-dev Purpose and description of changes @@ -56,6 +56,13 @@ Notes of particular relevance for users Caveats for users (e.g., need to interpolate initial conditions): atm_provides_lightning can be set in drv_flds_in now, but doesn't do anything + When LND_SETS_DUST_EMIS_DRV_FLD==FALSE and you are coupled to CAM + and there is a conflict between CAM and CTSM settings, a message like this happens: + + Using clm5_0_cam6.0 for lnd_tuning_mode +Read in the drv_flds_in file generated by CAM's build-namelist +Build::Namelist::_merge_nl:ERROR: A variable was already set, so we are terminating on the conflict variable name is =dep_data_file + Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): Changed behavior for CLM_BLDNML_OPTS command line options: -drydep, -megan, and -fire_emis Turning them on now only adds test namelists to use, you can add custom settings for them From 9fd631ac427e4db07244eb88d583bd3ecc0c1821 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 28 Aug 2024 14:33:19 -0600 Subject: [PATCH 55/60] Update CDEPS to hopefully resolve the CDEPS build issue I ran into --- .gitmodules | 2 +- components/cdeps | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 80c1640e72..d16396da55 100644 --- a/.gitmodules +++ b/.gitmodules @@ -92,7 +92,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git [submodule "cdeps"] path = components/cdeps url = https://github.com/ESCOMP/CDEPS.git -fxtag = cdeps1.0.47 +fxtag = cdeps1.0.48 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git diff --git a/components/cdeps b/components/cdeps index 7476950699..7b0b3a8272 160000 --- a/components/cdeps +++ b/components/cdeps @@ -1 +1 @@ -Subproject commit 7476950699909813d1938a34bd8d71bf5bfbf1e9 +Subproject commit 7b0b3a827241c53d296ec877cb1f59966bf5e5bf From 4bc95457011259127b8c509c48c221c6ff19a8f4 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 28 Aug 2024 16:30:12 -0600 Subject: [PATCH 56/60] Increase wall limit for test --- cime_config/testdefs/testlist_clm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index de9cd0b1be..d1c3171c98 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -152,7 +152,7 @@ - + From 41c3e092b53a749f2002d7b50b0e0965ca19a19e Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 28 Aug 2024 17:08:08 -0600 Subject: [PATCH 57/60] Remove tests that now pass from expected fails --- cime_config/testdefs/ExpectedTestFails.xml | 23 +--------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index d1e0a1a8b8..6f4d9ac2dc 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -8,7 +8,7 @@ - ... + ... @@ -52,13 +52,6 @@ - - - FAIL - #2444 - - - FAIL @@ -113,20 +106,6 @@ - - - FAIL - #2373 - - - - - - FAIL - #2373 - - - FAIL From 729b688b262bd305d83a1e6ebee8bd29a2d76646 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 28 Aug 2024 18:52:21 -0600 Subject: [PATCH 58/60] Another test no longer failing, and fix accidental addition --- cime_config/testdefs/ExpectedTestFails.xml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 6f4d9ac2dc..e18b15a26e 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -8,7 +8,7 @@ - ... + ... @@ -165,17 +165,6 @@ - - - FAIL - #2373 - - - FAIL - FATES#701 - - - FAIL From 4a62d0dc1edda9ee96fada2b4280f05f8d4c2b9b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 28 Aug 2024 21:14:20 -0600 Subject: [PATCH 59/60] Update date for change files --- doc/ChangeLog | 2 +- doc/ChangeSum | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index cf160fce82..3499c7d720 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== Tag name: ctsm5.2.027 Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) -Date: Tue 27 Aug 2024 10:09:39 PM MDT +Date: Wed 28 Aug 2024 09:13:22 PM MDT One-line Summary: Merge b4b-dev Purpose and description of changes diff --git a/doc/ChangeSum b/doc/ChangeSum index 468cbe0077..fdf253760f 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,6 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.2.027 erik 08/27/2024 Merge b4b-dev + ctsm5.2.027 erik 08/28/2024 Merge b4b-dev ctsm5.2.026 slevis 08/23/2024 Turn on excess ice, explicit AC, Leung_2023 for clm6 ctsm5.2.025 samrabin 08/23/2024 Minor fixes to li2024 fire methods ctsm5.2.024 samrabin 08/22/2024 Improve li2024 fire methods From e205e2ef8ed005aa3bb7743ba5ea8061bbd22498 Mon Sep 17 00:00:00 2001 From: Sam Rabin Date: Fri, 13 Sep 2024 11:38:56 -0600 Subject: [PATCH 60/60] Ignore warnings in Hillslope tests. --- .../testdefs/testmods_dirs/clm/Hillslope/shell_commands | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands b/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands index 6f3602d2e6..a2759b51b4 100644 --- a/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/Hillslope/shell_commands @@ -2,3 +2,6 @@ DIN_LOC_ROOT=$(./xmlquery --value DIN_LOC_ROOT) meshfile=$DIN_LOC_ROOT/lnd/clm2/testdata/ESMFmesh_10x15_synthetic_cosphill_1.0.nc ./xmlchange ATM_DOMAIN_MESH=${meshfile},LND_DOMAIN_MESH=${meshfile} + +# -ignore_warnings is needed as long as we don't allow use_hillslope and use_init_interp together +./xmlchange --append CLM_BLDNML_OPTS=-ignore_warnings