From 77e4ce622b5e07ab57dc76e5ac48363e02e10a25 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Mon, 1 Oct 2018 16:02:10 -0600 Subject: [PATCH 01/46] fix cime issue 2822 and pylint chk --- cime_config/buildlib | 2 +- cime_config/buildnml | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/cime_config/buildlib b/cime_config/buildlib index 6b86bb0b65..6c7914be86 100755 --- a/cime_config/buildlib +++ b/cime_config/buildlib @@ -3,7 +3,7 @@ """ build clm library """ -import sys, os, time, filecmp, shutil, imp +import sys, os, shutil, imp _CIMEROOT = os.environ.get("CIMEROOT") if _CIMEROOT is None: diff --git a/cime_config/buildnml b/cime_config/buildnml index 73855da4dd..3f5d9d3655 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -3,7 +3,7 @@ """ CLM namelist creator """ -import sys, os, time, shutil, re, imp, filecmp +import sys, os, shutil, imp, filecmp _CIMEROOT = os.environ.get("CIMEROOT") if _CIMEROOT is None: @@ -46,7 +46,6 @@ def buildnml(case, caseroot, compname): clm_force_coldstart = case.get_value("CLM_FORCE_COLDSTART") lnd_tuning_mode = case.get_value("LND_TUNING_MODE") clm_accelerated_spinup = case.get_value("CLM_ACCELERATED_SPINUP") - comp_glc = case.get_value("COMP_GLC") comp_atm = case.get_value("COMP_ATM") lnd_grid = case.get_value("LND_GRID") lnd_ncpl = case.get_value("LND_NCPL") @@ -62,14 +61,6 @@ def buildnml(case, caseroot, compname): glc_nec = case.get_value("GLC_NEC") mask = case.get_value("MASK_GRID") - # ----------------------------------------------------- - # Clear out old data - # ----------------------------------------------------- - - input_data_list = os.path.join(caseroot,"Buildconf","clm.input_data_list") - if os.path.exists(input_data_list): - os.remove(input_data_list) - # ----------------------------------------------------- # Set clmconf # ----------------------------------------------------- @@ -133,10 +124,10 @@ def buildnml(case, caseroot, compname): if run_type == "branch": startfile_type = "nrevsn" if clm_force_coldstart == "on": - clm_force_coldstart = "off" - logger.warning( "WARNING: You've turned on CLM_FORCE_COLDSTART for a branch run_type, which is a contradiction, the coldstart will be ignored\n" + - " turn off CLM_FORCE_COLDSTART, or set RUN_TYPE=hybrid to get rid of this warning" - ) + clm_force_coldstart = "off" + logger.warning( "WARNING: You've turned on CLM_FORCE_COLDSTART for a branch run_type, which is a contradiction, the coldstart will be ignored\n" + + " turn off CLM_FORCE_COLDSTART, or set RUN_TYPE=hybrid to get rid of this warning") + if (clm_force_coldstart == "on"): logger.warning( "WARNING: CLM is starting up from a cold state" ) @@ -168,9 +159,9 @@ def buildnml(case, caseroot, compname): usecase = "" if ( (mask != "null") and (mask != "UNSET") ): - gridmask = "-mask %s" %mask + gridmask = "-mask %s" %mask else: - gridmask = "" + gridmask = "" start_ymd = run_startdate.replace('-','') @@ -191,6 +182,13 @@ def buildnml(case, caseroot, compname): config_cache_file = os.path.join(caseroot,"Buildconf","clmconf","config_cache.xml") + # ----------------------------------------------------- + # Clear out old data + # ----------------------------------------------------- + + if os.path.exists(inputdata_file): + os.remove(inputdata_file) + # ----------------------------------------------------- # loop over instances # ----------------------------------------------------- From 7d85f8bb07cfa607577ec732f648939295b4fbcd Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 25 Oct 2018 19:55:49 -0600 Subject: [PATCH 02/46] Change uppercase DEBUG variables to lowercase debug This is needed to avoid conflicting with the DEBUG CPP token. I also changed one instance of debug to a 'parameter'. I left others as is because I didn't do the analysis needed to confirm that they're never set from elsewhere (because they are public to their modules). Fixes ESCOMP/ctsm#534 --- src/biogeophys/SurfaceRadiationMod.F90 | 4 ++-- src/utils/clmfates_interfaceMod.F90 | 8 ++++---- src/utils/clmfates_paraminterfaceMod.F90 | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/biogeophys/SurfaceRadiationMod.F90 b/src/biogeophys/SurfaceRadiationMod.F90 index 8af0aaa633..e28dc0b6a5 100644 --- a/src/biogeophys/SurfaceRadiationMod.F90 +++ b/src/biogeophys/SurfaceRadiationMod.F90 @@ -25,7 +25,7 @@ module SurfaceRadiationMod implicit none private - logical :: DEBUG = .false. ! for debugging this module + logical, parameter :: debug = .false. ! for debugging this module ! ! !PUBLIC MEMBER FUNCTIONS: @@ -977,7 +977,7 @@ subroutine SurfaceRadiation(bounds, num_nourbanp, filter_nourbanp, & g = patch%gridcell(p) if(elai(p)==0.0_r8.and.fabd(p,1)>0._r8)then - if ( DEBUG ) write(iulog,*) 'absorption without LAI',elai(p),tlai(p),fabd(p,1),p + if ( debug ) write(iulog,*) 'absorption without LAI',elai(p),tlai(p),fabd(p,1),p endif ! Solar incident diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index fbbfbf99ea..9ebad09b40 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -196,7 +196,7 @@ module CLMFatesInterfaceMod ! developer will at least question its usage (RGK) private :: hlm_bounds_to_fates_bounds - logical :: DEBUG = .false. + logical :: debug = .false. character(len=*), parameter, private :: sourcefile = & __FILE__ @@ -365,7 +365,7 @@ subroutine init(this, bounds_proc ) ! Check through FATES parameters to see if all have been set call set_fates_ctrlparms('check_allset') - if(DEBUG)then + if(debug)then write(iulog,*) 'clm_fates%init(): allocating for ',nclumps,' threads' end if @@ -400,7 +400,7 @@ subroutine init(this, bounds_proc ) s = s + 1 collist(s) = c this%f2hmap(nc)%hsites(c) = s - if(DEBUG)then + if(debug)then write(iulog,*) 'clm_fates%init(): thread',nc,': found column',c,'with lu',l write(iulog,*) 'LU type:', lun%itype(l) end if @@ -408,7 +408,7 @@ subroutine init(this, bounds_proc ) enddo - if(DEBUG)then + if(debug)then write(iulog,*) 'clm_fates%init(): thread',nc,': allocated ',s,' sites' end if diff --git a/src/utils/clmfates_paraminterfaceMod.F90 b/src/utils/clmfates_paraminterfaceMod.F90 index 4fc12fdc31..9a3ce58ff7 100644 --- a/src/utils/clmfates_paraminterfaceMod.F90 +++ b/src/utils/clmfates_paraminterfaceMod.F90 @@ -15,7 +15,7 @@ module CLMFatesParamInterfaceMod private :: SetParameterDimensions private :: GetUsedDimensionSizes - logical :: DEBUG = .false. + logical :: debug = .false. character(len=*), parameter, private :: sourcefile = & __FILE__ From 37079f682da5aa4fea7e80ed33411bb7da7f2db8 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 25 Oct 2018 20:02:15 -0600 Subject: [PATCH 03/46] Remove unnecessary line of code This initial setting of Nstore was problematic because it referenced the uninitialized PNstoreold variable. From some analysis, it looks like Nstore is always overwritten before it's referenced, so it's safe to just remove this line, along with the now-unnecessary PNstoreold subroutine argument. Fixes ESCOMP/ctsm#322 --- src/biogeophys/LunaMod.F90 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/biogeophys/LunaMod.F90 b/src/biogeophys/LunaMod.F90 index 66b608022e..14faa9d9c6 100644 --- a/src/biogeophys/LunaMod.F90 +++ b/src/biogeophys/LunaMod.F90 @@ -36,10 +36,10 @@ module LunaMod ! PRIVATE MEMBER FUNCTIONS: public :: LunaReadNML !subroutine to read in the Luna namelist public :: Update_Photosynthesis_Capacity !subroutine to update the canopy nitrogen profile - public :: NitrogenAllocation !subroutine to update the Vcmax25 and Jmax25 at the leaf level public :: Acc24_Climate_LUNA !subroutine to accumulate 24 hr climates public :: Acc240_Climate_LUNA !subroutine to accumulate 10 day climates public :: Clear24_Climate_LUNA !subroutine to clear 24 hr climates + private :: NitrogenAllocation !subroutine to update the Vcmax25 and Jmax25 at the leaf level private :: NUEref !Calculate the Nitrogen use effieciency based on reference CO2 and leaf temperature private :: NUE !Calculate the Nitrogen use effieciency based on current CO2 and leaf temperature private :: JmxTLeuning !Calculate the temperature response for Jmax, based on Leunning 2002 Plant, Cell & Environment @@ -367,7 +367,7 @@ subroutine Update_Photosynthesis_Capacity(bounds, fn, filterp, & PNcbold = 0.0_r8 call NitrogenAllocation(FNCa,forc_pbot10(p), relh10, CO2a10, O2a10, PARi10, PARimx10, rb10v, hourpd, & tair10, tleafd10, tleafn10, & - Jmaxb0, Jmaxb1, Wc2Wjb0, relhExp, PNstoreold, PNlcold, PNetold, PNrespold, & + Jmaxb0, Jmaxb1, Wc2Wjb0, relhExp, PNlcold, PNetold, PNrespold, & PNcbold, PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) vcmx25_opt= PNcbopt * FNCa * Fc25 jmx25_opt= PNetopt * FNCa * Fj25 @@ -756,7 +756,7 @@ end subroutine Clear24_Climate_LUNA !Use the LUNA model to calculate the Nitrogen partioning subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PARimx10,rb10, hourpd, tair10, tleafd10, tleafn10, & Jmaxb0, Jmaxb1, Wc2Wjb0, relhExp,& - PNstoreold, PNlcold, PNetold, PNrespold, PNcbold, & + PNlcold, PNetold, PNrespold, PNcbold, & PNstoreopt, PNlcopt, PNetopt, PNrespopt, PNcbopt) implicit none real(r8), intent (in) :: FNCa !Area based functional nitrogen content (g N/m2 leaf) @@ -775,7 +775,6 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR real(r8), intent (in) :: Jmaxb1 !coefficient determining the response of electron transport rate to light availability (unitless) real(r8), intent (in) :: Wc2Wjb0 !the baseline ratio of rubisco-limited rate vs light-limited photosynthetic rate (Wc:Wj) real(r8), intent (in) :: relhExp !specifies the impact of relative humidity on electron transport rate (unitless) - real(r8), intent (in) :: PNstoreold !old value of the proportion of nitrogen allocated to storage (unitless) real(r8), intent (in) :: PNlcold !old value of the proportion of nitrogen allocated to light capture (unitless) real(r8), intent (in) :: PNetold !old value of the proportion of nitrogen allocated to electron transport (unitless) real(r8), intent (in) :: PNrespold !old value of the proportion of nitrogen allocated to respiration (unitless) @@ -848,7 +847,6 @@ subroutine NitrogenAllocation(FNCa,forc_pbot10, relh10, CO2a10,O2a10, PARi10,PAR call NUEref(NUEjref, NUEcref, Kj2Kcref) theta_cj = 0.95_r8 - Nstore = PNstoreold * FNCa !proportion of storage nitrogen in functional nitrogen Nlc = PNlcold * FNCa !proportion of light capturing nitrogen in functional nitrogen Net = PNetold * FNCa !proportion of light harvesting (electron transport) nitrogen in functional nitrogen Nresp = PNrespold * FNCa !proportion of respirational nitrogen in functional nitrogen From 96ec61577e7697d9bdcf014b127ca517b1bffe6c Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Thu, 4 Oct 2018 11:00:38 -0400 Subject: [PATCH 04/46] fix build issue with xlf compiler --- src/biogeochem/CropType.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeochem/CropType.F90 b/src/biogeochem/CropType.F90 index eaed486bc5..0b2c0fc1db 100644 --- a/src/biogeochem/CropType.F90 +++ b/src/biogeochem/CropType.F90 @@ -574,7 +574,7 @@ subroutine CropUpdateAccVars(this, bounds, t_ref2m_patch, t_soisno_col) call extract_accum_field ('GDDPLANT', rbufslp, nstep) do p = begp,endp - rbufslp(p) = max(0.,this%gddplant_patch(p)-rbufslp(p)) + rbufslp(p) = max(0.0_r8,this%gddplant_patch(p)-rbufslp(p)) end do call update_accum_field ('GDDPLANT', rbufslp, nstep) do p = begp,endp From e4c3049a6ee473f49444d2651fabb7cc08d176e1 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 26 Oct 2018 06:20:42 -0600 Subject: [PATCH 05/46] Update changelog --- doc/ChangeLog | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 141 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 5bf6f59553..02838127c7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,144 @@ =============================================================== +Tag name: ctsm1.0.dev014 +Originator(s): sacks (Bill Sacks) +Date: Fri Oct 26 06:20:34 MDT 2018 +One-line Summary: Miscellaneous minor, bit-for-bit bug fixes + +Purpose of changes +------------------ + +Four miscellaneous minor, bit-for-bit bug fixes: + +(1) Py3 pylint check and address cime issue ESMCI/cime#2822 (from Jim + Edwards: ESCOMP/ctsm#526) + +(2) Change uppercase DEBUG variables to lowercase debug (requested by + Jim Edwards to avoid conflicting with the DEBUG CPP token) + (Fixes ESCOMP/ctsm#534) + +(3) Remove unnecessary line of code in LunaMod.F90 that was causing + problems with some compilers due to an uninitialized variable + (Fixes ESCOMP/ctsm#322) + +(4) Add r8 to 0 constant to fix build issue with XLF compiler (from Jim + Edwards: ESCOMP/ctsm#531) + + +Bugs fixed or introduced +------------------------ + +Issues fixed (include CTSM Issue #): +- Fixes ESCOMP/ctsm#322 (ERS_D_Ld5.f19_g16.I2000Clm50BgcCruGs run FAIL (intel)) +- Fixes ESCOMP/ctsm#534 (Rename DEBUG to debug in a few places) + + +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.] + +[ ] clm5_0 + +[ ] clm4_5 + +[ ] clm4_0 + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): none + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): none + +Changes made to namelist defaults (e.g., changed parameter values): none + +Changes to the datasets (e.g., parameter, surface or initial files): none + +Substantial timing or memory changes: none + +Notes of particular relevance for developers: (including Code reviews and testing) +--------------------------------------------- +NOTE: Be sure to review the steps in ../CTSMMasterChecklist as well as the coding style in the Developers Guide + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + +Changes to tests or testing: none + +Code reviewed by: different pieces reviewed by different people + + +CTSM testing: + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - not run + + unit-tests (components/clm/src): + + cheyenne - pass + + tools-tests (components/clm/test/tools): + + cheyenne - not run + + PTCLM testing (components/clm/tools/shared/PTCLM/test): + + cheyenne - not run + + regular tests (aux_clm): + + cheyenne_intel ---- ok + cheyenne_gnu ------ ok + hobart_nag -------- ok + hobart_pgi -------- ok + hobart_intel ------ ok + + ok means tests and baseline comparisons pass. There were unexpected + NLCOMP diffs. From spot-checking a few tests, I see the following: + + + (1) On both cheyenne and hobart: Diffs in logfile. This looks like a + problem in cime: it says: + + BASE: logfile = 'rof.log.136342.hobart.cgd.ucar.edu + COMP: logfile = 'rof.log + + (2) On hobart: Diffs in pio_typename: netcdf vs. pnetcdf (says that + new uses pnetcdf): but when I compare files by hand, they look + the same in this respect (both baseline and new use netcdf), so + maybe this is due to a problem in the timing of when nlcomp is + run? + + Since these both look like problems in the comparison script rather + than in the tag, I'm letting these go, but will open a cime issue if + we see this again. + + +CTSM tag used for the baseline comparisons: ctsm1.0.dev013 + + +Answer changes +-------------- + +Changes answers relative to baseline: NO + + +Detailed list of changes +------------------------ + +List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): none + +Pull Requests that document the changes (include PR ids): +- https://github.com/ESCOMP/ctsm/pull/531 (fix build issue with xlf compiler) +- https://github.com/ESCOMP/ctsm/pull/526 (fix cime issue 2822 and pylint chk) + +=============================================================== +=============================================================== Tag name: ctsm1.0.dev012 Originator(s): erik (Erik Kluzek) Date: Sat Sep 29 11:49:35 MDT 2018 diff --git a/doc/ChangeSum b/doc/ChangeSum index 5df2922ee9..43a82c36a3 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm1.0.dev014 sacks 10/26/2018 Miscellaneous minor, bit-for-bit bug fixes release-clm5.0.09 erik 10/23/2018 Bring in bit-for-bit changes from master up to ctsm1.0.dev012: AnnEt init, snowmip fields ctsm1.0.dev012 erik 09/29/2018 Add snow-free fields for snowmip, fix several issues ctsm1.0.dev011 sacks 09/12/2018 SKIPPED ON RELEASE BRANCH -- water tracer consistency checks From 0e95c786e7ff037e8f50eae5e619f0246cc248de Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 19 Oct 2018 06:57:47 -0600 Subject: [PATCH 06/46] Support a %CMIP6DECK compset modifier This was suggested by @rljacob and supported by @mvertens @jedwards4b and @bertinia as a mechanism to provide CMIP6-specific compsets. I have tentatively chosen the modifier %CMIP6DECK rather than just %CMIP6, mainly because I imagine we might want some other %CMIP6XXX modifiers later, and if we had a simple %CMIP6 modifier, it would be harder to write a correct regular expression that matches %CMIP6XXX without accidentally matching %CMIP6. For CTSM, my impression is that we want the same mods for all DECK runs. Other components might want something different, and they don't necessarily have to use %CMIP6DECK: they can come up with their own set of modifiers. Finally, a specific note about the regex match: Elsewhere we use regular expressions like "_CLM50%[^_]*BGC", but here I have put the "%" immediately before the modifier, like "_CLM50[^_]*%CMIP6DECK": this seems slightly more robust. --- cime_config/config_component.xml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index bd95959f94..98c2e20ae2 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -13,10 +13,10 @@ --> - + clm4.0: - clm4.5: - clm5.0: + clm4.5: + clm5.0: Satellite phenology: CN: Carbon Nitrogen model CNDV: CN with Dynamic Vegetation @@ -29,6 +29,7 @@ FATES (Functionally Assembled Terrestrial Ecosystem Simulator) Ecosystem Demography model: (experimental) BGC (vert. resol. CN and methane) with dynamic vegetation: BGC (vert. resol. CN and methane) with dynamic vegetation and prognostic crop: + With modifications appropriate for CMIP6 DECK experiments: @@ -224,6 +225,22 @@ precedence over any settings for finidat in the $CASEROOT/user_clm_clm file. + + char + + + + + $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 + $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 + + run_component_clm + env_case.xml + User mods to apply to specific compset matches. + + ========================================= CLM naming conventions From 6491e8e0ea3f507528207654ff6af1fbb3614ae1 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 20 Oct 2018 07:26:04 -0600 Subject: [PATCH 07/46] Only allow CMIP6DECK modifier with CLM50%BGC-CROP Per suggestion of @ekluzek, we now use CLM50%BGC-CROP-CMIP6DECK rather than CLM50%BGC-CROP%CMIP6DECK. One main purpose of this is so that we can keep modifier_mode="1" (since changing it to "+" would allow many things that are non-sensical). Also, as Erik pointed out, CMIP6DECK can only be used with BGC-CROP; the previous implementation allowed it with other options as well. This new version also only allows CMIP6DECK with CLM50 - not with CLM45. A few notes about the implementation: - I didn't need to add anything in CLM_BLDNML_OPTS, because %BGC-CROP-CMIP6DECK still matches the existing "BGC-CROP" regular expression. - The match for CLM_USER_MODS is something fairly general ("_CLM50%[^_]*CMIP6DECK"). This seemed more future-proof than explicitly listing "BGC-CROP-CMIP6DECK". The description section will currently prevent CMIP6DECK from being specified anywhere other than with BGC-CROP, so for the CLM_USER_MODS I figured I might as well match CMIP6DECK occurring anywhere within a CLM50 modifier. --- cime_config/config_component.xml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 98c2e20ae2..10f3d6bb59 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -13,10 +13,10 @@ --> - + clm4.0: - clm4.5: - clm5.0: + clm4.5: + clm5.0: Satellite phenology: CN: Carbon Nitrogen model CNDV: CN with Dynamic Vegetation @@ -29,7 +29,7 @@ FATES (Functionally Assembled Terrestrial Ecosystem Simulator) Ecosystem Demography model: (experimental) BGC (vert. resol. CN and methane) with dynamic vegetation: BGC (vert. resol. CN and methane) with dynamic vegetation and prognostic crop: - With modifications appropriate for CMIP6 DECK experiments: + BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 DECK experiments: @@ -230,11 +230,7 @@ - - $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 - $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 + $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 run_component_clm env_case.xml From b12d3cccbd2e7b26bbad47cee24d6f924ce28547 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 22 Oct 2018 14:14:13 -0600 Subject: [PATCH 08/46] Make match of CMIP6DECK more robust This way, the CMIP6DECK match won't accidentally match something like CMIP6DECKFOO --- cime_config/config_component.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 10f3d6bb59..73050aafb1 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -230,7 +230,7 @@ - $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 + $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 run_component_clm env_case.xml From e2e118ec0bda10f41c28d1b0020b69578d38720b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 2 Oct 2018 09:30:02 -0600 Subject: [PATCH 09/46] Add carbon_isotope user-mod directory to turn on c13 and c14 and add it to the cmip6 user-mod directory --- cime_config/usermods_dirs/carbon_isotopes/user_nl_clm | 4 ++++ cime_config/usermods_dirs/cmip6/include_user_mods | 1 + 2 files changed, 5 insertions(+) create mode 100644 cime_config/usermods_dirs/carbon_isotopes/user_nl_clm diff --git a/cime_config/usermods_dirs/carbon_isotopes/user_nl_clm b/cime_config/usermods_dirs/carbon_isotopes/user_nl_clm new file mode 100644 index 0000000000..2fa530330a --- /dev/null +++ b/cime_config/usermods_dirs/carbon_isotopes/user_nl_clm @@ -0,0 +1,4 @@ +use_c13 = .true. +use_c14 = .true. +use_c13_timeseries = .true. +use_c14_bombspike = .true. diff --git a/cime_config/usermods_dirs/cmip6/include_user_mods b/cime_config/usermods_dirs/cmip6/include_user_mods index 012ab60771..88609339ba 100644 --- a/cime_config/usermods_dirs/cmip6/include_user_mods +++ b/cime_config/usermods_dirs/cmip6/include_user_mods @@ -1,2 +1,3 @@ ../cmip6_glaciers ../cmip6_output +../carbon_isotopes From 6e58f6bf2c33f79a0188b3a511b09c7fd7baed22 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Tue, 9 Oct 2018 14:53:49 -0600 Subject: [PATCH 10/46] Allow holes in the number of history tapes Holes are cases where, for example, we have h0, h1 and h3 tapes, but no h2 tape (because there are no fields on the h2 tape). The key part of this implementation is cycling some loops if a given history tape is not in use. There are a few other loops for which it probably would have been fine to do this cycling, but it wasn't necessary - e.g., doing initialization of some per-tape variables. In most of those cases, I didn't bother doing this cycling because it seemed like it could keep the code more robust to still initialize these per-tape variables for the not-in-use tapes. Note that I removed this error check: ! Check that the number of history files declared does not exceed ! the maximum allowed. if (ntapes > max_tapes) then write(iulog,*) trim(subname),' ERROR: Too many history files declared, max_tapes=',max_tapes call endrun(msg=errMsg(sourcefile, __LINE__)) end if because, with the way ntapes is determined, it's impossible for ntapes to exceed max_tapes - i.e., this error check wasn't actually doing anything. Also note that I put in some error-checking code to ensure that, in a restart run, if a history file is in use in the current run, then it was in use on the restart file, and vice versa. --- src/main/histFileMod.F90 | 148 ++++++++++++++++++++++++++++++--------- 1 file changed, 114 insertions(+), 34 deletions(-) diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index 8899917c5f..d09bc523b2 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -55,7 +55,11 @@ module histFileMod ! ! Counters ! - integer , public :: ntapes = 0 ! index of max history file requested + ! ntapes gives the index of the max history file requested. There can be "holes" in the + ! numbering - e.g., we can have h0, h1 and h3 tapes, but no h2 tape (because there are + ! no fields on the h2 tape). In this case, ntapes will be 4 (for h0, h1, h2 and h3, + ! since h3 is the last requested file), not 3 (the number of files actually produced). + integer , private :: ntapes = 0 ! index of max history file requested ! ! Namelist ! @@ -239,6 +243,11 @@ module histFileMod ! type (master_entry) :: masterlist(max_flds) ! master field list ! + ! Whether each history tape is in use in this run. If history_tape_in_use(i) is false, + ! then data in tape(i) is undefined and should not be referenced. + ! + logical :: history_tape_in_use(max_tapes) ! whether each history tape is in use in this run + ! ! History tape: an array of history_tape entities (only active fields) ! type (history_tape) :: tape(max_tapes) ! array history tapes @@ -698,6 +707,7 @@ subroutine htapes_fieldlist() end do end do + history_tape_in_use(:) = .false. tape(:)%nflds = 0 do t = 1,max_tapes @@ -774,7 +784,7 @@ subroutine htapes_fieldlist() end if end do - ! Determine total number of active history tapes + ! Determine index of max active history tape, and whether each tape is in use ntapes = 0 do t = max_tapes,1,-1 @@ -784,24 +794,12 @@ subroutine htapes_fieldlist() end if end do - ! Ensure there are no "holes" in tape specification, i.e. empty tapes. - ! Enabling holes should not be difficult if necessary. - - do t = 1,ntapes - if (tape(t)%nflds == 0) then - write(iulog,*) trim(subname),' ERROR: Tape ',t,' is empty' - call endrun(msg=errMsg(sourcefile, __LINE__)) + do t = 1, ntapes + if (tape(t)%nflds > 0) then + history_tape_in_use(t) = .true. end if end do - ! Check that the number of history files declared does not exceed - ! the maximum allowed. - - if (ntapes > max_tapes) then - write(iulog,*) trim(subname),' ERROR: Too many history files declared, max_tapes=',max_tapes - call endrun(msg=errMsg(sourcefile, __LINE__)) - end if - ! Change 1d output per tape output flag if requested - only for history ! tapes where 2d xy averaging is not enabled @@ -834,6 +832,10 @@ subroutine htapes_fieldlist() end if write(iulog,*)'Number of time samples on history tape ',t,' is ',hist_mfilt(t) write(iulog,*)'Output precision on history tape ',t,'=',hist_ndens(t) + if (.not. history_tape_in_use(t)) then + write(iulog,*) 'History tape ',t,' does not have any fields,' + write(iulog,*) 'so it will not be written!' + end if write(iulog,*) end do call shr_sys_flush(iulog) @@ -3381,9 +3383,15 @@ subroutine hist_htapes_wrapup( rstwr, nlend, bounds, & ! and write data to history files if end of history interval. do t = 1, ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if + ! Skip nstep=0 if monthly average - if (nstep==0 .and. tape(t)%nhtfrq==0) cycle + if (nstep==0 .and. tape(t)%nhtfrq==0) then + cycle + end if ! Determine if end of history interval tape(t)%is_endhist = .false. @@ -3486,6 +3494,10 @@ subroutine hist_htapes_wrapup( rstwr, nlend, bounds, & ! must reopen the files do t = 1, ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if + if (if_disphist(t)) then if (tape(t)%ntimes /= 0) then if (masterproc) then @@ -3511,6 +3523,10 @@ subroutine hist_htapes_wrapup( rstwr, nlend, bounds, & ! Reset number of time samples to zero if file is full do t = 1, ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if + if (if_disphist(t) .and. tape(t)%ntimes==tape(t)%mfilt) then tape(t)%ntimes = 0 end if @@ -3559,7 +3575,9 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) character(len=max_chars) :: units ! units of variable character(len=max_chars) :: units_acc ! accumulator units character(len=max_chars) :: fname ! full name of history file - character(len=max_chars) :: locrest(max_tapes) ! local history restart file names + character(len=max_chars) :: locrest(max_tapes) ! local history restart file names + character(len=max_length_filename) :: my_locfnh ! temporary version of locfnh + character(len=max_length_filename) :: my_locfnhr ! temporary version of locfnhr character(len=max_namlen),allocatable :: tname(:) character(len=max_chars), allocatable :: tunits(:),tlongname(:) @@ -3590,7 +3608,9 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) integer :: dimid ! dimension ID integer :: k ! 1d index integer :: ntapes_onfile ! number of history tapes on the restart file + logical :: history_tape_in_use_onfile ! whether a given history tape is in use, according to the restart file integer :: nflds_onfile ! number of history fields on the restart file + logical :: readvar ! whether a variable was read successfully integer :: t ! tape index integer :: f ! field index integer :: varid ! variable id @@ -3642,6 +3662,12 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) call ncd_defdim( ncid, 'ntapes' , ntapes , dimid) call ncd_defdim( ncid, 'max_chars' , max_chars , dimid) + call ncd_defvar(ncid=ncid, varname='history_tape_in_use', xtype=ncd_log, & + long_name="Whether this history tape is in use", & + dim1name="ntapes") + ier = PIO_inq_varid(ncid, 'history_tape_in_use', vardesc) + ier = PIO_put_att(ncid, vardesc%varid, 'interpinic_flag', iflag_skip) + call ncd_defvar(ncid=ncid, varname='locfnh', xtype=ncd_char, & long_name="History filename", & comment="This variable NOT needed for startup or branch simulations", & @@ -3665,6 +3691,9 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) ! only read/write accumulators and counters if needed do t = 1,ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if ! Create the restart history filename and open it write(hnum,'(i1.1)') t-1 @@ -3839,8 +3868,16 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) ! Add history filenames to master restart file do t = 1,ntapes - call ncd_io('locfnh', locfnh(t), 'write', ncid, nt=t) - call ncd_io('locfnhr', locfnhr(t), 'write', ncid, nt=t) + call ncd_io('history_tape_in_use', history_tape_in_use(t), 'write', ncid, nt=t) + if (history_tape_in_use(t)) then + my_locfnh = locfnh(t) + my_locfnhr = locfnhr(t) + else + my_locfnh = 'non_existent_file' + my_locfnhr = 'non_existent_file' + end if + call ncd_io('locfnh', my_locfnh, 'write', ncid, nt=t) + call ncd_io('locfnhr', my_locfnhr, 'write', ncid, nt=t) end do fincl(:,1) = hist_fincl1(:) @@ -3876,6 +3913,10 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) allocate(itemp(max_nflds)) do t = 1,ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if + call ncd_io(varname='fincl', data=fincl(:,t), ncid=ncid_hist(t), flag='write') call ncd_io(varname='fexcl', data=fexcl(:,t), ncid=ncid_hist(t), flag='write') @@ -3941,19 +3982,48 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) !================================================ call ncd_inqdlen(ncid,dimid,ntapes_onfile, name='ntapes') - if ( is_restart() .and. ntapes_onfile /= ntapes )then - write(iulog,*) 'ntapes = ', ntapes, ' ntapes_onfile = ', ntapes_onfile - call endrun(msg=' ERROR: number of ntapes different than on restart file!,'// & - ' you can NOT change history options on restart!' //& - errMsg(sourcefile, __LINE__)) - end if - if ( is_restart() .and. ntapes > 0 )then - call ncd_io('locfnh', locfnh(1:ntapes), 'read', ncid ) - call ncd_io('locfnhr', locrest(1:ntapes), 'read', ncid ) - do t = 1,ntapes - call strip_null(locrest(t)) - call strip_null(locfnh(t)) + if (is_restart()) then + if (ntapes_onfile /= ntapes) then + write(iulog,*) 'ntapes = ', ntapes, ' ntapes_onfile = ', ntapes_onfile + call endrun(msg=' ERROR: number of ntapes differs from restart file. '// & + 'You can NOT change history options on restart.', & + additional_msg=errMsg(sourcefile, __LINE__)) + end if + + do t = 1, ntapes + ! NOTE(wjs, 2018-10-06) Ideally, we'd read all values of history_tape_in_use + ! at once. However, we currently don't have a 1-d logical ncd_io routine, so + ! we have to read values one at a time. + call ncd_io('history_tape_in_use', history_tape_in_use_onfile, 'read', ncid, & + readvar=readvar, nt=t) + if (.not. readvar) then + ! BACKWARDS_COMPATIBILITY(wjs, 2018-10-06) Old restart files do not have + ! 'history_tape_in_use'. However, before now, this has implicitly been + ! true for all tapes <= ntapes. + history_tape_in_use_onfile = .true. + end if + if (history_tape_in_use_onfile .neqv. history_tape_in_use(t)) then + write(iulog,*) subname//' ERROR: history_tape_in_use on restart file' + write(iulog,*) 'disagrees with current run: For tape ', t + write(iulog,*) 'On restart file: ', history_tape_in_use_onfile + write(iulog,*) 'In current run : ', history_tape_in_use(t) + write(iulog,*) 'This suggests that this tape was empty in one case,' + write(iulog,*) 'but non-empty in the other. (history_tape_in_use .false.' + write(iulog,*) 'means that history tape is empty.)' + call endrun(msg=' ERROR: history_tape_in_use differs from restart file. '// & + 'You can NOT change history options on restart.', & + additional_msg=errMsg(sourcefile, __LINE__)) + end if end do + + if (ntapes > 0 )then + call ncd_io('locfnh', locfnh(1:ntapes), 'read', ncid ) + call ncd_io('locfnhr', locrest(1:ntapes), 'read', ncid ) + do t = 1,ntapes + call strip_null(locrest(t)) + call strip_null(locfnh(t)) + end do + end if end if ! Determine necessary indices - the following is needed if model decomposition is different on restart @@ -3962,6 +4032,9 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) if ( is_restart() )then do t = 1,ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if call getfil( locrest(t), locfnhr(t), 0 ) call ncd_pio_openfile (ncid_hist(t), trim(locfnhr(t)), ncd_nowrite) @@ -4167,6 +4240,10 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) if (flag == 'write') then do t = 1,ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if + if (.not. tape(t)%is_endhist) then do f = 1,tape(t)%nflds @@ -4218,6 +4295,9 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) ! Read history restart information if history files are not full do t = 1,ntapes + if (.not. history_tape_in_use(t)) then + cycle + end if if (.not. tape(t)%is_endhist) then @@ -5106,7 +5186,7 @@ end subroutine strip_null subroutine hist_do_disp (ntapes, hist_ntimes, hist_mfilt, if_stop, if_disphist, rstwr, nlend) ! ! !DESCRIPTION: - ! Determine logic for closeing and/or disposing history file + ! Determine logic for closing and/or disposing history file ! Sets values for if_disphist, if_stop (arguments) ! Remove history files unless this is end of run or ! history file is not full. From 3235af469c9388e1cc1439ff849ad24a8ddbd424 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Wed, 10 Oct 2018 07:07:08 -0600 Subject: [PATCH 11/46] Revert "Remove broken ncd_io_1d_log_glob" This reverts commit 0a36ae0d8058c887f40c358a70bcb26d66db4515. I'm going to try to fix ncd_io_1d_log_glob --- src/main/ncdio_pio.F90.in | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/main/ncdio_pio.F90.in b/src/main/ncdio_pio.F90.in index 6de8acb363..58f26636bf 100644 --- a/src/main/ncdio_pio.F90.in +++ b/src/main/ncdio_pio.F90.in @@ -104,7 +104,7 @@ module ncdio_pio interface ncd_io module procedure ncd_io_char_var0_start_glob - !DIMS 0 + !DIMS 0,1 module procedure ncd_io_{DIMS}d_log_glob !DIMS 0,1,2,3 @@ -1192,11 +1192,11 @@ contains end subroutine ncd_io_char_var0_start_glob !------------------------------------------------------------------------ - !DIMS 0 + !DIMS 0,1 subroutine ncd_io_{DIMS}d_log_glob(varname, data, flag, ncid, readvar, nt, posNOTonfile) ! ! !DESCRIPTION: - ! netcdf I/O of global logical variable + ! netcdf I/O of global integer variable ! ! !ARGUMENTS: class(file_desc_t) , intent(inout) :: ncid ! netcdf file id @@ -1242,7 +1242,12 @@ contains call shr_sys_abort(' ERROR: bad integer value for logical data'//errMsg(sourcefile, __LINE__)) end if #else - call shr_sys_abort('ncd_io_*_log_glob not implemented for DIMS > 0') + allocate(idata1d(size(data))) + data = (idata1d == 1) + if ( any(idata1d /= 0 .and. idata1d /= 1) )then + call shr_sys_abort(' ERROR: read in bad integer value(s) for logical data'//errMsg(sourcefile, __LINE__)) + end if + deallocate(idata1d) #endif endif if (present(readvar)) readvar = varpresent @@ -1262,7 +1267,18 @@ contains status = pio_put_var(ncid, varid, start, count, idata1d) deallocate(idata1d) #else - call shr_sys_abort('ncd_io_*_log_glob not implemented for DIMS > 0') + start(1) = 1 ; count(1) = size(data) + start(2) = 1 ; count(2) = 1 + if (present(nt)) start(2) = nt + allocate(idata1d(size(data))) + where( data ) + idata1d = 1 + elsewhere + idata1d = 0 + end where + call ncd_inqvid (ncid, varname, varid, vardesc) + status = pio_put_var(ncid, varid, start, count, idata1d) + deallocate( idata1d ) #endif endif ! flag From 2a83ae1176208c0a05e6390ed77695ffe62d759f Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 12 Oct 2018 06:50:27 -0600 Subject: [PATCH 12/46] Fix reading and writing of 1-d logical global arrays I copied the implementation of ncd_io_{DIMS}d_{TYPE}_glob to ncd_io_{DIMS}d_log_glob (with appropriate adjustments for the fact that we're working with logical data). By looking at diffs between those routines, I have confirmed that the two are now essentially identical in their implementation. I also made some very minor tweaks to ncd_io_{DIMS}d_{TYPE}_glob in order to reconcile the diffs between these two routines. This fixes #24 for real. --- src/main/ncdio_pio.F90.in | 57 ++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/src/main/ncdio_pio.F90.in b/src/main/ncdio_pio.F90.in index 58f26636bf..970505918b 100644 --- a/src/main/ncdio_pio.F90.in +++ b/src/main/ncdio_pio.F90.in @@ -1196,7 +1196,7 @@ contains subroutine ncd_io_{DIMS}d_log_glob(varname, data, flag, ncid, readvar, nt, posNOTonfile) ! ! !DESCRIPTION: - ! netcdf I/O of global integer variable + ! netcdf I/O of global logical variable ! ! !ARGUMENTS: class(file_desc_t) , intent(inout) :: ncid ! netcdf file id @@ -1212,10 +1212,12 @@ contains integer :: start(2), count(2) ! output bounds integer :: status ! error code logical :: varpresent ! if true, variable is on tape + logical :: found ! if true, found lat/lon dims on file integer :: idata integer, pointer :: idata1d(:) ! Temporary integer data to send to file character(len=32) :: vname ! variable error checking type(var_desc_t) :: vardesc ! local vardesc pointer + integer :: ndims character(len=*),parameter :: subname='ncd_io_{DIMS}d_log_glob' !----------------------------------------------------------------------- @@ -1225,15 +1227,21 @@ contains if (flag == 'read') then call ncd_inqvid(ncid, varname, varid, vardesc, readvar=varpresent) + + call pio_seterrorhandling(ncid, PIO_BCAST_ERROR) +#if ({DIMS}==0) if (varpresent) then + status = pio_get_var(ncid, vardesc, idata) if (single_column .and. present(posNOTonfile) ) then if ( .not. posNOTonfile )then call shr_sys_abort(' ERROR: scalar var is NOT compatable with posNOTonfile = .false.'//& errMsg(sourcefile, __LINE__)) end if endif -#if ({DIMS}==0) - status = pio_get_var(ncid, varid, idata) + if ( status /= PIO_NOERR )then + call shr_sys_abort(' ERROR: reading variable: '//trim(varname)//' ' & + // errMsg(sourcefile, __LINE__)) + end if if ( idata == 0 )then data = .false. else if ( idata == 1 )then @@ -1241,32 +1249,51 @@ contains else call shr_sys_abort(' ERROR: bad integer value for logical data'//errMsg(sourcefile, __LINE__)) end if + end if #else + if (varpresent) then allocate(idata1d(size(data))) - data = (idata1d == 1) + if (single_column) then + call scam_field_offsets(ncid,'undefined', vardesc,& + start, count, found=found, posNOTonfile=posNOTonfile) + if ( found )then + status = pio_get_var(ncid, varid, start, count, idata1d) + else + status = pio_get_var(ncid, varid, idata1d) + end if + else + status = pio_get_var(ncid, varid, idata1d) + endif + if ( status /= PIO_NOERR )then + call shr_sys_abort(' ERROR: reading variable: '//trim(varname)//' ' & + // errMsg(sourcefile, __LINE__)) + end if if ( any(idata1d /= 0 .and. idata1d /= 1) )then call shr_sys_abort(' ERROR: read in bad integer value(s) for logical data'//errMsg(sourcefile, __LINE__)) end if + data = (idata1d == 1) deallocate(idata1d) -#endif endif +#endif + call pio_seterrorhandling(ncid, PIO_INTERNAL_ERROR) if (present(readvar)) readvar = varpresent elseif (flag == 'write') then - + ndims = {DIMS} + if(present(nt)) ndims=ndims+1 + call ncd_inqvid (ncid, varname, varid, vardesc) #if ({DIMS}==0) start(1) = 1 ; count(1) = 1 if (present(nt)) start(1) = nt - call ncd_inqvid (ncid, varname, varid, vardesc) allocate(idata1d(1)) if ( data )then idata1d(1) = 1 else idata1d(1) = 0 end if - status = pio_put_var(ncid, varid, start, count, idata1d) + status = pio_put_var(ncid, varid, start(1:1), count(1:1), idata1d) deallocate(idata1d) -#else +#elif ({DIMS}==1) start(1) = 1 ; count(1) = size(data) start(2) = 1 ; count(2) = 1 if (present(nt)) start(2) = nt @@ -1276,8 +1303,7 @@ contains elsewhere idata1d = 0 end where - call ncd_inqvid (ncid, varname, varid, vardesc) - status = pio_put_var(ncid, varid, start, count, idata1d) + status = pio_put_var(ncid, varid, start(1:ndims), count(1:ndims), idata1d) deallocate( idata1d ) #endif @@ -1303,7 +1329,6 @@ contains logical , optional, intent(in) :: posNOTonfile ! position is NOT on this file ! ! !LOCAL VARIABLES: - integer :: m integer :: varid ! netCDF variable id integer :: start({DIMS}+1), count({DIMS}+1) ! output bounds integer :: status ! error code @@ -1311,9 +1336,9 @@ contains logical :: found ! if true, found lat/lon dims on file character(len=32) :: vname ! variable error checking type(var_desc_t) :: vardesc ! local vardesc pointer - {VTYPE} :: temp(1) + integer :: ndims + {VTYPE} :: temp(1) character(len=*),parameter :: subname='ncd_io_{DIMS}d_{TYPE}_glob' - integer :: ndims !----------------------------------------------------------------------- start(:) = 0 @@ -1366,7 +1391,7 @@ contains call ncd_inqvid (ncid, varname, varid, vardesc) #if ({DIMS}==0) start(1) = 1 ; count(1) = 1 - if (present(nt)) start(1) = nt ; count(1) = 1 + if (present(nt)) start(1) = nt temp(1) = data status = pio_put_var(ncid, varid, start(1:1), count(1:1), temp) #elif ({DIMS}==1) @@ -1392,7 +1417,7 @@ contains end if #endif - endif + endif ! flag end subroutine ncd_io_{DIMS}d_{TYPE}_glob From 36b93caed41b86a8b21e3f33debfac3ad3204efa Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 12 Oct 2018 06:59:59 -0600 Subject: [PATCH 13/46] Read whole history_tape_in_use array at once It wasn't working to read this array one element at a time: the ncd_io routine seems not to support this use. Now that I have fixed this routine to allow reading / writing of 1-d data, I'm leveraging this functionality. --- src/main/histFileMod.F90 | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index d09bc523b2..a4eb5331ed 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -3608,7 +3608,7 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) integer :: dimid ! dimension ID integer :: k ! 1d index integer :: ntapes_onfile ! number of history tapes on the restart file - logical :: history_tape_in_use_onfile ! whether a given history tape is in use, according to the restart file + logical, allocatable :: history_tape_in_use_onfile(:) ! whether a given history tape is in use, according to the restart file integer :: nflds_onfile ! number of history fields on the restart file logical :: readvar ! whether a variable was read successfully integer :: t ! tape index @@ -3990,33 +3990,31 @@ subroutine hist_restart_ncd (bounds, ncid, flag, rdate) additional_msg=errMsg(sourcefile, __LINE__)) end if - do t = 1, ntapes - ! NOTE(wjs, 2018-10-06) Ideally, we'd read all values of history_tape_in_use - ! at once. However, we currently don't have a 1-d logical ncd_io routine, so - ! we have to read values one at a time. + if (ntapes > 0) then + allocate(history_tape_in_use_onfile(ntapes)) call ncd_io('history_tape_in_use', history_tape_in_use_onfile, 'read', ncid, & - readvar=readvar, nt=t) + readvar=readvar) if (.not. readvar) then ! BACKWARDS_COMPATIBILITY(wjs, 2018-10-06) Old restart files do not have ! 'history_tape_in_use'. However, before now, this has implicitly been ! true for all tapes <= ntapes. - history_tape_in_use_onfile = .true. + history_tape_in_use_onfile(:) = .true. end if - if (history_tape_in_use_onfile .neqv. history_tape_in_use(t)) then - write(iulog,*) subname//' ERROR: history_tape_in_use on restart file' - write(iulog,*) 'disagrees with current run: For tape ', t - write(iulog,*) 'On restart file: ', history_tape_in_use_onfile - write(iulog,*) 'In current run : ', history_tape_in_use(t) - write(iulog,*) 'This suggests that this tape was empty in one case,' - write(iulog,*) 'but non-empty in the other. (history_tape_in_use .false.' - write(iulog,*) 'means that history tape is empty.)' - call endrun(msg=' ERROR: history_tape_in_use differs from restart file. '// & - 'You can NOT change history options on restart.', & - additional_msg=errMsg(sourcefile, __LINE__)) - end if - end do + do t = 1, ntapes + if (history_tape_in_use_onfile(t) .neqv. history_tape_in_use(t)) then + write(iulog,*) subname//' ERROR: history_tape_in_use on restart file' + write(iulog,*) 'disagrees with current run: For tape ', t + write(iulog,*) 'On restart file: ', history_tape_in_use_onfile(t) + write(iulog,*) 'In current run : ', history_tape_in_use(t) + write(iulog,*) 'This suggests that this tape was empty in one case,' + write(iulog,*) 'but non-empty in the other. (history_tape_in_use .false.' + write(iulog,*) 'means that history tape is empty.)' + call endrun(msg=' ERROR: history_tape_in_use differs from restart file. '// & + 'You can NOT change history options on restart.', & + additional_msg=errMsg(sourcefile, __LINE__)) + end if + end do - if (ntapes > 0 )then call ncd_io('locfnh', locfnh(1:ntapes), 'read', ncid ) call ncd_io('locfnhr', locrest(1:ntapes), 'read', ncid ) do t = 1,ntapes From 7262d6e928c2cf1cc60468651fd5a58ca90199c3 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 15 Oct 2018 10:16:00 -0600 Subject: [PATCH 14/46] Change = to += in hist_fexcl and hist_fincl lists This will be more robust as we leverage inheritance more heavily in these usermods. --- .../usermods_dirs/cmip6_output/user_nl_clm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cime_config/usermods_dirs/cmip6_output/user_nl_clm b/cime_config/usermods_dirs/cmip6_output/user_nl_clm index 5c9890a64f..1ac4015e5e 100644 --- a/cime_config/usermods_dirs/cmip6_output/user_nl_clm +++ b/cime_config/usermods_dirs/cmip6_output/user_nl_clm @@ -20,13 +20,13 @@ ! h0 stream (monthly average, gridcell-level) ! Emon, Lmon, LIMon -hist_fexcl1 = 'PCT_CFT', 'PCT_GLC_MEC', 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', +hist_fexcl1 += 'PCT_CFT', 'PCT_GLC_MEC', 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', 'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr','CWDN_vr', 'PCT_NAT_PFT','SMIN_NO3_vr','CONC_O2_UNSAT', 'CONC_O2_SAT','SMIN_NH4_vr','SMINN_vr' ! h0 stream ICE variables and other variables inactive by default (monthly average, gridcell-level) ! Emon, Lmon, LIMon -hist_fincl1 = 'EFLX_LH_TOT_ICE', 'FIRE_ICE', 'FLDS_ICE', 'FSH_ICE', 'FSNO_ICE', 'FSR_ICE', +hist_fincl1 += 'EFLX_LH_TOT_ICE', 'FIRE_ICE', 'FLDS_ICE', 'FSH_ICE', 'FSNO_ICE', 'FSR_ICE', 'QFLX_SUB_SNOW_ICE', 'QRUNOFF_ICE', 'QSNOFRZ_ICE', 'QSNOMELT_ICE', 'RAIN_ICE', 'SNOW_ICE', 'SNOWICE_ICE', 'SNOWLIQ_ICE', 'SNOTXMASS_ICE', 'TG_ICE', 'TOPO_COL_ICE', 'TSA_ICE', 'TSOI_ICE', 'LEAFC_TO_LITTER', 'FROOTC_TO_LITTER','LITR1C_TO_SOIL1C','LITR1N_TO_SOIL1N','LITR2C_TO_SOIL1C', @@ -34,42 +34,42 @@ hist_fincl1 = 'EFLX_LH_TOT_ICE', 'FIRE_ICE', 'FLDS_ICE', 'FSH_ICE', 'FSNO_ICE', ! h1 stream (monthly average, finest sub-grid) ! Emon, Lmon -hist_fincl2 = 'GPP', 'NPP', 'AGNPP', 'TLAI', 'TOTVEGC', 'TSA','TREFMNAV','TREFMXAV', 'BTRANMN', 'NPP_NUPTAKE', 'GRAINC_TO_FOOD', +hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TLAI', 'TOTVEGC', 'TSA','TREFMNAV','TREFMXAV', 'BTRANMN', 'NPP_NUPTAKE', 'GRAINC_TO_FOOD', 'Vcmx25Z', 'FSH', 'NFERTILIZATION', 'AR', 'VEGWP', 'FCTR', 'FCEV', 'FGEV', 'FIRE', 'FSR', 'HTOP', 'FIRA', 'FSA', 'HR', 'GSSUNLN', 'GSSHALN', 'TSKIN' ! h2 stream (monthly average, landunit-level) ! Emon ! TOT_WOODPRODC:I, CROPPROD1C:I, and NEE are not available at the landunit level -hist_fincl3 = 'FSR', 'H2OSNO', 'Q2M', 'SNOWDP', 'TSA', 'TREFMNAV', 'TREFMXAV', 'TG', 'QRUNOFF', 'FSH', 'FIRE', 'FIRA', 'FGR', +hist_fincl3 += 'FSR', 'H2OSNO', 'Q2M', 'SNOWDP', 'TSA', 'TREFMNAV', 'TREFMXAV', 'TG', 'QRUNOFF', 'FSH', 'FIRE', 'FIRA', 'FGR', 'EFLX_LH_TOT', 'RH2M', 'TLAI', 'GPP', 'NPP', 'SOILWATER_10CM', 'TOTSOILLIQ', 'TOTSOILICE', 'AR', 'HR', 'DWT_CONV_CFLUX_PATCH', 'WOOD_HARVESTC', 'U10', 'DWT_WOOD_PRODUCTC_GAIN_PATCH', 'GRAINC_TO_FOOD', 'SLASH_HARVESTC', 'TSOI_10CM', 'COL_FIRE_CLOSS', 'DWT_SLASH_CFLUX', 'QIRRIG', 'URBAN_HEAT', 'WASTEHEAT', 'HTOP', 'TSKIN', 'FROOTC:I' ! h3 stream (yearly average, gridcell-level) ! Eyr -hist_fincl4 = 'PCT_CFT', 'PCT_GLC_MEC', 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', +hist_fincl4 += 'PCT_CFT', 'PCT_GLC_MEC', 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', 'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr','CWDN_vr', 'QICE_FORC', 'TSRF_FORC', 'TOPO_FORC' 'PCT_NAT_PFT','PCT_LANDUNIT','TOTLITC:I','TOT_WOODPRODC:I','CROPPROD1C:I','TOTSOMC:I','TOTVEGC:I','FSNO_ICE' ! h4 stream (yearly average, landunit-level) ! Eyr landuse tiles -hist_fincl5 = 'TOTSOMC:I', 'TOTSOMC_1m:I', 'TOTECOSYSC:I', 'TOTVEGC:I', 'WOODC:I', 'TOTLITC:I', 'LIVECROOTC:I', 'DEADCROOTC:I', 'FROOTC:I' +hist_fincl5 += 'TOTSOMC:I', 'TOTSOMC_1m:I', 'TOTECOSYSC:I', 'TOTVEGC:I', 'WOODC:I', 'TOTLITC:I', 'LIVECROOTC:I', 'DEADCROOTC:I', 'FROOTC:I' ! h5 stream (daily average, gridcell-level) ! day, Eday -hist_fincl6 = 'SOILWATER_10CM', 'TOTSOILLIQ', 'TOTSOILICE', 'GPP', 'NPP', 'AR', 'HR', 'EFLX_LH_TOT', 'FSH', 'FGR12', 'FSM', 'QSNOEVAP', 'TLAI', 'QDRAI', 'QDRAI_PERCH', 'QOVER', 'QFLX_SUB_SNOW', 'FSA', 'FIRA', 'H2OSNO', 'SNOCAN', 'QSNOFRZ', 'QFLX_SNOW_DRAIN', 'SNOWDP', 'H2OSFC', 'TV', 'TG', 'TAUX', 'TAUY', 'QVEGT', 'TWS', 'H2OCAN', 'ALT', 'QVEGE', 'QSOIL', 'TSKIN', 'FSDS','FSNO','SNOFSRVD','SNOFSRVI','SNOFSRND','SNOFSRNI','FSDSVD','FSDSVI','FSDSND','FSDSNI','SNOWLIQ','SOILICE','SOILLIQ','QINTR','SNOBCMSL','TSOI','SNOTXMASS','SNOWICE','SNOWLIQ','QRUNOFF','RAIN','SNOW' +hist_fincl6 += 'SOILWATER_10CM', 'TOTSOILLIQ', 'TOTSOILICE', 'GPP', 'NPP', 'AR', 'HR', 'EFLX_LH_TOT', 'FSH', 'FGR12', 'FSM', 'QSNOEVAP', 'TLAI', 'QDRAI', 'QDRAI_PERCH', 'QOVER', 'QFLX_SUB_SNOW', 'FSA', 'FIRA', 'H2OSNO', 'SNOCAN', 'QSNOFRZ', 'QFLX_SNOW_DRAIN', 'SNOWDP', 'H2OSFC', 'TV', 'TG', 'TAUX', 'TAUY', 'QVEGT', 'TWS', 'H2OCAN', 'ALT', 'QVEGE', 'QSOIL', 'TSKIN', 'FSDS','FSNO','SNOFSRVD','SNOFSRVI','SNOFSRND','SNOFSRNI','FSDSVD','FSDSVI','FSDSND','FSDSNI','SNOWLIQ','SOILICE','SOILLIQ','QINTR','SNOBCMSL','TSOI','SNOTXMASS','SNOWICE','SNOWLIQ','QRUNOFF','RAIN','SNOW' ! h6 stream (daily average, landunit-level) ! Eday -hist_fincl7 = 'TREFMXAV','TREFMNAV' +hist_fincl7 += 'TREFMXAV','TREFMNAV' ! h7 stream (3-hourly average, gridcell-level) ! 3hr, E3hr, CF3hr ! 3hr requires QRUNOFF for time mean, and SOILWATER_10CM, TSKIN for time point (I) ! E3hr requires GPP, AR, HR for time mean ! CF3hr requires QFLX_SUB_SNOW for time point (I) -hist_fincl8 = 'GPP','AR','HR','TSA','RH2M','SOILWATER_10CM:I','FSH','EFLX_LH_TOT','FSDS','QRUNOFF','QFLX_SUB_SNOW:I','TSKIN:I' +hist_fincl8 += 'GPP','AR','HR','TSA','RH2M','SOILWATER_10CM:I','FSH','EFLX_LH_TOT','FSDS','QRUNOFF','QFLX_SUB_SNOW:I','TSKIN:I' hist_mfilt = 1,1,1,1,1,365,365,2920 hist_dov2xy = .true.,.false.,.false.,.true.,.false.,.true.,.false.,.true. From 05f653b708848f60ab6ce7e19ad17f6189e0dc13 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 15 Oct 2018 10:18:10 -0600 Subject: [PATCH 15/46] Move the setting of histaux_l2x1yrg into cmip6_glaciers This setting is generally wanted when the other cmip6_glaciers settings are wanted. This move will allow us to use cmip6_output for more general purposes. --- .../usermods_dirs/{cmip6_output => cmip6_glaciers}/user_nl_cpl | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cime_config/usermods_dirs/{cmip6_output => cmip6_glaciers}/user_nl_cpl (100%) diff --git a/cime_config/usermods_dirs/cmip6_output/user_nl_cpl b/cime_config/usermods_dirs/cmip6_glaciers/user_nl_cpl similarity index 100% rename from cime_config/usermods_dirs/cmip6_output/user_nl_cpl rename to cime_config/usermods_dirs/cmip6_glaciers/user_nl_cpl From e27965278c2606e281d6fb350b79344c2d06558b Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 22 Oct 2018 06:50:46 -0600 Subject: [PATCH 16/46] Start adding usermods directories for extra output This begins to add hierarchical usermods directories for getting extra output. output_base and output_base_highfreq will serve as the starting point for specific configurations (for SP, BGC and BGC-CROP). This also adds directories for SP (output_sp and output_sp_highfreq). BGC and BGC-CROP versions are still needed. Note that hist_nhtfrq and related options are listed individually, like: hist_nhtfrq(1) = 0 hist_nhtfrq(2) = 0 ... rather than as a list: hist_nhtfrq = 0,0,... My rationale for this is two-fold: (1) It more clearly shows the association between fields and characteristics of the tape (2) It makes things work right if a given usermods directory ends up including both output_base and output_base_highfreq directly or indirectly (which is easy to have happen). --- cime_config/usermods_dirs/output_base/README | 6 ++ .../usermods_dirs/output_base/user_nl_clm | 66 +++++++++++++++++++ .../usermods_dirs/output_base_highfreq/README | 7 ++ .../output_base_highfreq/include_user_mods | 1 + .../output_base_highfreq/user_nl_clm | 31 +++++++++ .../usermods_dirs/output_sp/include_user_mods | 1 + .../usermods_dirs/output_sp/user_nl_clm | 10 +++ .../output_sp_highfreq/include_user_mods | 2 + .../output_sp_highfreq/user_nl_clm | 10 +++ 9 files changed, 134 insertions(+) create mode 100644 cime_config/usermods_dirs/output_base/README create mode 100644 cime_config/usermods_dirs/output_base/user_nl_clm create mode 100644 cime_config/usermods_dirs/output_base_highfreq/README create mode 100644 cime_config/usermods_dirs/output_base_highfreq/include_user_mods create mode 100644 cime_config/usermods_dirs/output_base_highfreq/user_nl_clm create mode 100644 cime_config/usermods_dirs/output_sp/include_user_mods create mode 100644 cime_config/usermods_dirs/output_sp/user_nl_clm create mode 100644 cime_config/usermods_dirs/output_sp_highfreq/include_user_mods create mode 100644 cime_config/usermods_dirs/output_sp_highfreq/user_nl_clm diff --git a/cime_config/usermods_dirs/output_base/README b/cime_config/usermods_dirs/output_base/README new file mode 100644 index 0000000000..12022992fb --- /dev/null +++ b/cime_config/usermods_dirs/output_base/README @@ -0,0 +1,6 @@ +This usermods directory provides a common base on which other usermods +can build for changing the out-of-the-box output to something more +generally useful. + +This should not be used directly. Instead, use one of the other usermods +directories that builds on this. diff --git a/cime_config/usermods_dirs/output_base/user_nl_clm b/cime_config/usermods_dirs/output_base/user_nl_clm new file mode 100644 index 0000000000..6f85d5a516 --- /dev/null +++ b/cime_config/usermods_dirs/output_base/user_nl_clm @@ -0,0 +1,66 @@ +!---------------------------------------------------------------------------------- +! Users should add all user specific namelist changes below in the form of +! namelist_var = new_namelist_value +! +! 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 irrigate by the CLM_BLDNML_OPTS -irrig 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 maxpatch_glcmec with GLC_NEC option +! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable +!---------------------------------------------------------------------------------- + +!---------------------------------------------------------------------------------- +! Settings from output_base +!---------------------------------------------------------------------------------- + +! h0 stream (monthly average, gridcell-level) +! h0 stream ICE variables and other variables inactive by default (monthly average, gridcell-level) +! Emon, Lmon, LIMon +hist_mfilt(1) = 1 +hist_dov2xy(1) = .true. +hist_nhtfrq(1) = 0 +hist_type1d_pertape(1) = ' ' +hist_fexcl1 += 'PCT_GLC_MEC','PCT_NAT_PFT' +hist_fincl1 += 'EFLX_LH_TOT_ICE', 'FIRE_ICE', 'FLDS_ICE', 'FSH_ICE', 'FSNO_ICE', 'FSR_ICE', 'QFLX_SUB_SNOW_ICE', 'QRUNOFF_ICE', 'QSNOFRZ_ICE', 'QSNOMELT_ICE', 'RAIN_ICE', 'SNOW_ICE', 'SNOWICE_ICE', 'SNOWLIQ_ICE', 'SNOTXMASS_ICE', 'TG_ICE', 'TOPO_COL_ICE', 'TSA_ICE', 'TSOI_ICE' + +! h1 stream (monthly average, finest sub-grid) +! Emon, Lmon +hist_mfilt(2) = 1 +hist_dov2xy(2) = .false. +hist_nhtfrq(2) = 0 +hist_type1d_pertape(2) = ' ' +hist_fincl2 += 'TLAI', 'TSA','TREFMNAV','TREFMXAV', 'BTRANMN', 'Vcmx25Z', 'FSH', 'VEGWP', 'FCTR', 'FCEV', 'FGEV', 'FIRE', 'FSR', 'HTOP', 'FIRA', 'FSA', 'HR', 'GSSUNLN', 'GSSHALN', 'TSKIN' + +! h2 stream (monthly average, landunit-level) +! Emon +hist_mfilt(3) = 1 +hist_dov2xy(3) = .false. +hist_nhtfrq(3) = 0 +hist_type1d_pertape(3) = 'LAND' +hist_fincl3 += 'FSR', 'H2OSNO', 'Q2M', 'SNOWDP', 'TSA', 'TREFMNAV', 'TREFMXAV', 'TG', 'QRUNOFF', 'FSH', 'FIRE', 'FIRA', 'FGR', 'EFLX_LH_TOT', 'RH2M', 'TLAI', 'SOILWATER_10CM', 'TOTSOILLIQ', 'TOTSOILICE', 'U10', 'TSOI_10CM', 'QIRRIG', 'URBAN_HEAT', 'WASTEHEAT', 'TSKIN' + +! h3 stream (yearly average, gridcell-level) +! Eyr +hist_mfilt(4) = 1 +hist_dov2xy(4) = .true. +hist_nhtfrq(4) = -8760 +hist_type1d_pertape(4) = ' ' +hist_fincl4 += 'PCT_GLC_MEC', 'QICE_FORC', 'TSRF_FORC', 'TOPO_FORC', 'PCT_NAT_PFT','PCT_LANDUNIT','FSNO_ICE' + +! h4 stream (yearly average, landunit-level) +! Eyr landuse tiles +! (No fields in base, but other usermods add to this stream) +hist_mfilt(5) = 1 +hist_dov2xy(5) = .false. +hist_nhtfrq(5) = -8760 +hist_type1d_pertape(5) = 'LAND' + diff --git a/cime_config/usermods_dirs/output_base_highfreq/README b/cime_config/usermods_dirs/output_base_highfreq/README new file mode 100644 index 0000000000..fe6c7e0999 --- /dev/null +++ b/cime_config/usermods_dirs/output_base_highfreq/README @@ -0,0 +1,7 @@ +This usermods directory provides a common base on which other usermods +can build for changing the out-of-the-box output to something useful +when you want to include high-frequency output (daily and more +frequent). + +This should not be used directly. Instead, use one of the other usermods +directories that builds on this. diff --git a/cime_config/usermods_dirs/output_base_highfreq/include_user_mods b/cime_config/usermods_dirs/output_base_highfreq/include_user_mods new file mode 100644 index 0000000000..bee18982f6 --- /dev/null +++ b/cime_config/usermods_dirs/output_base_highfreq/include_user_mods @@ -0,0 +1 @@ +../output_base diff --git a/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm b/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm new file mode 100644 index 0000000000..969f9ab7fd --- /dev/null +++ b/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm @@ -0,0 +1,31 @@ +!---------------------------------------------------------------------------------- +! Settings from output_base_highfreq +!---------------------------------------------------------------------------------- + +! h5 stream (daily average, gridcell-level) +! day, Eday +hist_mfilt(6) = 365 +hist_dov2xy(6) = .true. +hist_nhtfrq(6) = -24 +hist_type1d_pertape(6) = ' ' +hist_fincl6 += 'SOILWATER_10CM', 'TOTSOILLIQ', 'TOTSOILICE', 'EFLX_LH_TOT', 'FSH', 'FGR12', 'FSM', 'QSNOEVAP', 'TLAI', 'QDRAI', 'QDRAI_PERCH', 'QOVER', 'QFLX_SUB_SNOW', 'FSA', 'FIRA', 'H2OSNO', 'SNOCAN', 'QSNOFRZ', 'QFLX_SNOW_DRAIN', 'SNOWDP', 'H2OSFC', 'TV', 'TG', 'TAUX', 'TAUY', 'QVEGT', 'TWS', 'H2OCAN', 'QVEGE', 'QSOIL', 'TSKIN', 'FSDS','FSNO','SNOFSRVD','SNOFSRVI','SNOFSRND','SNOFSRNI','FSDSVD','FSDSVI','FSDSND','FSDSNI','SNOWLIQ','SOILICE','SOILLIQ','QINTR','SNOBCMSL','TSOI','SNOTXMASS','SNOWICE','SNOWLIQ','QRUNOFF','RAIN','SNOW' + +! h6 stream (daily average, landunit-level) +! Eday +hist_mfilt(7) = 365 +hist_dov2xy(7) = .false. +hist_nhtfrq(7) = -24 +hist_type1d_pertape(7) = 'LAND' +hist_fincl7 += 'TREFMXAV','TREFMNAV' + +! h7 stream (3-hourly average, gridcell-level) +! 3hr, E3hr, CF3hr +! 3hr requires QRUNOFF for time mean, and SOILWATER_10CM, TSKIN for time point (I) +! E3hr requires GPP, AR, HR for time mean +! CF3hr requires QFLX_SUB_SNOW for time point (I) +hist_mfilt(8) = 2920 +hist_dov2xy(8) = .true. +hist_nhtfrq(8) = -3 +hist_type1d_pertape(8) = ' ' +hist_fincl8 += 'TSA','RH2M','SOILWATER_10CM:I','FSH','EFLX_LH_TOT','FSDS','QRUNOFF','QFLX_SUB_SNOW:I','TSKIN:I' + diff --git a/cime_config/usermods_dirs/output_sp/include_user_mods b/cime_config/usermods_dirs/output_sp/include_user_mods new file mode 100644 index 0000000000..bee18982f6 --- /dev/null +++ b/cime_config/usermods_dirs/output_sp/include_user_mods @@ -0,0 +1 @@ +../output_base diff --git a/cime_config/usermods_dirs/output_sp/user_nl_clm b/cime_config/usermods_dirs/output_sp/user_nl_clm new file mode 100644 index 0000000000..1dfb4970b5 --- /dev/null +++ b/cime_config/usermods_dirs/output_sp/user_nl_clm @@ -0,0 +1,10 @@ +!---------------------------------------------------------------------------------- +! Settings from output_sp +!---------------------------------------------------------------------------------- + +! h1 stream (monthly average, finest sub-grid) +hist_fincl2 += 'FPSN' + +! h2 stream (monthly average, landunit-level) +hist_fincl3 += 'FPSN' + diff --git a/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods b/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods new file mode 100644 index 0000000000..4a3a211b15 --- /dev/null +++ b/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods @@ -0,0 +1,2 @@ +../output_sp +../output_base_highfreq diff --git a/cime_config/usermods_dirs/output_sp_highfreq/user_nl_clm b/cime_config/usermods_dirs/output_sp_highfreq/user_nl_clm new file mode 100644 index 0000000000..a8f6e30965 --- /dev/null +++ b/cime_config/usermods_dirs/output_sp_highfreq/user_nl_clm @@ -0,0 +1,10 @@ +!---------------------------------------------------------------------------------- +! Settings from output_sp_highfreq +!---------------------------------------------------------------------------------- + +! h5 stream (daily average, gridcell-level) +hist_fincl6 += 'FPSN' + +! h7 stream (3-hourly average, gridcell-level) +hist_fincl8 += 'FPSN' + From f779796b43a5c47374d27fff5fac3ad01031ecf5 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 22 Oct 2018 15:55:00 -0600 Subject: [PATCH 17/46] Add output_bgc and output_bgc_highfreq usermods --- .../output_bgc/include_user_mods | 1 + .../usermods_dirs/output_bgc/user_nl_clm | 21 +++++++++++++++++++ .../output_bgc_highfreq/include_user_mods | 2 ++ .../output_bgc_highfreq/user_nl_clm | 11 ++++++++++ 4 files changed, 35 insertions(+) create mode 100644 cime_config/usermods_dirs/output_bgc/include_user_mods create mode 100644 cime_config/usermods_dirs/output_bgc/user_nl_clm create mode 100644 cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods create mode 100644 cime_config/usermods_dirs/output_bgc_highfreq/user_nl_clm diff --git a/cime_config/usermods_dirs/output_bgc/include_user_mods b/cime_config/usermods_dirs/output_bgc/include_user_mods new file mode 100644 index 0000000000..bee18982f6 --- /dev/null +++ b/cime_config/usermods_dirs/output_bgc/include_user_mods @@ -0,0 +1 @@ +../output_base diff --git a/cime_config/usermods_dirs/output_bgc/user_nl_clm b/cime_config/usermods_dirs/output_bgc/user_nl_clm new file mode 100644 index 0000000000..be63446b98 --- /dev/null +++ b/cime_config/usermods_dirs/output_bgc/user_nl_clm @@ -0,0 +1,21 @@ +!---------------------------------------------------------------------------------- +! Settings from output_bgc +!---------------------------------------------------------------------------------- + +! h0 stream (monthly average, gridcell-level) +hist_fexcl1 += 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', 'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr', 'CWDN_vr', 'SMIN_NO3_vr', 'CONC_O2_UNSAT', 'CONC_O2_SAT','SMIN_NH4_vr','SMINN_vr' +hist_fincl1 += 'LEAFC_TO_LITTER', 'FROOTC_TO_LITTER','LITR1C_TO_SOIL1C','LITR1N_TO_SOIL1N','LITR2C_TO_SOIL1C', 'LITR2N_TO_SOIL1N','LITR3C_TO_SOIL2C','LITR3N_TO_SOIL2N','DWT_WOOD_PRODUCTC_GAIN_PATCH' + +! h1 stream (monthly average, finest sub-grid) +hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TOTVEGC', 'NPP_NUPTAKE', 'Vcmx25Z', 'AR' + +! h2 stream (monthly average, landunit-level) +! TOT_WOODPRODC:I, CROPPROD1C:I, and NEE are not available at the landunit level +hist_fincl3 += 'GPP', 'NPP', 'AR', 'HR', 'DWT_CONV_CFLUX_PATCH', 'WOOD_HARVESTC', 'DWT_WOOD_PRODUCTC_GAIN_PATCH', 'SLASH_HARVESTC', 'COL_FIRE_CLOSS', 'DWT_SLASH_CFLUX', 'FROOTC:I', 'HTOP' + +! h3 stream (yearly average, gridcell-level) +hist_fincl4 += 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', 'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr','CWDN_vr', 'TOTLITC:I', 'TOT_WOODPRODC:I', 'TOTSOMC:I','TOTVEGC:I' + +! h4 stream (yearly average, landunit-level) +hist_fincl5 += 'TOTSOMC:I', 'TOTSOMC_1m:I', 'TOTECOSYSC:I', 'TOTVEGC:I', 'WOODC:I', 'TOTLITC:I', 'LIVECROOTC:I', 'DEADCROOTC:I', 'FROOTC:I' + diff --git a/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods b/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods new file mode 100644 index 0000000000..3d7b23c7ad --- /dev/null +++ b/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods @@ -0,0 +1,2 @@ +../output_bgc +../output_base_highfreq diff --git a/cime_config/usermods_dirs/output_bgc_highfreq/user_nl_clm b/cime_config/usermods_dirs/output_bgc_highfreq/user_nl_clm new file mode 100644 index 0000000000..b6fc0b1133 --- /dev/null +++ b/cime_config/usermods_dirs/output_bgc_highfreq/user_nl_clm @@ -0,0 +1,11 @@ +!---------------------------------------------------------------------------------- +! Settings from output_bgc_highfreq +!---------------------------------------------------------------------------------- + +! h5 stream (daily average, gridcell-level) +hist_fincl6 += 'GPP', 'NPP', 'AR', 'HR', 'ALT' + +! h7 stream (3-hourly average, gridcell-level) +! E3hr requires GPP, AR, HR for time mean +hist_fincl8 += 'GPP','AR','HR' + From dbf69befba008a85b1d02b01d854a8bb88061900 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 22 Oct 2018 16:00:15 -0600 Subject: [PATCH 18/46] Move HTOP and HR to BGC-specific usermods These fields aren't available in SP cases --- cime_config/usermods_dirs/output_base/user_nl_clm | 2 +- cime_config/usermods_dirs/output_base_highfreq/user_nl_clm | 1 - cime_config/usermods_dirs/output_bgc/user_nl_clm | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cime_config/usermods_dirs/output_base/user_nl_clm b/cime_config/usermods_dirs/output_base/user_nl_clm index 6f85d5a516..8ed36a1fa3 100644 --- a/cime_config/usermods_dirs/output_base/user_nl_clm +++ b/cime_config/usermods_dirs/output_base/user_nl_clm @@ -38,7 +38,7 @@ hist_mfilt(2) = 1 hist_dov2xy(2) = .false. hist_nhtfrq(2) = 0 hist_type1d_pertape(2) = ' ' -hist_fincl2 += 'TLAI', 'TSA','TREFMNAV','TREFMXAV', 'BTRANMN', 'Vcmx25Z', 'FSH', 'VEGWP', 'FCTR', 'FCEV', 'FGEV', 'FIRE', 'FSR', 'HTOP', 'FIRA', 'FSA', 'HR', 'GSSUNLN', 'GSSHALN', 'TSKIN' +hist_fincl2 += 'TLAI', 'TSA','TREFMNAV','TREFMXAV', 'BTRANMN', 'Vcmx25Z', 'FSH', 'VEGWP', 'FCTR', 'FCEV', 'FGEV', 'FIRE', 'FSR', 'FIRA', 'FSA', 'GSSUNLN', 'GSSHALN', 'TSKIN' ! h2 stream (monthly average, landunit-level) ! Emon diff --git a/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm b/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm index 969f9ab7fd..0972d19bb5 100644 --- a/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm +++ b/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm @@ -21,7 +21,6 @@ hist_fincl7 += 'TREFMXAV','TREFMNAV' ! h7 stream (3-hourly average, gridcell-level) ! 3hr, E3hr, CF3hr ! 3hr requires QRUNOFF for time mean, and SOILWATER_10CM, TSKIN for time point (I) -! E3hr requires GPP, AR, HR for time mean ! CF3hr requires QFLX_SUB_SNOW for time point (I) hist_mfilt(8) = 2920 hist_dov2xy(8) = .true. diff --git a/cime_config/usermods_dirs/output_bgc/user_nl_clm b/cime_config/usermods_dirs/output_bgc/user_nl_clm index be63446b98..0a2ad86eba 100644 --- a/cime_config/usermods_dirs/output_bgc/user_nl_clm +++ b/cime_config/usermods_dirs/output_bgc/user_nl_clm @@ -7,7 +7,7 @@ hist_fexcl1 += 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', hist_fincl1 += 'LEAFC_TO_LITTER', 'FROOTC_TO_LITTER','LITR1C_TO_SOIL1C','LITR1N_TO_SOIL1N','LITR2C_TO_SOIL1C', 'LITR2N_TO_SOIL1N','LITR3C_TO_SOIL2C','LITR3N_TO_SOIL2N','DWT_WOOD_PRODUCTC_GAIN_PATCH' ! h1 stream (monthly average, finest sub-grid) -hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TOTVEGC', 'NPP_NUPTAKE', 'Vcmx25Z', 'AR' +hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TOTVEGC', 'NPP_NUPTAKE', 'Vcmx25Z', 'AR', 'HR', 'HTOP' ! h2 stream (monthly average, landunit-level) ! TOT_WOODPRODC:I, CROPPROD1C:I, and NEE are not available at the landunit level From 094128e40e723415fd25d44d558f1deb891b807c Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 22 Oct 2018 16:21:05 -0600 Subject: [PATCH 19/46] Add output_crop and output_crop_highfreq usermods --- .../usermods_dirs/output_crop/include_user_mods | 1 + cime_config/usermods_dirs/output_crop/user_nl_clm | 15 +++++++++++++++ .../output_crop_highfreq/include_user_mods | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 cime_config/usermods_dirs/output_crop/include_user_mods create mode 100644 cime_config/usermods_dirs/output_crop/user_nl_clm create mode 100644 cime_config/usermods_dirs/output_crop_highfreq/include_user_mods diff --git a/cime_config/usermods_dirs/output_crop/include_user_mods b/cime_config/usermods_dirs/output_crop/include_user_mods new file mode 100644 index 0000000000..3f5a274997 --- /dev/null +++ b/cime_config/usermods_dirs/output_crop/include_user_mods @@ -0,0 +1 @@ +../output_bgc diff --git a/cime_config/usermods_dirs/output_crop/user_nl_clm b/cime_config/usermods_dirs/output_crop/user_nl_clm new file mode 100644 index 0000000000..26cf990d5f --- /dev/null +++ b/cime_config/usermods_dirs/output_crop/user_nl_clm @@ -0,0 +1,15 @@ +!---------------------------------------------------------------------------------- +! Settings from output_crop +!---------------------------------------------------------------------------------- + +! h0 stream (monthly average, gridcell-level) +hist_fexcl1 += 'PCT_CFT' + +! h1 stream (monthly average, finest sub-grid) +hist_fincl2 += 'GRAINC_TO_FOOD','NFERTILIZATION' + +! h2 stream (monthly average, landunit-level) +hist_fincl3 += 'GRAINC_TO_FOOD' + +! h3 stream (yearly average, gridcell-level) +hist_fincl4 += 'PCT_CFT','CROPPROD1C:I' diff --git a/cime_config/usermods_dirs/output_crop_highfreq/include_user_mods b/cime_config/usermods_dirs/output_crop_highfreq/include_user_mods new file mode 100644 index 0000000000..62e8c58697 --- /dev/null +++ b/cime_config/usermods_dirs/output_crop_highfreq/include_user_mods @@ -0,0 +1,2 @@ +../output_crop +../output_bgc_highfreq From 53ad6e2a5415c8eb9c38d375c12f4afce8fac204 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Tue, 23 Oct 2018 13:07:38 -0600 Subject: [PATCH 20/46] Rework cmip6 usermods and testmods to leverage the new output usermods Note that the cmip6 testmods now uses cmip6_deck_highfreq rather than cmip6_evolving_glaciers (partly because cmip6_evolving_glaciers doesn't include high-frequency output, and partly because I think it's more important to have a test of that more standard configuration). This means that we don't have any tests of cmip6_evolving_glaciers. I think that's okay, since the diffs relative to cmip6_deck are minimal. --- cime_config/testdefs/testlist_clm.xml | 4 +- .../testdefs/testmods_dirs/clm/cmip6/README | 6 -- .../testmods_dirs/clm/cmip6/include_user_mods | 1 - .../testmods_dirs/clm/cmip6/shell_commands | 4 - .../clm/cmip6_deck_highfreq/include_user_mods | 1 + .../clm/cmip6_deck_highfreq/shell_commands | 6 ++ .../usermods_dirs/cmip6/include_user_mods | 3 - .../cmip6_deck/include_user_mods | 2 + .../cmip6_deck_highfreq/include_user_mods | 2 + .../cmip6_evolving_icesheet/include_user_mods | 2 +- .../cmip6_evolving_icesheet/user_nl_clm | 6 ++ .../usermods_dirs/cmip6_glaciers/user_nl_clm | 4 + cime_config/usermods_dirs/cmip6_output/README | 5 -- .../usermods_dirs/cmip6_output/shell_commands | 4 - .../usermods_dirs/cmip6_output/user_nl_clm | 77 ------------------- 15 files changed, 24 insertions(+), 103 deletions(-) delete mode 100644 cime_config/testdefs/testmods_dirs/clm/cmip6/README delete mode 100644 cime_config/testdefs/testmods_dirs/clm/cmip6/include_user_mods delete mode 100644 cime_config/testdefs/testmods_dirs/clm/cmip6/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands delete mode 100644 cime_config/usermods_dirs/cmip6/include_user_mods create mode 100644 cime_config/usermods_dirs/cmip6_deck/include_user_mods create mode 100644 cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods delete mode 100644 cime_config/usermods_dirs/cmip6_output/README delete mode 100644 cime_config/usermods_dirs/cmip6_output/shell_commands delete mode 100644 cime_config/usermods_dirs/cmip6_output/user_nl_clm diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 96d93654ae..237205d1b3 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -984,7 +984,7 @@ - + @@ -1492,7 +1492,7 @@ - + diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6/README b/cime_config/testdefs/testmods_dirs/clm/cmip6/README deleted file mode 100644 index 40b90f9ce0..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/cmip6/README +++ /dev/null @@ -1,6 +0,0 @@ -Note that this testmod directory includes cmip6_evolving_icesheet rather -than simply cmip6: cmip6_evolving_icesheet includes cmip6 and adds to -it. So, rather than having tests of the cmip6 usermods and separate -tests of cmip6_evolving_icesheet, it's more efficient to just have tests -of the cmip6_evolving_icesheet usermods directory, which then also cover -the cmip6 usermods directory. diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/cmip6/include_user_mods deleted file mode 100644 index 7e8fa5ec83..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/cmip6/include_user_mods +++ /dev/null @@ -1 +0,0 @@ -../../../../usermods_dirs/cmip6_evolving_icesheet diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6/shell_commands b/cime_config/testdefs/testmods_dirs/clm/cmip6/shell_commands deleted file mode 100644 index 33792ffaee..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/cmip6/shell_commands +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -./xmlchange BFBFLAG="TRUE" - diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods new file mode 100644 index 0000000000..136c5c1df1 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods @@ -0,0 +1 @@ +../../../../usermods_dirs/cmip6_deck_highfreq diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands new file mode 100644 index 0000000000..1d678a9c7d --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands @@ -0,0 +1,6 @@ +#!/bin/bash + +./xmlchange BFBFLAG="TRUE" + +# FIXME(wjs, 2018-10-23) This is temporary to match what was being run before; it should be removed +./xmlchange CCSM_BGC=CO2A diff --git a/cime_config/usermods_dirs/cmip6/include_user_mods b/cime_config/usermods_dirs/cmip6/include_user_mods deleted file mode 100644 index 88609339ba..0000000000 --- a/cime_config/usermods_dirs/cmip6/include_user_mods +++ /dev/null @@ -1,3 +0,0 @@ -../cmip6_glaciers -../cmip6_output -../carbon_isotopes diff --git a/cime_config/usermods_dirs/cmip6_deck/include_user_mods b/cime_config/usermods_dirs/cmip6_deck/include_user_mods new file mode 100644 index 0000000000..6d1c3aaf05 --- /dev/null +++ b/cime_config/usermods_dirs/cmip6_deck/include_user_mods @@ -0,0 +1,2 @@ +../cmip6_glaciers +../output_crop diff --git a/cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods b/cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods new file mode 100644 index 0000000000..95a25001e0 --- /dev/null +++ b/cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods @@ -0,0 +1,2 @@ +../cmip6_glaciers +../output_crop_highfreq diff --git a/cime_config/usermods_dirs/cmip6_evolving_icesheet/include_user_mods b/cime_config/usermods_dirs/cmip6_evolving_icesheet/include_user_mods index d8d7dacfae..58e17babd3 100644 --- a/cime_config/usermods_dirs/cmip6_evolving_icesheet/include_user_mods +++ b/cime_config/usermods_dirs/cmip6_evolving_icesheet/include_user_mods @@ -1 +1 @@ -../cmip6 +../cmip6_deck diff --git a/cime_config/usermods_dirs/cmip6_evolving_icesheet/user_nl_clm b/cime_config/usermods_dirs/cmip6_evolving_icesheet/user_nl_clm index 193f0624e7..70ca6a3946 100644 --- a/cime_config/usermods_dirs/cmip6_evolving_icesheet/user_nl_clm +++ b/cime_config/usermods_dirs/cmip6_evolving_icesheet/user_nl_clm @@ -1 +1,7 @@ +!---------------------------------------------------------------------------------- +! Settings from cmip6_evolving_icesheet +!---------------------------------------------------------------------------------- + +! h3 stream (yearly average, gridcell-level) hist_fincl4 += 'ICE_MODEL_FRACTION' + diff --git a/cime_config/usermods_dirs/cmip6_glaciers/user_nl_clm b/cime_config/usermods_dirs/cmip6_glaciers/user_nl_clm index 4963c4945a..fdc1cdb732 100644 --- a/cime_config/usermods_dirs/cmip6_glaciers/user_nl_clm +++ b/cime_config/usermods_dirs/cmip6_glaciers/user_nl_clm @@ -1,5 +1,9 @@ +!---------------------------------------------------------------------------------- +! Settings from cmip6_glaciers +!---------------------------------------------------------------------------------- ! This differs from the default in that it turns on virtual columns over Antarctica ! This is desired so that we have the output needed to drive a later offline CISM Antarctica simulation ! However, this increases the cost of CLM by about 10% glacier_region_behavior = 'single_at_atm_topo', 'virtual', 'virtual', 'virtual' + diff --git a/cime_config/usermods_dirs/cmip6_output/README b/cime_config/usermods_dirs/cmip6_output/README deleted file mode 100644 index f073548a51..0000000000 --- a/cime_config/usermods_dirs/cmip6_output/README +++ /dev/null @@ -1,5 +0,0 @@ -This directory turns on a variety of extra output fields that are desired for -cmip6 runs. - -To use these mods, you must be using a configuration with CLM50%BGC-CROP using -glc_mec (which is the standard cmip6 configuration). diff --git a/cime_config/usermods_dirs/cmip6_output/shell_commands b/cime_config/usermods_dirs/cmip6_output/shell_commands deleted file mode 100644 index d742a80f83..0000000000 --- a/cime_config/usermods_dirs/cmip6_output/shell_commands +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -./xmlchange CCSM_BGC=CO2A - diff --git a/cime_config/usermods_dirs/cmip6_output/user_nl_clm b/cime_config/usermods_dirs/cmip6_output/user_nl_clm deleted file mode 100644 index 1ac4015e5e..0000000000 --- a/cime_config/usermods_dirs/cmip6_output/user_nl_clm +++ /dev/null @@ -1,77 +0,0 @@ -!---------------------------------------------------------------------------------- -! Users should add all user specific namelist changes below in the form of -! namelist_var = new_namelist_value -! -! 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 irrigate by the CLM_BLDNML_OPTS -irrig 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 maxpatch_glcmec with GLC_NEC option -! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable -!---------------------------------------------------------------------------------- - -! h0 stream (monthly average, gridcell-level) -! Emon, Lmon, LIMon -hist_fexcl1 += 'PCT_CFT', 'PCT_GLC_MEC', 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', -'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr','CWDN_vr', -'PCT_NAT_PFT','SMIN_NO3_vr','CONC_O2_UNSAT', 'CONC_O2_SAT','SMIN_NH4_vr','SMINN_vr' - -! h0 stream ICE variables and other variables inactive by default (monthly average, gridcell-level) -! Emon, Lmon, LIMon -hist_fincl1 += 'EFLX_LH_TOT_ICE', 'FIRE_ICE', 'FLDS_ICE', 'FSH_ICE', 'FSNO_ICE', 'FSR_ICE', -'QFLX_SUB_SNOW_ICE', 'QRUNOFF_ICE', 'QSNOFRZ_ICE', 'QSNOMELT_ICE', 'RAIN_ICE', 'SNOW_ICE', -'SNOWICE_ICE', 'SNOWLIQ_ICE', 'SNOTXMASS_ICE', 'TG_ICE', 'TOPO_COL_ICE', 'TSA_ICE', 'TSOI_ICE', -'LEAFC_TO_LITTER', 'FROOTC_TO_LITTER','LITR1C_TO_SOIL1C','LITR1N_TO_SOIL1N','LITR2C_TO_SOIL1C', -'LITR2N_TO_SOIL1N','LITR3C_TO_SOIL2C','LITR3N_TO_SOIL2N','DWT_WOOD_PRODUCTC_GAIN_PATCH' - -! h1 stream (monthly average, finest sub-grid) -! Emon, Lmon -hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TLAI', 'TOTVEGC', 'TSA','TREFMNAV','TREFMXAV', 'BTRANMN', 'NPP_NUPTAKE', 'GRAINC_TO_FOOD', -'Vcmx25Z', 'FSH', 'NFERTILIZATION', 'AR', 'VEGWP', 'FCTR', 'FCEV', 'FGEV', 'FIRE', 'FSR', 'HTOP', -'FIRA', 'FSA', 'HR', 'GSSUNLN', 'GSSHALN', 'TSKIN' - -! h2 stream (monthly average, landunit-level) -! Emon -! TOT_WOODPRODC:I, CROPPROD1C:I, and NEE are not available at the landunit level -hist_fincl3 += 'FSR', 'H2OSNO', 'Q2M', 'SNOWDP', 'TSA', 'TREFMNAV', 'TREFMXAV', 'TG', 'QRUNOFF', 'FSH', 'FIRE', 'FIRA', 'FGR', -'EFLX_LH_TOT', 'RH2M', 'TLAI', 'GPP', 'NPP', 'SOILWATER_10CM', 'TOTSOILLIQ', 'TOTSOILICE', 'AR', 'HR', 'DWT_CONV_CFLUX_PATCH', -'WOOD_HARVESTC', 'U10', 'DWT_WOOD_PRODUCTC_GAIN_PATCH', 'GRAINC_TO_FOOD', 'SLASH_HARVESTC', 'TSOI_10CM', 'COL_FIRE_CLOSS', -'DWT_SLASH_CFLUX', 'QIRRIG', 'URBAN_HEAT', 'WASTEHEAT', 'HTOP', 'TSKIN', 'FROOTC:I' - -! h3 stream (yearly average, gridcell-level) -! Eyr -hist_fincl4 += 'PCT_CFT', 'PCT_GLC_MEC', 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', 'SOIL3N_vr', 'CWDC_vr', -'LITR1C_vr', 'LITR2C_vr', 'LITR3C_vr', 'LITR1N_vr', 'LITR2N_vr', 'LITR3N_vr','CWDN_vr', 'QICE_FORC', 'TSRF_FORC', 'TOPO_FORC' -'PCT_NAT_PFT','PCT_LANDUNIT','TOTLITC:I','TOT_WOODPRODC:I','CROPPROD1C:I','TOTSOMC:I','TOTVEGC:I','FSNO_ICE' - -! h4 stream (yearly average, landunit-level) -! Eyr landuse tiles -hist_fincl5 += 'TOTSOMC:I', 'TOTSOMC_1m:I', 'TOTECOSYSC:I', 'TOTVEGC:I', 'WOODC:I', 'TOTLITC:I', 'LIVECROOTC:I', 'DEADCROOTC:I', 'FROOTC:I' - -! h5 stream (daily average, gridcell-level) -! day, Eday -hist_fincl6 += 'SOILWATER_10CM', 'TOTSOILLIQ', 'TOTSOILICE', 'GPP', 'NPP', 'AR', 'HR', 'EFLX_LH_TOT', 'FSH', 'FGR12', 'FSM', 'QSNOEVAP', 'TLAI', 'QDRAI', 'QDRAI_PERCH', 'QOVER', 'QFLX_SUB_SNOW', 'FSA', 'FIRA', 'H2OSNO', 'SNOCAN', 'QSNOFRZ', 'QFLX_SNOW_DRAIN', 'SNOWDP', 'H2OSFC', 'TV', 'TG', 'TAUX', 'TAUY', 'QVEGT', 'TWS', 'H2OCAN', 'ALT', 'QVEGE', 'QSOIL', 'TSKIN', 'FSDS','FSNO','SNOFSRVD','SNOFSRVI','SNOFSRND','SNOFSRNI','FSDSVD','FSDSVI','FSDSND','FSDSNI','SNOWLIQ','SOILICE','SOILLIQ','QINTR','SNOBCMSL','TSOI','SNOTXMASS','SNOWICE','SNOWLIQ','QRUNOFF','RAIN','SNOW' - -! h6 stream (daily average, landunit-level) -! Eday -hist_fincl7 += 'TREFMXAV','TREFMNAV' - -! h7 stream (3-hourly average, gridcell-level) -! 3hr, E3hr, CF3hr -! 3hr requires QRUNOFF for time mean, and SOILWATER_10CM, TSKIN for time point (I) -! E3hr requires GPP, AR, HR for time mean -! CF3hr requires QFLX_SUB_SNOW for time point (I) -hist_fincl8 += 'GPP','AR','HR','TSA','RH2M','SOILWATER_10CM:I','FSH','EFLX_LH_TOT','FSDS','QRUNOFF','QFLX_SUB_SNOW:I','TSKIN:I' - -hist_mfilt = 1,1,1,1,1,365,365,2920 -hist_dov2xy = .true.,.false.,.false.,.true.,.false.,.true.,.false.,.true. -hist_nhtfrq = 0,0,0,-8760,-8760,-24,-24,-3 -hist_type1d_pertape = ' ',' ','LAND',' ','LAND',' ','LAND',' ' From 3a8e0699fb998a2f0122b36ed2691b6a7ea54c15 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Tue, 23 Oct 2018 15:10:15 -0600 Subject: [PATCH 21/46] Fix double inclusion of Vcmx25Z history field This was included via both the base and bgc mods --- cime_config/usermods_dirs/output_bgc/user_nl_clm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/usermods_dirs/output_bgc/user_nl_clm b/cime_config/usermods_dirs/output_bgc/user_nl_clm index 0a2ad86eba..c97c282ff6 100644 --- a/cime_config/usermods_dirs/output_bgc/user_nl_clm +++ b/cime_config/usermods_dirs/output_bgc/user_nl_clm @@ -7,7 +7,7 @@ hist_fexcl1 += 'SOIL1C_vr', 'SOIL1N_vr', 'SOIL2C_vr', 'SOIL2N_vr', 'SOIL3C_vr', hist_fincl1 += 'LEAFC_TO_LITTER', 'FROOTC_TO_LITTER','LITR1C_TO_SOIL1C','LITR1N_TO_SOIL1N','LITR2C_TO_SOIL1C', 'LITR2N_TO_SOIL1N','LITR3C_TO_SOIL2C','LITR3N_TO_SOIL2N','DWT_WOOD_PRODUCTC_GAIN_PATCH' ! h1 stream (monthly average, finest sub-grid) -hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TOTVEGC', 'NPP_NUPTAKE', 'Vcmx25Z', 'AR', 'HR', 'HTOP' +hist_fincl2 += 'GPP', 'NPP', 'AGNPP', 'TOTVEGC', 'NPP_NUPTAKE', 'AR', 'HR', 'HTOP' ! h2 stream (monthly average, landunit-level) ! TOT_WOODPRODC:I, CROPPROD1C:I, and NEE are not available at the landunit level From c9dc073d06bd49864834f91f267e49fbac47671d Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Tue, 23 Oct 2018 15:12:08 -0600 Subject: [PATCH 22/46] Remove setting of CCSM_BGC=CO2A in the cmip6 testmods This was in place in order to match what was being done before, but Erik, Keith and I can't see why this is set in the cmip6 mods. --- .../testmods_dirs/clm/cmip6_deck_highfreq/shell_commands | 3 --- 1 file changed, 3 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands index 1d678a9c7d..070b7ba1a8 100644 --- a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands @@ -1,6 +1,3 @@ #!/bin/bash ./xmlchange BFBFLAG="TRUE" - -# FIXME(wjs, 2018-10-23) This is temporary to match what was being run before; it should be removed -./xmlchange CCSM_BGC=CO2A From f835ef3231d86947248058791c90e8911f1bd811 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Tue, 23 Oct 2018 17:03:36 -0600 Subject: [PATCH 23/46] Reorganize usermods directories (1) Move usermods to an _includes subdirectory if they are not meant to be used directly (2) Split cmip6_glaciers into two pieces, since cmip6_waccm_deck (not yet created) will only use cmip6_glaciers_cplhist (3) Remove cmip6_deck_highfreq: I couldn't see how this would actually be used in practice, so I don't think it's worth maintaining this. Along with this removal, I have changed the cmip6 testmod to use cmip6_deck rather than cmip6_deck_highfreq. --- cime_config/testdefs/testlist_clm.xml | 4 ++-- .../testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods | 1 + .../clm/{cmip6_deck_highfreq => cmip6_deck}/shell_commands | 0 .../testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods | 1 - cime_config/usermods_dirs/_includes/README | 2 ++ .../cmip6_glaciers_cplhist}/user_nl_cpl | 0 .../cmip6_glaciers_virtual_antarctica}/user_nl_clm | 2 +- cime_config/usermods_dirs/{ => _includes}/output_base/README | 0 .../usermods_dirs/{ => _includes}/output_base/user_nl_clm | 0 .../usermods_dirs/{ => _includes}/output_base_highfreq/README | 0 .../{ => _includes}/output_base_highfreq/include_user_mods | 0 .../{ => _includes}/output_base_highfreq/user_nl_clm | 0 cime_config/usermods_dirs/cmip6_deck/include_user_mods | 3 ++- .../usermods_dirs/cmip6_deck_highfreq/include_user_mods | 2 -- cime_config/usermods_dirs/output_bgc/include_user_mods | 2 +- .../usermods_dirs/output_bgc_highfreq/include_user_mods | 2 +- cime_config/usermods_dirs/output_crop/user_nl_clm | 1 + cime_config/usermods_dirs/output_sp/include_user_mods | 2 +- .../usermods_dirs/output_sp_highfreq/include_user_mods | 2 +- 19 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods rename cime_config/testdefs/testmods_dirs/clm/{cmip6_deck_highfreq => cmip6_deck}/shell_commands (100%) delete mode 100644 cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods create mode 100644 cime_config/usermods_dirs/_includes/README rename cime_config/usermods_dirs/{cmip6_glaciers => _includes/cmip6_glaciers_cplhist}/user_nl_cpl (100%) rename cime_config/usermods_dirs/{cmip6_glaciers => _includes/cmip6_glaciers_virtual_antarctica}/user_nl_clm (90%) rename cime_config/usermods_dirs/{ => _includes}/output_base/README (100%) rename cime_config/usermods_dirs/{ => _includes}/output_base/user_nl_clm (100%) rename cime_config/usermods_dirs/{ => _includes}/output_base_highfreq/README (100%) rename cime_config/usermods_dirs/{ => _includes}/output_base_highfreq/include_user_mods (100%) rename cime_config/usermods_dirs/{ => _includes}/output_base_highfreq/user_nl_clm (100%) delete mode 100644 cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 237205d1b3..6f11cfc188 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -984,7 +984,7 @@ - + @@ -1492,7 +1492,7 @@ - + diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods new file mode 100644 index 0000000000..45859d47f6 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods @@ -0,0 +1 @@ +../../../../usermods_dirs/cmip6_deck diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/shell_commands similarity index 100% rename from cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/shell_commands rename to cime_config/testdefs/testmods_dirs/clm/cmip6_deck/shell_commands diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods deleted file mode 100644 index 136c5c1df1..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck_highfreq/include_user_mods +++ /dev/null @@ -1 +0,0 @@ -../../../../usermods_dirs/cmip6_deck_highfreq diff --git a/cime_config/usermods_dirs/_includes/README b/cime_config/usermods_dirs/_includes/README new file mode 100644 index 0000000000..44484d36bc --- /dev/null +++ b/cime_config/usermods_dirs/_includes/README @@ -0,0 +1,2 @@ +This directory contains usermods directories that are meant to be +included in other usermods directories, not used directly diff --git a/cime_config/usermods_dirs/cmip6_glaciers/user_nl_cpl b/cime_config/usermods_dirs/_includes/cmip6_glaciers_cplhist/user_nl_cpl similarity index 100% rename from cime_config/usermods_dirs/cmip6_glaciers/user_nl_cpl rename to cime_config/usermods_dirs/_includes/cmip6_glaciers_cplhist/user_nl_cpl diff --git a/cime_config/usermods_dirs/cmip6_glaciers/user_nl_clm b/cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm similarity index 90% rename from cime_config/usermods_dirs/cmip6_glaciers/user_nl_clm rename to cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm index fdc1cdb732..3486d7abfb 100644 --- a/cime_config/usermods_dirs/cmip6_glaciers/user_nl_clm +++ b/cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm @@ -1,5 +1,5 @@ !---------------------------------------------------------------------------------- -! Settings from cmip6_glaciers +! Settings from cmip6_glaciers_virtual_antarctica !---------------------------------------------------------------------------------- ! This differs from the default in that it turns on virtual columns over Antarctica diff --git a/cime_config/usermods_dirs/output_base/README b/cime_config/usermods_dirs/_includes/output_base/README similarity index 100% rename from cime_config/usermods_dirs/output_base/README rename to cime_config/usermods_dirs/_includes/output_base/README diff --git a/cime_config/usermods_dirs/output_base/user_nl_clm b/cime_config/usermods_dirs/_includes/output_base/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_base/user_nl_clm rename to cime_config/usermods_dirs/_includes/output_base/user_nl_clm diff --git a/cime_config/usermods_dirs/output_base_highfreq/README b/cime_config/usermods_dirs/_includes/output_base_highfreq/README similarity index 100% rename from cime_config/usermods_dirs/output_base_highfreq/README rename to cime_config/usermods_dirs/_includes/output_base_highfreq/README diff --git a/cime_config/usermods_dirs/output_base_highfreq/include_user_mods b/cime_config/usermods_dirs/_includes/output_base_highfreq/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_base_highfreq/include_user_mods rename to cime_config/usermods_dirs/_includes/output_base_highfreq/include_user_mods diff --git a/cime_config/usermods_dirs/output_base_highfreq/user_nl_clm b/cime_config/usermods_dirs/_includes/output_base_highfreq/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_base_highfreq/user_nl_clm rename to cime_config/usermods_dirs/_includes/output_base_highfreq/user_nl_clm diff --git a/cime_config/usermods_dirs/cmip6_deck/include_user_mods b/cime_config/usermods_dirs/cmip6_deck/include_user_mods index 6d1c3aaf05..1e912156d6 100644 --- a/cime_config/usermods_dirs/cmip6_deck/include_user_mods +++ b/cime_config/usermods_dirs/cmip6_deck/include_user_mods @@ -1,2 +1,3 @@ -../cmip6_glaciers +../_includes/cmip6_glaciers_cplhist +../_includes/cmip6_glaciers_virtual_antarctica ../output_crop diff --git a/cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods b/cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods deleted file mode 100644 index 95a25001e0..0000000000 --- a/cime_config/usermods_dirs/cmip6_deck_highfreq/include_user_mods +++ /dev/null @@ -1,2 +0,0 @@ -../cmip6_glaciers -../output_crop_highfreq diff --git a/cime_config/usermods_dirs/output_bgc/include_user_mods b/cime_config/usermods_dirs/output_bgc/include_user_mods index bee18982f6..f274805316 100644 --- a/cime_config/usermods_dirs/output_bgc/include_user_mods +++ b/cime_config/usermods_dirs/output_bgc/include_user_mods @@ -1 +1 @@ -../output_base +../_includes/output_base diff --git a/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods b/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods index 3d7b23c7ad..206b1ad95e 100644 --- a/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods +++ b/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods @@ -1,2 +1,2 @@ ../output_bgc -../output_base_highfreq +../_includes/output_base_highfreq diff --git a/cime_config/usermods_dirs/output_crop/user_nl_clm b/cime_config/usermods_dirs/output_crop/user_nl_clm index 26cf990d5f..638fea8815 100644 --- a/cime_config/usermods_dirs/output_crop/user_nl_clm +++ b/cime_config/usermods_dirs/output_crop/user_nl_clm @@ -13,3 +13,4 @@ hist_fincl3 += 'GRAINC_TO_FOOD' ! h3 stream (yearly average, gridcell-level) hist_fincl4 += 'PCT_CFT','CROPPROD1C:I' + diff --git a/cime_config/usermods_dirs/output_sp/include_user_mods b/cime_config/usermods_dirs/output_sp/include_user_mods index bee18982f6..f274805316 100644 --- a/cime_config/usermods_dirs/output_sp/include_user_mods +++ b/cime_config/usermods_dirs/output_sp/include_user_mods @@ -1 +1 @@ -../output_base +../_includes/output_base diff --git a/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods b/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods index 4a3a211b15..0915682e36 100644 --- a/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods +++ b/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods @@ -1,2 +1,2 @@ ../output_sp -../output_base_highfreq +../_includes/output_base_highfreq From 38493adf0ec2516a5821deb17141414067f4357f Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 23 Oct 2018 17:26:56 -0600 Subject: [PATCH 24/46] Add C13_NBP and C14_NBP diagnostic fields --- src/biogeochem/CNVegCarbonFluxType.F90 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/biogeochem/CNVegCarbonFluxType.F90 b/src/biogeochem/CNVegCarbonFluxType.F90 index 2ec35353f0..3af1e71429 100644 --- a/src/biogeochem/CNVegCarbonFluxType.F90 +++ b/src/biogeochem/CNVegCarbonFluxType.F90 @@ -3125,6 +3125,13 @@ subroutine InitHistory(this, bounds, carbon_type) avgflag='A', long_name='C13 net ecosystem exchange of carbon, includes fire flux, positive for source', & ptr_gcell=this%nee_grc) + this%nbp_grc(begg:endg) = spval + call hist_addfld1d (fname='C13_NBP', units='gC13/m^2/s', & + avgflag='A', long_name='C13 net biome production, includes fire, landuse,'& + //' harvest and hrv_xsmrpool flux (latter smoothed over the year), positive for sink'& + //' (same as net carbon exchange between land and atmosphere)', & + ptr_gcell=this%nbp_grc) + endif !------------------------------- @@ -3274,6 +3281,13 @@ subroutine InitHistory(this, bounds, carbon_type) avgflag='A', long_name='C14 net ecosystem exchange of carbon, includes fire flux, positive for source', & ptr_gcell=this%nee_grc) + this%nbp_grc(begg:endg) = spval + call hist_addfld1d (fname='C14_NBP', units='gC13/m^2/s', & + avgflag='A', long_name='C14 net biome production, includes fire, landuse,'& + //' harvest and hrv_xsmrpool flux (latter smoothed over the year), positive for sink'& + //' (same as net carbon exchange between land and atmosphere)', & + ptr_gcell=this%nbp_grc) + endif end subroutine InitHistory From 0bf3aea7690c8d3eae9e2050f44a3a5a94844339 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Wed, 24 Oct 2018 10:59:21 -0600 Subject: [PATCH 25/46] Make a bunch of C isotope fields inactive by default Per comments in https://github.com/ESCOMP/ctsm/pull/527 --- src/biogeochem/CNProductsMod.F90 | 19 ++++-- src/biogeochem/CNVegCarbonFluxType.F90 | 68 +++++++++---------- src/biogeochem/CNVegCarbonStateType.F90 | 62 ++++++++--------- src/biogeochem/SpeciesBaseType.F90 | 11 +++ src/biogeochem/SpeciesIsotopeType.F90 | 11 +++ src/biogeochem/SpeciesNonIsotopeType.F90 | 11 +++ src/biogeophys/PhotosynthesisMod.F90 | 14 ++-- .../SoilBiogeochemCarbonFluxType.F90 | 8 +-- .../SoilBiogeochemCarbonStateType.F90 | 12 ++-- 9 files changed, 128 insertions(+), 88 deletions(-) diff --git a/src/biogeochem/CNProductsMod.F90 b/src/biogeochem/CNProductsMod.F90 index 59891ba330..ed2c67d56b 100644 --- a/src/biogeochem/CNProductsMod.F90 +++ b/src/biogeochem/CNProductsMod.F90 @@ -162,6 +162,7 @@ subroutine InitHistory(this, bounds) ! ! !LOCAL VARIABLES: integer :: begg,endg + character(len=:), allocatable :: active_if_non_isotope character(len=*), parameter :: subname = 'InitHistory' !----------------------------------------------------------------------- @@ -169,13 +170,19 @@ subroutine InitHistory(this, bounds) begg = bounds%begg endg = bounds%endg + if (this%species%is_isotope()) then + active_if_non_isotope = 'inactive' + else + active_if_non_isotope = 'active' + end if + this%cropprod1_grc(begg:endg) = spval call hist_addfld1d( & fname = this%species%hist_fname('CROPPROD1'), & units = 'g' // this%species%get_species() // '/m^2', & avgflag = 'A', & long_name = '1-yr grain product ' // this%species%get_species(), & - ptr_gcell = this%cropprod1_grc) + ptr_gcell = this%cropprod1_grc, default=active_if_non_isotope) this%prod10_grc(begg:endg) = spval call hist_addfld1d( & @@ -199,7 +206,7 @@ subroutine InitHistory(this, bounds) units = 'g' // this%species%get_species() // '/m^2', & avgflag = 'A', & long_name = 'total wood product ' // this%species%get_species(), & - ptr_gcell = this%tot_woodprod_grc) + ptr_gcell = this%tot_woodprod_grc, default=active_if_non_isotope) this%dwt_prod10_gain_grc(begg:endg) = spval call hist_addfld1d( & @@ -223,7 +230,7 @@ subroutine InitHistory(this, bounds) units = 'g' // this%species%get_species() // '/m^2/s', & avgflag = 'A', & long_name = 'landcover change-driven addition to wood product pools', & - ptr_gcell = this%dwt_woodprod_gain_grc) + ptr_gcell = this%dwt_woodprod_gain_grc, default=active_if_non_isotope) this%dwt_cropprod1_gain_grc(begg:endg) = spval call hist_addfld1d( & @@ -231,7 +238,7 @@ subroutine InitHistory(this, bounds) units = 'g' // this%species%get_species() // '/m^2/s', & avgflag = 'A', & long_name = 'landcover change-driven addition to 1-year crop product pool', & - ptr_gcell = this%dwt_cropprod1_gain_grc) + ptr_gcell = this%dwt_cropprod1_gain_grc, default=active_if_non_isotope) this%cropprod1_loss_grc(begg:endg) = spval call hist_addfld1d( & @@ -239,7 +246,7 @@ subroutine InitHistory(this, bounds) units = 'g' // this%species%get_species() // '/m^2/s', & avgflag = 'A', & long_name = 'loss from 1-yr grain product pool', & - ptr_gcell = this%cropprod1_loss_grc) + ptr_gcell = this%cropprod1_loss_grc, default=active_if_non_isotope) this%prod10_loss_grc(begg:endg) = spval call hist_addfld1d( & @@ -263,7 +270,7 @@ subroutine InitHistory(this, bounds) units = 'g' // this%species%get_species() // '/m^2/s', & avgflag = 'A', & long_name = 'total loss from wood product pools', & - ptr_gcell = this%tot_woodprod_loss_grc) + ptr_gcell = this%tot_woodprod_loss_grc, default=active_if_non_isotope) end subroutine InitHistory diff --git a/src/biogeochem/CNVegCarbonFluxType.F90 b/src/biogeochem/CNVegCarbonFluxType.F90 index 3af1e71429..079813d2a3 100644 --- a/src/biogeochem/CNVegCarbonFluxType.F90 +++ b/src/biogeochem/CNVegCarbonFluxType.F90 @@ -1695,17 +1695,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%rr_patch(begp:endp) = spval call hist_addfld1d (fname='C13_RR', units='gC13/m^2/s', & avgflag='A', long_name='C13 root respiration (fine root MR + total root GR)', & - ptr_patch=this%rr_patch) + ptr_patch=this%rr_patch, default='inactive') this%mr_patch(begp:endp) = spval call hist_addfld1d (fname='C13_MR', units='gC13/m^2/s', & avgflag='A', long_name='C13 maintenance respiration', & - ptr_patch=this%mr_patch) + ptr_patch=this%mr_patch, default='inactive') this%gr_patch(begp:endp) = spval call hist_addfld1d (fname='C13_GR', units='gC13/m^2/s', & avgflag='A', long_name='C13 total growth respiration', & - ptr_patch=this%gr_patch) + ptr_patch=this%gr_patch, default='inactive') this%ar_patch(begp:endp) = spval call hist_addfld1d (fname='C13_AR', units='gC13/m^2/s', & @@ -1715,17 +1715,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%npp_patch(begp:endp) = spval call hist_addfld1d (fname='C13_NPP', units='gC13/m^2/s', & avgflag='A', long_name='C13 net primary production', & - ptr_patch=this%npp_patch) + ptr_patch=this%npp_patch, default='inactive') this%agnpp_patch(begp:endp) = spval call hist_addfld1d (fname='C13_AGNPP', units='gC13/m^2/s', & avgflag='A', long_name='C13 aboveground NPP', & - ptr_patch=this%agnpp_patch) + ptr_patch=this%agnpp_patch, default='inactive') this%bgnpp_patch(begp:endp) = spval call hist_addfld1d (fname='C13_BGNPP', units='gC13/m^2/s', & avgflag='A', long_name='C13 belowground NPP', & - ptr_patch=this%bgnpp_patch) + ptr_patch=this%bgnpp_patch, default='inactive') this%litfall_patch(begp:endp) = spval call hist_addfld1d (fname='C13_LITFALL', units='gC13/m^2/s', & @@ -1735,7 +1735,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%fire_closs_patch(begp:endp) = spval call hist_addfld1d (fname='C13_PFT_FIRE_CLOSS', units='gC13/m^2/s', & avgflag='A', long_name='C13 total patch-level fire C loss', & - ptr_patch=this%fire_closs_patch) + ptr_patch=this%fire_closs_patch, default='inactive') this%m_leafc_to_litter_patch(begp:endp) = spval call hist_addfld1d (fname='C13_M_LEAFC_TO_LITTER', units='gC13/m^2/s', & @@ -2010,12 +2010,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%psnsun_to_cpool_patch(begp:endp) = spval call hist_addfld1d (fname='C13_PSNSUN_TO_CPOOL', units='gC13/m^2/s', & avgflag='A', long_name='C13 C fixation from sunlit canopy', & - ptr_patch=this%psnsun_to_cpool_patch) + ptr_patch=this%psnsun_to_cpool_patch, default='inactive') this%psnshade_to_cpool_patch(begp:endp) = spval call hist_addfld1d (fname='C13_PSNSHADE_TO_CPOOL', units='gC13/m^2/s', & avgflag='A', long_name='C13 C fixation from shaded canopy', & - ptr_patch=this%psnshade_to_cpool_patch) + ptr_patch=this%psnshade_to_cpool_patch, default='inactive') this%cpool_to_leafc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_CPOOL_TO_LEAFC', units='gC13/m^2/s', & @@ -2518,12 +2518,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%psnsun_to_cpool_patch(begp:endp) = spval call hist_addfld1d (fname='C14_PSNSUN_TO_CPOOL', units='gC14/m^2/s', & avgflag='A', long_name='C14 C fixation from sunlit canopy', & - ptr_patch=this%psnsun_to_cpool_patch) + ptr_patch=this%psnsun_to_cpool_patch, default='inactive') this%psnshade_to_cpool_patch(begp:endp) = spval call hist_addfld1d (fname='C14_PSNSHADE_TO_CPOOL', units='gC14/m^2/s', & avgflag='A', long_name='C14 C fixation from shaded canopy', & - ptr_patch=this%psnshade_to_cpool_patch) + ptr_patch=this%psnshade_to_cpool_patch, default='inactive') this%cpool_to_leafc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_CPOOL_TO_LEAFC', units='gC14/m^2/s', & @@ -2748,17 +2748,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%rr_patch(begp:endp) = spval call hist_addfld1d (fname='C14_RR', units='gC14/m^2/s', & avgflag='A', long_name='C14 root respiration (fine root MR + total root GR)', & - ptr_patch=this%rr_patch) + ptr_patch=this%rr_patch, default='inactive') this%mr_patch(begp:endp) = spval call hist_addfld1d (fname='C14_MR', units='gC14/m^2/s', & avgflag='A', long_name='C14 maintenance respiration', & - ptr_patch=this%mr_patch) + ptr_patch=this%mr_patch, default='inactive') this%gr_patch(begp:endp) = spval call hist_addfld1d (fname='C14_GR', units='gC14/m^2/s', & avgflag='A', long_name='C14 total growth respiration', & - ptr_patch=this%gr_patch) + ptr_patch=this%gr_patch, default='inactive') this%ar_patch(begp:endp) = spval call hist_addfld1d (fname='C14_AR', units='gC14/m^2/s', & @@ -2768,17 +2768,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%npp_patch(begp:endp) = spval call hist_addfld1d (fname='C14_NPP', units='gC14/m^2/s', & avgflag='A', long_name='C14 net primary production', & - ptr_patch=this%npp_patch) + ptr_patch=this%npp_patch, default='inactive') this%agnpp_patch(begp:endp) = spval call hist_addfld1d (fname='C14_AGNPP', units='gC14/m^2/s', & avgflag='A', long_name='C14 aboveground NPP', & - ptr_patch=this%agnpp_patch) + ptr_patch=this%agnpp_patch, default='inactive') this%bgnpp_patch(begp:endp) = spval call hist_addfld1d (fname='C14_BGNPP', units='gC14/m^2/s', & avgflag='A', long_name='C14 belowground NPP', & - ptr_patch=this%bgnpp_patch) + ptr_patch=this%bgnpp_patch, default='inactive') this%litfall_patch(begp:endp) = spval call hist_addfld1d (fname='C14_LITFALL', units='gC14/m^2/s', & @@ -2788,7 +2788,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%fire_closs_patch(begp:endp) = spval call hist_addfld1d (fname='C14_PFT_FIRE_CLOSS', units='gC14/m^2/s', & avgflag='A', long_name='C14 total patch-level fire C loss', & - ptr_patch=this%fire_closs_patch) + ptr_patch=this%fire_closs_patch, default='inactive') endif !------------------------------- @@ -3034,7 +3034,7 @@ subroutine InitHistory(this, bounds, carbon_type) call hist_addfld1d (fname='C13_DWT_CONV_CFLUX', units='gC13/m^2/s', & avgflag='A', long_name='C13 conversion C flux (immediate loss to atm) ' // & '(0 at all times except first timestep of year)', & - ptr_gcell=this%dwt_conv_cflux_grc) + ptr_gcell=this%dwt_conv_cflux_grc, default='inactive') this%dwt_conv_cflux_patch(begp:endp) = spval call hist_addfld1d (fname='C13_DWT_CONV_CFLUX_PATCH', units='gC13/m^2/s', & @@ -3048,12 +3048,12 @@ subroutine InitHistory(this, bounds, carbon_type) call hist_addfld1d (fname='C13_DWT_CONV_CFLUX_DRIBBLED', units='gC13/m^2/s', & avgflag='A', & long_name='C13 conversion C flux (immediate loss to atm), dribbled throughout the year', & - ptr_gcell=this%dwt_conv_cflux_dribbled_grc) + ptr_gcell=this%dwt_conv_cflux_dribbled_grc, default='inactive') this%dwt_slash_cflux_col(begc:endc) = spval call hist_addfld1d (fname='C13_DWT_SLASH_CFLUX', units='gC/m^2/s', & avgflag='A', long_name='C13 slash C flux to litter and CWD due to land use', & - ptr_col=this%dwt_slash_cflux_col) + ptr_col=this%dwt_slash_cflux_col, default='inactive') this%dwt_frootc_to_litr_met_c_col(begc:endc,:) = spval call hist_addfld_decomp (fname='C13_DWT_FROOTC_TO_LITR_MET_C', units='gC13/m^2/s', type2d='levdcmp', & @@ -3088,12 +3088,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%sr_col(begc:endc) = spval call hist_addfld1d (fname='C13_SR', units='gC13/m^2/s', & avgflag='A', long_name='C13 total soil respiration (HR + root resp)', & - ptr_col=this%sr_col) + ptr_col=this%sr_col, default='inactive') this%er_col(begc:endc) = spval call hist_addfld1d (fname='C13_ER', units='gC13/m^2/s', & avgflag='A', long_name='C13 total ecosystem respiration, autotrophic + heterotrophic', & - ptr_col=this%er_col) + ptr_col=this%er_col, default='inactive') this%litfire_col(begc:endc) = spval call hist_addfld1d (fname='C13_LITFIRE', units='gC13/m^2/s', & @@ -3113,17 +3113,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%fire_closs_col(begc:endc) = spval call hist_addfld1d (fname='C13_COL_FIRE_CLOSS', units='gC13/m^2/s', & avgflag='A', long_name='C13 total column-level fire C loss', & - ptr_col=this%fire_closs_col) + ptr_col=this%fire_closs_col, default='inactive') this%nep_col(begc:endc) = spval call hist_addfld1d (fname='C13_NEP', units='gC13/m^2/s', & avgflag='A', long_name='C13 net ecosystem production, excludes fire flux, positive for sink', & - ptr_col=this%nep_col) + ptr_col=this%nep_col, default='inactive') this%nee_grc(begg:endg) = spval call hist_addfld1d (fname='C13_NEE', units='gC13/m^2/s', & avgflag='A', long_name='C13 net ecosystem exchange of carbon, includes fire flux, positive for source', & - ptr_gcell=this%nee_grc) + ptr_gcell=this%nee_grc, default='inactive') this%nbp_grc(begg:endg) = spval call hist_addfld1d (fname='C13_NBP', units='gC13/m^2/s', & @@ -3190,7 +3190,7 @@ subroutine InitHistory(this, bounds, carbon_type) call hist_addfld1d (fname='C14_DWT_CONV_CFLUX', units='gC14/m^2/s', & avgflag='A', long_name='C14 conversion C flux (immediate loss to atm) ' // & '(0 at all times except first timestep of year)', & - ptr_gcell=this%dwt_conv_cflux_grc) + ptr_gcell=this%dwt_conv_cflux_grc, default='inactive') this%dwt_conv_cflux_patch(begp:endp) = spval call hist_addfld1d (fname='C14_DWT_CONV_CFLUX_PATCH', units='gC14/m^2/s', & @@ -3204,12 +3204,12 @@ subroutine InitHistory(this, bounds, carbon_type) call hist_addfld1d (fname='C14_DWT_CONV_CFLUX_DRIBBLED', units='gC14/m^2/s', & avgflag='A', & long_name='C14 conversion C flux (immediate loss to atm), dribbled throughout the year', & - ptr_gcell=this%dwt_conv_cflux_dribbled_grc) + ptr_gcell=this%dwt_conv_cflux_dribbled_grc, default='inactive') this%dwt_slash_cflux_col(begc:endc) = spval call hist_addfld1d (fname='C14_DWT_SLASH_CFLUX', units='gC/m^2/s', & avgflag='A', long_name='C14 slash C flux to litter and CWD due to land use', & - ptr_col=this%dwt_slash_cflux_col) + ptr_col=this%dwt_slash_cflux_col, default='inactive') this%dwt_frootc_to_litr_met_c_col(begc:endc,:) = spval call hist_addfld_decomp (fname='C14_DWT_FROOTC_TO_LITR_MET_C', units='gC14/m^2/s', type2d='levdcmp', & @@ -3244,12 +3244,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%sr_col(begc:endc) = spval call hist_addfld1d (fname='C14_SR', units='gC14/m^2/s', & avgflag='A', long_name='C14 total soil respiration (HR + root resp)', & - ptr_col=this%sr_col) + ptr_col=this%sr_col, default='inactive') this%er_col(begc:endc) = spval call hist_addfld1d (fname='C14_ER', units='gC14/m^2/s', & avgflag='A', long_name='C14 total ecosystem respiration, autotrophic + heterotrophic', & - ptr_col=this%er_col) + ptr_col=this%er_col, default='inactive') this%litfire_col(begc:endc) = spval call hist_addfld1d (fname='C14_LITFIRE', units='gC14/m^2/s', & @@ -3269,17 +3269,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%fire_closs_col(begc:endc) = spval call hist_addfld1d (fname='C14_COL_FIRE_CLOSS', units='gC14/m^2/s', & avgflag='A', long_name='C14 total column-level fire C loss', & - ptr_col=this%fire_closs_col) + ptr_col=this%fire_closs_col, default='inactive') this%nep_col(begc:endc) = spval call hist_addfld1d (fname='C14_NEP', units='gC14/m^2/s', & avgflag='A', long_name='C14 net ecosystem production, excludes fire flux, positive for sink', & - ptr_col=this%nep_col) + ptr_col=this%nep_col, default='inactive') this%nee_grc(begg:endg) = spval call hist_addfld1d (fname='C14_NEE', units='gC14/m^2/s', & avgflag='A', long_name='C14 net ecosystem exchange of carbon, includes fire flux, positive for source', & - ptr_gcell=this%nee_grc) + ptr_gcell=this%nee_grc, default='inactive') this%nbp_grc(begg:endg) = spval call hist_addfld1d (fname='C14_NBP', units='gC13/m^2/s', & diff --git a/src/biogeochem/CNVegCarbonStateType.F90 b/src/biogeochem/CNVegCarbonStateType.F90 index 41eb79134f..a6dd0dfd96 100644 --- a/src/biogeochem/CNVegCarbonStateType.F90 +++ b/src/biogeochem/CNVegCarbonStateType.F90 @@ -495,7 +495,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%leafc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_LEAFC', units='gC13/m^2', & avgflag='A', long_name='C13 leaf C', & - ptr_patch=this%leafc_patch) + ptr_patch=this%leafc_patch, default='inactive') this%leafc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C13_LEAFC_STORAGE', units='gC13/m^2', & @@ -515,7 +515,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%frootc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_FROOTC', units='gC13/m^2', & avgflag='A', long_name='C13 fine root C', & - ptr_patch=this%frootc_patch) + ptr_patch=this%frootc_patch, default='inactive') this%frootc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C13_FROOTC_STORAGE', units='gC13/m^2', & @@ -530,7 +530,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%livestemc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_LIVESTEMC', units='gC13/m^2', & avgflag='A', long_name='C13 live stem C', & - ptr_patch=this%livestemc_patch) + ptr_patch=this%livestemc_patch, default='inactive') this%livestemc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C13_LIVESTEMC_STORAGE', units='gC13/m^2', & @@ -545,7 +545,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%deadstemc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_DEADSTEMC', units='gC13/m^2', & avgflag='A', long_name='C13 dead stem C', & - ptr_patch=this%deadstemc_patch) + ptr_patch=this%deadstemc_patch, default='inactive') this%deadstemc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C13_DEADSTEMC_STORAGE', units='gC13/m^2', & @@ -560,7 +560,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%livecrootc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_LIVECROOTC', units='gC13/m^2', & avgflag='A', long_name='C13 live coarse root C', & - ptr_patch=this%livecrootc_patch) + ptr_patch=this%livecrootc_patch, default='inactive') this%livecrootc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C13_LIVECROOTC_STORAGE', units='gC13/m^2', & @@ -575,7 +575,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%deadcrootc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_DEADCROOTC', units='gC13/m^2', & avgflag='A', long_name='C13 dead coarse root C', & - ptr_patch=this%deadcrootc_patch) + ptr_patch=this%deadcrootc_patch, default='inactive') this%deadcrootc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C13_DEADCROOTC_STORAGE', units='gC13/m^2', & @@ -600,12 +600,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%cpool_patch(begp:endp) = spval call hist_addfld1d (fname='C13_CPOOL', units='gC13/m^2', & avgflag='A', long_name='C13 temporary photosynthate C pool', & - ptr_patch=this%cpool_patch) + ptr_patch=this%cpool_patch, default='inactive') this%xsmrpool_patch(begp:endp) = spval call hist_addfld1d (fname='C13_XSMRPOOL', units='gC13/m^2', & avgflag='A', long_name='C13 temporary photosynthate C pool', & - ptr_patch=this%xsmrpool_patch) + ptr_patch=this%xsmrpool_patch, default='inactive') this%ctrunc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_PFT_CTRUNC', units='gC13/m^2', & @@ -615,12 +615,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%dispvegc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_DISPVEGC', units='gC13/m^2', & avgflag='A', long_name='C13 displayed veg carbon, excluding storage and cpool', & - ptr_patch=this%dispvegc_patch) + ptr_patch=this%dispvegc_patch, default='inactive') this%storvegc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_STORVEGC', units='gC13/m^2', & avgflag='A', long_name='C13 stored vegetation carbon, excluding cpool', & - ptr_patch=this%storvegc_patch) + ptr_patch=this%storvegc_patch, default='inactive') this%totvegc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_TOTVEGC', units='gC13/m^2', & @@ -630,17 +630,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%totc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_TOTPFTC', units='gC13/m^2', & avgflag='A', long_name='C13 total patch-level carbon, including cpool', & - ptr_patch=this%totc_patch) + ptr_patch=this%totc_patch, default='inactive') this%seedc_grc(begg:endg) = spval call hist_addfld1d (fname='C13_SEEDC', units='gC13/m^2', & avgflag='A', long_name='C13 pool for seeding new PFTs via dynamic landcover', & - ptr_gcell=this%seedc_grc) + ptr_gcell=this%seedc_grc, default='inactive') this%totc_col(begc:endc) = spval call hist_addfld1d (fname='C13_TOTCOLC', units='gC13/m^2', & avgflag='A', long_name='C13 total column carbon, incl veg and cpool but excl product pools', & - ptr_col=this%totc_col) + ptr_col=this%totc_col, default='inactive') this%totecosysc_col(begc:endc) = spval call hist_addfld1d (fname='C13_TOTECOSYSC', units='gC13/m^2', & @@ -651,11 +651,11 @@ subroutine InitHistory(this, bounds, carbon_type) this%grainc_patch(begp:endp) = spval call hist_addfld1d (fname='C13_GRAINC', units='gC/m^2', & avgflag='A', long_name='C13 grain C (does not equal yield)', & - ptr_patch=this%grainc_patch) + ptr_patch=this%grainc_patch, default='inactive') this%cropseedc_deficit_patch(begp:endp) = spval call hist_addfld1d (fname='C13_CROPSEEDC_DEFICIT', units='gC/m^2', & avgflag='A', long_name='C13 C used for crop seed that needs to be repaid', & - ptr_patch=this%cropseedc_deficit_patch) + ptr_patch=this%cropseedc_deficit_patch, default='inactive') end if @@ -670,7 +670,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%leafc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_LEAFC', units='gC14/m^2', & avgflag='A', long_name='C14 leaf C', & - ptr_patch=this%leafc_patch) + ptr_patch=this%leafc_patch, default='inactive') this%leafc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C14_LEAFC_STORAGE', units='gC14/m^2', & @@ -690,7 +690,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%frootc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_FROOTC', units='gC14/m^2', & avgflag='A', long_name='C14 fine root C', & - ptr_patch=this%frootc_patch) + ptr_patch=this%frootc_patch, default='inactive') this%frootc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C14_FROOTC_STORAGE', units='gC14/m^2', & @@ -705,7 +705,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%livestemc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_LIVESTEMC', units='gC14/m^2', & avgflag='A', long_name='C14 live stem C', & - ptr_patch=this%livestemc_patch) + ptr_patch=this%livestemc_patch, default='inactive') this%livestemc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C14_LIVESTEMC_STORAGE', units='gC14/m^2', & @@ -720,7 +720,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%deadstemc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_DEADSTEMC', units='gC14/m^2', & avgflag='A', long_name='C14 dead stem C', & - ptr_patch=this%deadstemc_patch) + ptr_patch=this%deadstemc_patch, default='inactive') this%deadstemc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C14_DEADSTEMC_STORAGE', units='gC14/m^2', & @@ -735,7 +735,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%livecrootc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_LIVECROOTC', units='gC14/m^2', & avgflag='A', long_name='C14 live coarse root C', & - ptr_patch=this%livecrootc_patch) + ptr_patch=this%livecrootc_patch, default='inactive') this%livecrootc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C14_LIVECROOTC_STORAGE', units='gC14/m^2', & @@ -750,7 +750,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%deadcrootc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_DEADCROOTC', units='gC14/m^2', & avgflag='A', long_name='C14 dead coarse root C', & - ptr_patch=this%deadcrootc_patch) + ptr_patch=this%deadcrootc_patch, default='inactive') this%deadcrootc_storage_patch(begp:endp) = spval call hist_addfld1d (fname='C14_DEADCROOTC_STORAGE', units='gC14/m^2', & @@ -775,27 +775,27 @@ subroutine InitHistory(this, bounds, carbon_type) this%cpool_patch(begp:endp) = spval call hist_addfld1d (fname='C14_CPOOL', units='gC14/m^2', & avgflag='A', long_name='C14 temporary photosynthate C pool', & - ptr_patch=this%cpool_patch) + ptr_patch=this%cpool_patch, default='inactive') this%xsmrpool_patch(begp:endp) = spval call hist_addfld1d (fname='C14_XSMRPOOL', units='gC14/m^2', & avgflag='A', long_name='C14 temporary photosynthate C pool', & - ptr_patch=this%xsmrpool_patch) + ptr_patch=this%xsmrpool_patch, default='inactive') this%ctrunc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_PFT_CTRUNC', units='gC14/m^2', & avgflag='A', long_name='C14 patch-level sink for C truncation', & - ptr_patch=this%ctrunc_patch) + ptr_patch=this%ctrunc_patch, default='inactive') this%dispvegc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_DISPVEGC', units='gC14/m^2', & avgflag='A', long_name='C14 displayed veg carbon, excluding storage and cpool', & - ptr_patch=this%dispvegc_patch) + ptr_patch=this%dispvegc_patch, default='inactive') this%storvegc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_STORVEGC', units='gC14/m^2', & avgflag='A', long_name='C14 stored vegetation carbon, excluding cpool', & - ptr_patch=this%storvegc_patch) + ptr_patch=this%storvegc_patch, default='inactive') this%totvegc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_TOTVEGC', units='gC14/m^2', & @@ -805,17 +805,17 @@ subroutine InitHistory(this, bounds, carbon_type) this%totc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_TOTPFTC', units='gC14/m^2', & avgflag='A', long_name='C14 total patch-level carbon, including cpool', & - ptr_patch=this%totc_patch) + ptr_patch=this%totc_patch, default='inactive') this%seedc_grc(begg:endg) = spval call hist_addfld1d (fname='C14_SEEDC', units='gC14/m^2', & avgflag='A', long_name='C14 pool for seeding new PFTs via dynamic landcover', & - ptr_gcell=this%seedc_grc) + ptr_gcell=this%seedc_grc, default='inactive') this%totc_col(begc:endc) = spval call hist_addfld1d (fname='C14_TOTCOLC', units='gC14/m^2', & avgflag='A', long_name='C14 total column carbon, incl veg and cpool but excl product pools', & - ptr_col=this%totc_col) + ptr_col=this%totc_col, default='inactive') this%totecosysc_col(begc:endc) = spval call hist_addfld1d (fname='C14_TOTECOSYSC', units='gC14/m^2', & @@ -826,11 +826,11 @@ subroutine InitHistory(this, bounds, carbon_type) this%grainc_patch(begp:endp) = spval call hist_addfld1d (fname='C14_GRAINC', units='gC/m^2', & avgflag='A', long_name='C14 grain C (does not equal yield)', & - ptr_patch=this%grainc_patch) + ptr_patch=this%grainc_patch, default='inactive') this%cropseedc_deficit_patch(begp:endp) = spval call hist_addfld1d (fname='C14_CROPSEEDC_DEFICIT', units='gC/m^2', & avgflag='A', long_name='C14 C used for crop seed that needs to be repaid', & - ptr_patch=this%cropseedc_deficit_patch) + ptr_patch=this%cropseedc_deficit_patch, default='inactive') end if diff --git a/src/biogeochem/SpeciesBaseType.F90 b/src/biogeochem/SpeciesBaseType.F90 index 239ca91fe3..02f8636557 100644 --- a/src/biogeochem/SpeciesBaseType.F90 +++ b/src/biogeochem/SpeciesBaseType.F90 @@ -22,6 +22,9 @@ module SpeciesBaseType ! Get the full species name procedure(get_species_interface), public, deferred :: get_species + + ! Return true if this is an isotope, false if not + procedure(is_isotope_interface), public, deferred :: is_isotope end type species_base_type abstract interface @@ -62,6 +65,14 @@ pure function get_species_interface(this) result(species_name) character(len=:), allocatable :: species_name class(species_base_type) , intent(in) :: this end function get_species_interface + + pure function is_isotope_interface(this) result(is_isotope) + ! Return true if this is an isotope, false if not + import :: species_base_type + + logical :: is_isotope ! function result + class(species_base_type), intent(in) :: this + end function is_isotope_interface end interface end module SpeciesBaseType diff --git a/src/biogeochem/SpeciesIsotopeType.F90 b/src/biogeochem/SpeciesIsotopeType.F90 index b5fb749823..8a9dcd94f5 100644 --- a/src/biogeochem/SpeciesIsotopeType.F90 +++ b/src/biogeochem/SpeciesIsotopeType.F90 @@ -39,6 +39,7 @@ module SpeciesIsotopeType procedure, public :: hist_fname procedure, public :: rest_fname procedure, public :: get_species + procedure, public :: is_isotope end type species_isotope_type interface species_isotope_type @@ -133,4 +134,14 @@ pure function get_species(this) result(species_name) end function get_species + pure function is_isotope(this) + ! Return true if this is an isotope, false if not + + logical :: is_isotope ! function result + class(species_isotope_type), intent(in) :: this + !----------------------------------------------------------------------- + + is_isotope = .true. + end function is_isotope + end module SpeciesIsotopeType diff --git a/src/biogeochem/SpeciesNonIsotopeType.F90 b/src/biogeochem/SpeciesNonIsotopeType.F90 index 0daf6b3f72..a1dc9d4e0e 100644 --- a/src/biogeochem/SpeciesNonIsotopeType.F90 +++ b/src/biogeochem/SpeciesNonIsotopeType.F90 @@ -37,6 +37,7 @@ module SpeciesNonIsotopeType procedure, public :: hist_fname procedure, public :: rest_fname procedure, public :: get_species + procedure, public :: is_isotope end type species_non_isotope_type interface species_non_isotope_type @@ -122,4 +123,14 @@ pure function get_species(this) result(species_name) end function get_species + pure function is_isotope(this) + ! Return true if this is an isotope, false if not + + logical :: is_isotope ! function result + class(species_non_isotope_type), intent(in) :: this + !----------------------------------------------------------------------- + + is_isotope = .false. + end function is_isotope + end module SpeciesNonIsotopeType diff --git a/src/biogeophys/PhotosynthesisMod.F90 b/src/biogeophys/PhotosynthesisMod.F90 index 3c6cef748d..b5f2a67810 100644 --- a/src/biogeophys/PhotosynthesisMod.F90 +++ b/src/biogeophys/PhotosynthesisMod.F90 @@ -405,41 +405,41 @@ subroutine InitHistory(this, bounds) this%c13_psnsun_patch(begp:endp) = spval call hist_addfld1d (fname='C13_PSNSUN', units='umolCO2/m^2/s', & avgflag='A', long_name='C13 sunlit leaf photosynthesis', & - ptr_patch=this%c13_psnsun_patch) + ptr_patch=this%c13_psnsun_patch, default='inactive') this%c13_psnsha_patch(begp:endp) = spval call hist_addfld1d (fname='C13_PSNSHA', units='umolCO2/m^2/s', & avgflag='A', long_name='C13 shaded leaf photosynthesis', & - ptr_patch=this%c13_psnsha_patch) + ptr_patch=this%c13_psnsha_patch, default='inactive') end if if ( use_c14 ) then this%c14_psnsun_patch(begp:endp) = spval call hist_addfld1d (fname='C14_PSNSUN', units='umolCO2/m^2/s', & avgflag='A', long_name='C14 sunlit leaf photosynthesis', & - ptr_patch=this%c14_psnsun_patch) + ptr_patch=this%c14_psnsun_patch, default='inactive') this%c14_psnsha_patch(begp:endp) = spval call hist_addfld1d (fname='C14_PSNSHA', units='umolCO2/m^2/s', & avgflag='A', long_name='C14 shaded leaf photosynthesis', & - ptr_patch=this%c14_psnsha_patch) + ptr_patch=this%c14_psnsha_patch, default='inactive') end if if ( use_c13 ) then this%rc13_canair_patch(begp:endp) = spval call hist_addfld1d (fname='RC13_CANAIR', units='proportion', & avgflag='A', long_name='C13/C(12+13) for canopy air', & - ptr_patch=this%rc13_canair_patch) + ptr_patch=this%rc13_canair_patch, default='inactive') this%rc13_psnsun_patch(begp:endp) = spval call hist_addfld1d (fname='RC13_PSNSUN', units='proportion', & avgflag='A', long_name='C13/C(12+13) for sunlit photosynthesis', & - ptr_patch=this%rc13_psnsun_patch) + ptr_patch=this%rc13_psnsun_patch, default='inactive') this%rc13_psnsha_patch(begp:endp) = spval call hist_addfld1d (fname='RC13_PSNSHA', units='proportion', & avgflag='A', long_name='C13/C(12+13) for shaded photosynthesis', & - ptr_patch=this%rc13_psnsha_patch) + ptr_patch=this%rc13_psnsha_patch, default='inactive') endif ! Canopy physiology diff --git a/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 b/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 index 5d169527c5..83a56eba3a 100644 --- a/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 @@ -203,7 +203,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%lithr_col(begc:endc) = spval call hist_addfld1d (fname='LITTERC_HR', units='gC/m^2/s', & avgflag='A', long_name='litter C heterotrophic respiration', & - ptr_col=this%lithr_col) + ptr_col=this%lithr_col, default='inactive') this%somhr_col(begc:endc) = spval call hist_addfld1d (fname='SOILC_HR', units='gC/m^2/s', & @@ -391,7 +391,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%somhr_col(begc:endc) = spval call hist_addfld1d (fname='C13_SOILC_HR', units='gC13/m^2/s', & avgflag='A', long_name='C13 soil organic matter heterotrophic respiration', & - ptr_col=this%somhr_col) + ptr_col=this%somhr_col, default='inactive') this%decomp_cascade_hr_col(begc:endc,:) = spval @@ -456,12 +456,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%lithr_col(begc:endc) = spval call hist_addfld1d (fname='C14_LITTERC_HR', units='gC14/m^2/s', & avgflag='A', long_name='C14 litter carbon heterotrophic respiration', & - ptr_col=this%lithr_col) + ptr_col=this%lithr_col, default='inactive') this%somhr_col(begc:endc) = spval call hist_addfld1d (fname='C14_SOILC_HR', units='gC14/m^2/s', & avgflag='A', long_name='C14 soil organic matter heterotrophic respiration', & - ptr_col=this%somhr_col) + ptr_col=this%somhr_col, default='inactive') this%decomp_cascade_hr_col(begc:endc,:) = spval this%decomp_cascade_hr_vr_col(begc:endc,:,:) = spval diff --git a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 index 78be5efd44..9b1f288f63 100644 --- a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 @@ -233,7 +233,7 @@ subroutine InitHistory(this, bounds, carbon_type) longname = 'C13 '//trim(decomp_cascade_con%decomp_pool_name_history(l))//' C' call hist_addfld1d (fname=fieldname, units='gC13/m^2', & avgflag='A', long_name=longname, & - ptr_col=data1dptr) + ptr_col=data1dptr, default='inactive') end do this%totlitc_col(begc:endc) = spval @@ -250,14 +250,14 @@ subroutine InitHistory(this, bounds, carbon_type) this%totlitc_1m_col(begc:endc) = spval call hist_addfld1d (fname='C13_TOTLITC_1m', units='gC13/m^2', & avgflag='A', long_name='C13 total litter carbon to 1 meter', & - ptr_col=this%totlitc_1m_col) + ptr_col=this%totlitc_1m_col, default='inactive') end if if ( nlevdecomp_full > 1 ) then this%totsomc_1m_col(begc:endc) = spval call hist_addfld1d (fname='C13_TOTSOMC_1m', units='gC13/m^2', & avgflag='A', long_name='C13 total soil organic matter carbon to 1 meter', & - ptr_col=this%totsomc_1m_col) + ptr_col=this%totsomc_1m_col, default='inactive') endif this%ctrunc_col(begc:endc) = spval @@ -293,7 +293,7 @@ subroutine InitHistory(this, bounds, carbon_type) fieldname = 'C14_'//trim(decomp_cascade_con%decomp_pool_name_history(l))//'C' longname = 'C14 '//trim(decomp_cascade_con%decomp_pool_name_history(l))//' C' call hist_addfld1d (fname=fieldname, units='gC14/m^2', & - avgflag='A', long_name=longname, ptr_col=data1dptr) + avgflag='A', long_name=longname, ptr_col=data1dptr, default='inactive') if ( nlevdecomp_full > 1 ) then data1dptr => this%decomp_cpools_1m_col(:,l) @@ -318,12 +318,12 @@ subroutine InitHistory(this, bounds, carbon_type) this%totlitc_1m_col(begc:endc) = spval call hist_addfld1d (fname='C14_TOTLITC_1m', units='gC14/m^2', & avgflag='A', long_name='C14 total litter carbon to 1 meter', & - ptr_col=this%totlitc_1m_col) + ptr_col=this%totlitc_1m_col, default='inactive') this%totsomc_1m_col(begc:endc) = spval call hist_addfld1d (fname='C14_TOTSOMC_1m', units='gC14/m^2', & avgflag='A', long_name='C14 total soil organic matter carbon to 1 meter', & - ptr_col=this%totsomc_1m_col) + ptr_col=this%totsomc_1m_col, default='inactive') endif this%ctrunc_col(begc:endc) = spval From c3f7afc89985220d6e8de3415c263474f5545c45 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Wed, 24 Oct 2018 11:05:55 -0600 Subject: [PATCH 26/46] Move and rename carbon_isotopes usermods directory As with other directories, this is only supposed to be used in conjunction with other cmip6 changes, so I have moved it to the _includes directory and put cmip6 in the name. This reliance on cmip6 isn't important yet, but will be once we add some extra history fields in this usermod. --- .../_includes/cmip6_carbon_isotopes/user_nl_clm | 8 ++++++++ cime_config/usermods_dirs/carbon_isotopes/user_nl_clm | 4 ---- cime_config/usermods_dirs/cmip6_deck/include_user_mods | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm delete mode 100644 cime_config/usermods_dirs/carbon_isotopes/user_nl_clm diff --git a/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm b/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm new file mode 100644 index 0000000000..d2d1fb861e --- /dev/null +++ b/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm @@ -0,0 +1,8 @@ +!---------------------------------------------------------------------------------- +! Settings from cmip6_carbon_isotopes +!---------------------------------------------------------------------------------- + +use_c13 = .true. +use_c14 = .true. +use_c13_timeseries = .true. +use_c14_bombspike = .true. diff --git a/cime_config/usermods_dirs/carbon_isotopes/user_nl_clm b/cime_config/usermods_dirs/carbon_isotopes/user_nl_clm deleted file mode 100644 index 2fa530330a..0000000000 --- a/cime_config/usermods_dirs/carbon_isotopes/user_nl_clm +++ /dev/null @@ -1,4 +0,0 @@ -use_c13 = .true. -use_c14 = .true. -use_c13_timeseries = .true. -use_c14_bombspike = .true. diff --git a/cime_config/usermods_dirs/cmip6_deck/include_user_mods b/cime_config/usermods_dirs/cmip6_deck/include_user_mods index 1e912156d6..2cadcc0b93 100644 --- a/cime_config/usermods_dirs/cmip6_deck/include_user_mods +++ b/cime_config/usermods_dirs/cmip6_deck/include_user_mods @@ -1,3 +1,4 @@ ../_includes/cmip6_glaciers_cplhist ../_includes/cmip6_glaciers_virtual_antarctica +../_includes/cmip6_carbon_isotopes ../output_crop From ce7a6030300092e70983e236211081957cea0816 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Wed, 24 Oct 2018 14:42:27 -0600 Subject: [PATCH 27/46] In cmip6_carbon_isotopes usermods, add some C14 history fields Per Dave Lawrence's request here: https://github.com/ESCOMP/ctsm/pull/527 --- .../usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm b/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm index d2d1fb861e..e7c6fbf7e8 100644 --- a/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm +++ b/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm @@ -6,3 +6,7 @@ use_c13 = .true. use_c14 = .true. use_c13_timeseries = .true. use_c14_bombspike = .true. + +! h3 stream (yearly average, gridcell-level) +hist_fincl4 += 'C14_SOIL1C_vr', 'C14_SOIL2C_vr', 'C14_SOIL3C_vr' + From 5e2df57b59d8276b940d4af6cfed3695a777c970 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 25 Oct 2018 11:31:25 -0600 Subject: [PATCH 28/46] Fix default active status of LITTERC_HR I had accidentally made LITTERC_HR inactive by default instead of C13_LITTERC_HR. This commit fixes that mistake. --- src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 b/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 index 83a56eba3a..e866ea280b 100644 --- a/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 @@ -203,7 +203,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%lithr_col(begc:endc) = spval call hist_addfld1d (fname='LITTERC_HR', units='gC/m^2/s', & avgflag='A', long_name='litter C heterotrophic respiration', & - ptr_col=this%lithr_col, default='inactive') + ptr_col=this%lithr_col) this%somhr_col(begc:endc) = spval call hist_addfld1d (fname='SOILC_HR', units='gC/m^2/s', & @@ -386,7 +386,7 @@ subroutine InitHistory(this, bounds, carbon_type) this%lithr_col(begc:endc) = spval call hist_addfld1d (fname='C13_LITTERC_HR', units='gC13/m^2/s', & avgflag='A', long_name='C13 fine root C litterfall to litter 3 C', & - ptr_col=this%lithr_col) + ptr_col=this%lithr_col, default='inactive') this%somhr_col(begc:endc) = spval call hist_addfld1d (fname='C13_SOILC_HR', units='gC13/m^2/s', & From 3295d09603ed5dc484493dcf7b2731eb97cdd757 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 25 Oct 2018 13:26:53 -0600 Subject: [PATCH 29/46] Don't allow interpolation from a non-ciso case to a ciso case Due to https://github.com/ESCOMP/ctsm/issues/67, interpolation from a case without carbon isotopes to a case with carbon isotopes yields incorrect initialization values for the carbon isotopes. Now that we're turning carbon isotopes on via some semi-out-of-the-box usermods (for cmip6), it is becoming more important to check to make sure someone doesn't shoot themselves in the foot this way. This commit should be backed out once ESCOMP/ctsm#67 is resolved --- .../namelist_definition_clm4_5.xml | 10 +++ .../testmods_dirs/clm/ciso/user_nl_clm | 8 +++ .../clm/ciso_flexCN_FUN/user_nl_clm | 8 +++ src/init_interp/initInterp.F90 | 67 ++++++++++++++++++- src/main/clm_varctl.F90 | 8 +++ src/main/controlMod.F90 | 4 +- 6 files changed, 103 insertions(+), 2 deletions(-) diff --git a/bld/namelist_files/namelist_definition_clm4_5.xml b/bld/namelist_files/namelist_definition_clm4_5.xml index fdf2f5e9e2..e3b5b80b4b 100644 --- a/bld/namelist_files/namelist_definition_clm4_5.xml +++ b/bld/namelist_files/namelist_definition_clm4_5.xml @@ -1973,6 +1973,16 @@ Flag to use the atmospheric time series of C13 concentrations from natural abund Filename with time series of atmospheric Delta C13 data, which use CMIP6 format. variables in file are "time" and "delta13co2_in_air". time variable is in format: years since 1850-01-01 0:0:0.0. units are permil. + + +There is a bug that causes incorrect values for C isotopes if running +init_interp from a case without C isotopes to a case with C isotopes +(https://github.com/ESCOMP/ctsm/issues/67). Normally, an error-check +prevents you from doing this interpolation (until we have fixed that +bug). However, we sometimes want to bypass this error-check in system +tests. This namelist flag bypasses this error-check. + diff --git a/cime_config/testdefs/testmods_dirs/clm/ciso/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ciso/user_nl_clm index 0a40cd33a8..3b12a2772b 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ciso/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ciso/user_nl_clm @@ -1,2 +1,10 @@ use_c13 = .true. use_c14 = .true. + + ! BUG(wjs, 2018-10-25, ESCOMP/ctsm#67) There is a bug that causes incorrect values for C + ! isotopes if running init_interp from a case without C isotopes to a case with C + ! isotopes (https://github.com/ESCOMP/ctsm/issues/67). Normally, an error-check prevents + ! you from doing this interpolation (until we have fixed that bug). However, we + ! sometimes want to bypass this error-check in system tests. This namelist flag bypasses + ! this error-check. + for_testing_allow_interp_non_ciso_to_ciso = .true. diff --git a/cime_config/testdefs/testmods_dirs/clm/ciso_flexCN_FUN/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ciso_flexCN_FUN/user_nl_clm index 9db1957c1c..32e584af82 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ciso_flexCN_FUN/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ciso_flexCN_FUN/user_nl_clm @@ -2,3 +2,11 @@ use_c14 = .true. use_fun = .true. use_flexibleCN = .true. + + ! BUG(wjs, 2018-10-25, ESCOMP/ctsm#67) There is a bug that causes incorrect values for C + ! isotopes if running init_interp from a case without C isotopes to a case with C + ! isotopes (https://github.com/ESCOMP/ctsm/issues/67). Normally, an error-check prevents + ! you from doing this interpolation (until we have fixed that bug). However, we + ! sometimes want to bypass this error-check in system tests. This namelist flag bypasses + ! this error-check. + for_testing_allow_interp_non_ciso_to_ciso = .true. diff --git a/src/init_interp/initInterp.F90 b/src/init_interp/initInterp.F90 index a5f31584bc..21c7ddb18c 100644 --- a/src/init_interp/initInterp.F90 +++ b/src/init_interp/initInterp.F90 @@ -49,6 +49,7 @@ module initInterpMod private :: interp_1d_int private :: interp_2d_double private :: limit_snlsno + private :: check_interp_non_ciso_to_ciso ! Private data @@ -227,12 +228,14 @@ subroutine initInterp (filei, fileo, bounds, glc_behavior) end if ! -------------------------------------------- - ! Open input and output initial conditions files (both just for reading now) + ! Open input and output initial conditions files ! -------------------------------------------- call ncd_pio_openfile (ncidi, trim(filei) , 0) call ncd_pio_openfile (ncido, trim(fileo), ncd_write) + call check_interp_non_ciso_to_ciso(ncidi) + ! -------------------------------------------- ! Determine dimensions and error checks on dimensions ! -------------------------------------------- @@ -1258,4 +1261,66 @@ subroutine limit_snlsno(ncido, bounds_o) deallocate(snlsno) end subroutine limit_snlsno + !----------------------------------------------------------------------- + subroutine check_interp_non_ciso_to_ciso(ncidi) + ! + ! !DESCRIPTION: + ! BUG(wjs, 2018-10-25, ESCOMP/ctsm#67) There is a bug that causes incorrect values for + ! C isotopes if running init_interp from a case without C isotopes to a case with C + ! isotopes (https://github.com/ESCOMP/ctsm/issues/67). Here we check that the user + ! isn't trying to do an interpolation in that case. This check should be removed once + ! bug #67 is resolved. + ! + ! !USES: + use clm_varctl, only : use_c13, use_c14, for_testing_allow_interp_non_ciso_to_ciso + ! + ! !ARGUMENTS: + type(file_desc_t), intent(inout) :: ncidi + ! + ! !LOCAL VARIABLES: + type(Var_desc_t) :: vardesc ! pio variable descriptor + integer :: status ! return code + + character(len=*), parameter :: subname = 'check_interp_non_ciso_to_ciso' + !----------------------------------------------------------------------- + + if (.not. for_testing_allow_interp_non_ciso_to_ciso) then + if (use_c13) then + call pio_seterrorhandling(ncidi, PIO_BCAST_ERROR) + ! arbitrarily check leafc_13 (we could pick any c13 restart field) + status = pio_inq_varid(ncidi, name='leafc_13', vardesc=vardesc) + call pio_seterrorhandling(ncidi, PIO_INTERNAL_ERROR) + if (status /= PIO_noerr) then + if (masterproc) then + write(iulog,*) 'Cannot interpolate from a run without c13 to a run with c13,' + write(iulog,*) 'due to .' + write(iulog,*) 'Either use an input initial conditions file with c13 information,' + write(iulog,*) 'or re-spinup from cold start.' + end if + call endrun(msg='Cannot interpolate from a run without c13 to a run with c13', & + additional_msg=errMsg(sourcefile, __LINE__)) + end if + end if + + if (use_c14) then + call pio_seterrorhandling(ncidi, PIO_BCAST_ERROR) + ! arbitrarily check leafc_14 (we could pick any c14 restart field) + status = pio_inq_varid(ncidi, name='leafc_14', vardesc=vardesc) + call pio_seterrorhandling(ncidi, PIO_INTERNAL_ERROR) + if (status /= PIO_noerr) then + if (masterproc) then + write(iulog,*) 'Cannot interpolate from a run without c14 to a run with c14,' + write(iulog,*) 'due to .' + write(iulog,*) 'Either use an input initial conditions file with c14 information,' + write(iulog,*) 'or re-spinup from cold start.' + end if + call endrun(msg='Cannot interpolate from a run without c14 to a run with c14', & + additional_msg=errMsg(sourcefile, __LINE__)) + end if + end if + end if + + end subroutine check_interp_non_ciso_to_ciso + + end module initInterpMod diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index f7e5a793ca..ef8c25761e 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -189,6 +189,14 @@ module clm_varctl logical, public :: use_c13 = .false. ! true => use C-13 model logical, public :: use_c14 = .false. ! true => use C-14 model + ! BUG(wjs, 2018-10-25, ESCOMP/ctsm#67) There is a bug that causes incorrect values for C + ! isotopes if running init_interp from a case without C isotopes to a case with C + ! isotopes (https://github.com/ESCOMP/ctsm/issues/67). Normally, an error-check prevents + ! you from doing this interpolation (until we have fixed that bug). However, we + ! sometimes want to bypass this error-check in system tests. This namelist flag bypasses + ! this error-check. + logical, public :: for_testing_allow_interp_non_ciso_to_ciso = .false. + !---------------------------------------------------------- ! FATES switches !---------------------------------------------------------- diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index a78f56785e..d46df04a5d 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -214,7 +214,7 @@ subroutine control_init( ) namelist /clm_inparm/ no_frozen_nitrif_denitrif - namelist /clm_inparm/ use_c13, use_c14 + namelist /clm_inparm/ use_c13, use_c14, for_testing_allow_interp_non_ciso_to_ciso ! FATES Flags @@ -628,6 +628,7 @@ subroutine control_spmd() ! isotopes call mpi_bcast (use_c13, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_c14, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (for_testing_allow_interp_non_ciso_to_ciso, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -864,6 +865,7 @@ subroutine control_print () write(iulog, *) ' use_c14 : ', use_c14 write(iulog, *) ' use_c14_bombspike : ', use_c14_bombspike write(iulog, *) ' atm_c14_filename : ', atm_c14_filename + write(iulog, *) ' for_testing_allow_interp_non_ciso_to_ciso : ', for_testing_allow_interp_non_ciso_to_ciso end if if (fsnowoptics == ' ') then From f963aef6eda0bb8a4e65a29aa65aafcd9ad3a5d8 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 25 Oct 2018 15:52:08 -0600 Subject: [PATCH 30/46] Add a cmip6_waccm_deck usermods directory --- .../usermods_dirs/cmip6_waccm_deck/README | 16 ++++++++++++++++ .../cmip6_waccm_deck/include_user_mods | 3 +++ 2 files changed, 19 insertions(+) create mode 100644 cime_config/usermods_dirs/cmip6_waccm_deck/README create mode 100644 cime_config/usermods_dirs/cmip6_waccm_deck/include_user_mods diff --git a/cime_config/usermods_dirs/cmip6_waccm_deck/README b/cime_config/usermods_dirs/cmip6_waccm_deck/README new file mode 100644 index 0000000000..8f85af14a3 --- /dev/null +++ b/cime_config/usermods_dirs/cmip6_waccm_deck/README @@ -0,0 +1,16 @@ +WACCM DECK runs should be configured similarly to CAM DECK runs, but +without virtual elevation classes over Antarctica. + +(2018-10-22) In discussions between Bill Sacks and Bill Lipscomb: We +have decided NOT to turn on virtual Antarctica columns for any of the +WACCM simulations (DECK or ScenarioMIP): these weren't turned on in the +WACCM PI-Control or historical runs (either by accident or +intentionally: I'm not sure which, and can't find emails describing this +decision). Since this setting needs to be compatible with the REFCASE, +it's simpler if we keep it consistent for all WACCM runs, and there +seems to be only limited value in turning on virtual Antarctica columns +in the remaining WACCM runs (1% CO2, 4xCO2 and ScenarioMIP) when they +weren't on in the WACCM PI-Control or Historical runs. And Mike Mills +says that there won't be any more sharing of initial conditions between +CAM and WACCM CMIP6 runs, so it's fine if the two sets remain different +in this respect. diff --git a/cime_config/usermods_dirs/cmip6_waccm_deck/include_user_mods b/cime_config/usermods_dirs/cmip6_waccm_deck/include_user_mods new file mode 100644 index 0000000000..ad94a3093c --- /dev/null +++ b/cime_config/usermods_dirs/cmip6_waccm_deck/include_user_mods @@ -0,0 +1,3 @@ +../_includes/cmip6_glaciers_cplhist +../_includes/cmip6_carbon_isotopes +../output_crop From fb26acc394da61bdfa1b3d6defa7922fc79ddc50 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 25 Oct 2018 15:57:55 -0600 Subject: [PATCH 31/46] Unrelated change: trim error message --- src/main/abortutils.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/abortutils.F90 b/src/main/abortutils.F90 index 9f9ce56272..eb276ca044 100644 --- a/src/main/abortutils.F90 +++ b/src/main/abortutils.F90 @@ -42,7 +42,7 @@ subroutine endrun_vanilla(msg, additional_msg) !----------------------------------------------------------------------- if (present (additional_msg)) then - write(iulog,*)'ENDRUN: ', additional_msg + write(iulog,*)'ENDRUN: ', trim(additional_msg) else write(iulog,*)'ENDRUN:' end if From dd6d0be809edbfbf795021d068f3d70caa882339 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 26 Oct 2018 12:24:29 -0600 Subject: [PATCH 32/46] Add some output when for_testing_allow_interp_non_ciso_to_ciso is true Per request of Erik Kluzek --- src/init_interp/initInterp.F90 | 76 +++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/src/init_interp/initInterp.F90 b/src/init_interp/initInterp.F90 index 21c7ddb18c..a45bda7fcc 100644 --- a/src/init_interp/initInterp.F90 +++ b/src/init_interp/initInterp.F90 @@ -1280,43 +1280,61 @@ subroutine check_interp_non_ciso_to_ciso(ncidi) ! !LOCAL VARIABLES: type(Var_desc_t) :: vardesc ! pio variable descriptor integer :: status ! return code + logical :: missing_ciso ! whether C isotope fields are missing from the input file, despite the run containing C isotopes character(len=*), parameter :: subname = 'check_interp_non_ciso_to_ciso' !----------------------------------------------------------------------- - if (.not. for_testing_allow_interp_non_ciso_to_ciso) then - if (use_c13) then - call pio_seterrorhandling(ncidi, PIO_BCAST_ERROR) - ! arbitrarily check leafc_13 (we could pick any c13 restart field) - status = pio_inq_varid(ncidi, name='leafc_13', vardesc=vardesc) - call pio_seterrorhandling(ncidi, PIO_INTERNAL_ERROR) - if (status /= PIO_noerr) then - if (masterproc) then - write(iulog,*) 'Cannot interpolate from a run without c13 to a run with c13,' - write(iulog,*) 'due to .' - write(iulog,*) 'Either use an input initial conditions file with c13 information,' - write(iulog,*) 'or re-spinup from cold start.' - end if - call endrun(msg='Cannot interpolate from a run without c13 to a run with c13', & - additional_msg=errMsg(sourcefile, __LINE__)) + missing_ciso = .false. + + if (use_c13) then + call pio_seterrorhandling(ncidi, PIO_BCAST_ERROR) + ! arbitrarily check leafc_13 (we could pick any c13 restart field) + status = pio_inq_varid(ncidi, name='leafc_13', vardesc=vardesc) + call pio_seterrorhandling(ncidi, PIO_INTERNAL_ERROR) + if (status /= PIO_noerr) then + if (masterproc) then + write(iulog,*) 'Cannot interpolate from a run without c13 to a run with c13,' + write(iulog,*) 'due to .' + write(iulog,*) 'Either use an input initial conditions file with c13 information,' + write(iulog,*) 'or re-spinup from cold start.' end if + missing_ciso = .true. end if + end if - if (use_c14) then - call pio_seterrorhandling(ncidi, PIO_BCAST_ERROR) - ! arbitrarily check leafc_14 (we could pick any c14 restart field) - status = pio_inq_varid(ncidi, name='leafc_14', vardesc=vardesc) - call pio_seterrorhandling(ncidi, PIO_INTERNAL_ERROR) - if (status /= PIO_noerr) then - if (masterproc) then - write(iulog,*) 'Cannot interpolate from a run without c14 to a run with c14,' - write(iulog,*) 'due to .' - write(iulog,*) 'Either use an input initial conditions file with c14 information,' - write(iulog,*) 'or re-spinup from cold start.' - end if - call endrun(msg='Cannot interpolate from a run without c14 to a run with c14', & - additional_msg=errMsg(sourcefile, __LINE__)) + if (use_c14) then + call pio_seterrorhandling(ncidi, PIO_BCAST_ERROR) + ! arbitrarily check leafc_14 (we could pick any c14 restart field) + status = pio_inq_varid(ncidi, name='leafc_14', vardesc=vardesc) + call pio_seterrorhandling(ncidi, PIO_INTERNAL_ERROR) + if (status /= PIO_noerr) then + if (masterproc) then + write(iulog,*) 'Cannot interpolate from a run without c14 to a run with c14,' + write(iulog,*) 'due to .' + write(iulog,*) 'Either use an input initial conditions file with c14 information,' + write(iulog,*) 'or re-spinup from cold start.' end if + missing_ciso = .true. + end if + end if + + if (for_testing_allow_interp_non_ciso_to_ciso) then + if (missing_ciso) then + write(iulog,*) ' ' + write(iulog,*) 'Proceeding despite missing c13 and/or c14 fields on input finidat file,' + write(iulog,*) 'because for_testing_allow_interp_non_ciso_to_ciso is set.' + write(iulog,*) ' ' + else + write(iulog,*) ' ' + write(iulog,*) 'for_testing_allow_interp_non_ciso_to_ciso is .true., but it appears to be unnecessary in this run' + write(iulog,*) '(this is informational only - it does not indicate a problem)' + write(iulog,*) ' ' + end if + else + if (missing_ciso) then + call endrun(msg='Cannot interpolate from a run without c13/c14 to a run with c13/c14', & + additional_msg=errMsg(sourcefile, __LINE__)) end if end if From 8211fffe14e2450ce42d70059b30a68316e8f733 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 26 Oct 2018 12:35:50 -0600 Subject: [PATCH 33/46] Add / fix CMIP6 compset modifiers (1) Add BGC-CROP-CMIP6WACCMDECK modifier (2) Point to correct directory for CMIP6DECK modifier, including being robust to whether this is a standalone checkout or within CESM --- cime_config/config_component.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 73050aafb1..edfa521d2e 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -14,9 +14,9 @@ - clm4.0: - clm4.5: - clm5.0: + clm4.0: + clm4.5: + clm5.0: Satellite phenology: CN: Carbon Nitrogen model CNDV: CN with Dynamic Vegetation @@ -30,6 +30,7 @@ BGC (vert. resol. CN and methane) with dynamic vegetation: BGC (vert. resol. CN and methane) with dynamic vegetation and prognostic crop: BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 DECK experiments: + BGC (vert. resol. CN and methane) with prognostic crop, with modifications appropriate for CMIP6 WACCM DECK experiments: @@ -230,7 +231,8 @@ - $SRCROOT/components/clm/cime_config/usermods_dirs/cmip6 + $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_deck + $COMP_ROOT_DIR_LND/cime_config/usermods_dirs/cmip6_waccm_deck run_component_clm env_case.xml From 11851f4342ad78047cc03cf9ef452e5152f8cf9c Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Fri, 26 Oct 2018 12:53:43 -0600 Subject: [PATCH 34/46] Add compsets exercising the new CMIP6 options This is so we can add tests covering the application of these options --- cime_config/config_compsets.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index c628110a9c..4b820c1ffa 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -96,6 +96,18 @@ + + + I1850Clm50BgcCropCmip6 + 1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6DECK_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV + + + + + I1850Clm50BgcCropCmip6waccm + 1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV + + I1850Clm50BgcCropCru 1850_DATM%CRUv7_CLM50%BGC-CROP_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV From f83b790dc719eae8147544a1daa218f5afb2324d Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 05:53:35 -0600 Subject: [PATCH 35/46] Change cmip6 tests to use new compsets, and change f09_g16 to f09_g17 --- cime_config/testdefs/testlist_clm.xml | 8 ++++---- cime_config/testdefs/testmods_dirs/clm/basic/README | 8 ++++++++ .../testdefs/testmods_dirs/clm/basic/shell_commands | 4 ++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 cime_config/testdefs/testmods_dirs/clm/basic/README create mode 100644 cime_config/testdefs/testmods_dirs/clm/basic/shell_commands diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 6f11cfc188..1b5519d085 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -984,13 +984,13 @@ - + - + @@ -1492,13 +1492,13 @@ - + - + diff --git a/cime_config/testdefs/testmods_dirs/clm/basic/README b/cime_config/testdefs/testmods_dirs/clm/basic/README new file mode 100644 index 0000000000..9193464848 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/basic/README @@ -0,0 +1,8 @@ +This testmods directory is for tests where we want to use the +out-of-the-box output options, but still want the minimal changes that +we apply for nearly all tests. + +("default" would probably be a good name for this, but we already use +"default" to mean "the standard output changes that are applied for most +tests" (adding some streams and fields, double precision, etc.). We may +want to consider renaming that one and using "default" for this one.) diff --git a/cime_config/testdefs/testmods_dirs/clm/basic/shell_commands b/cime_config/testdefs/testmods_dirs/clm/basic/shell_commands new file mode 100644 index 0000000000..33792ffaee --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/basic/shell_commands @@ -0,0 +1,4 @@ +#!/bin/bash + +./xmlchange BFBFLAG="TRUE" + From eaea77618c1930a9d29056e4aa58ab6d599275e7 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 06:02:00 -0600 Subject: [PATCH 36/46] Change compset used for testing CMIP6WACCMDECK I'll test this with a single-point case, so I need a compset compatible with that. --- cime_config/config_compsets.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 4b820c1ffa..77dda30ed6 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -102,10 +102,14 @@ 1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6DECK_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV - - - I1850Clm50BgcCropCmip6waccm - 1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV + + + I2000Clm50BgcCropQianGsCmip6waccm + 2000_DATM%QIA_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_SGLC_SWAV From 952666bdc41209c49fb6139c18c9236517b622c2 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 06:28:43 -0600 Subject: [PATCH 37/46] Add testmods to test new usermods directories --- .../testdefs/testmods_dirs/clm/output_bgc_highfreq/README | 1 + .../testmods_dirs/clm/output_bgc_highfreq/include_user_mods | 2 ++ .../testdefs/testmods_dirs/clm/output_crop_highfreq/README | 1 + .../testmods_dirs/clm/output_crop_highfreq/include_user_mods | 2 ++ .../testdefs/testmods_dirs/clm/output_sp_highfreq/README | 1 + .../testmods_dirs/clm/output_sp_highfreq/include_user_mods | 2 ++ 6 files changed, 9 insertions(+) create mode 100644 cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/README create mode 100644 cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/README create mode 100644 cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/README create mode 100644 cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods diff --git a/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/README b/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/README new file mode 100644 index 0000000000..7798a3ce70 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/README @@ -0,0 +1 @@ +Tests the output_bgc_highfreq usermods diff --git a/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods new file mode 100644 index 0000000000..de8b9039c8 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods @@ -0,0 +1,2 @@ +../../../../usermods_dirs/output_bgc_highfreq +../basic diff --git a/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/README b/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/README new file mode 100644 index 0000000000..253d84414c --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/README @@ -0,0 +1 @@ +Tests the output_crop_highfreq usermods diff --git a/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods new file mode 100644 index 0000000000..770abf5cf9 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods @@ -0,0 +1,2 @@ +../../../../usermods_dirs/output_crop_highfreq +../basic diff --git a/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/README b/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/README new file mode 100644 index 0000000000..330964f61f --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/README @@ -0,0 +1 @@ +Tests the output_sp_highfreq usermods diff --git a/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods new file mode 100644 index 0000000000..8c117e01ed --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods @@ -0,0 +1,2 @@ +../../../../usermods_dirs/output_sp_highfreq +../basic From 9701d10795c7ae13b72e4ed9d7be0b7a00650105 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 06:37:41 -0600 Subject: [PATCH 38/46] Unrelated change: don't try to print domain%clmlevel This is unset for the domain on which domain_check is called, so it prints as garbage. As far as I can tell, this field isn't actually used anywhere. --- src/utils/domainMod.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/domainMod.F90 b/src/utils/domainMod.F90 index 7cdd62b41f..a57d565b4d 100644 --- a/src/utils/domainMod.F90 +++ b/src/utils/domainMod.F90 @@ -215,7 +215,6 @@ subroutine domain_check(domain) write(iulog,*) ' domain_check decomped = ',domain%decomped write(iulog,*) ' domain_check ns = ',domain%ns write(iulog,*) ' domain_check ni,nj = ',domain%ni,domain%nj - write(iulog,*) ' domain_check clmlevel = ',trim(domain%clmlevel) write(iulog,*) ' domain_check nbeg,nend = ',domain%nbeg,domain%nend write(iulog,*) ' domain_check lonc = ',minval(domain%lonc),maxval(domain%lonc) write(iulog,*) ' domain_check latc = ',minval(domain%latc),maxval(domain%latc) From de2c1fc68363b02aa5242cb15f06765702010484 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 06:40:38 -0600 Subject: [PATCH 39/46] Unrelated change: fix prints of C iso filenames These were being printed before they were set, leading to garbage being printed --- src/biogeochem/CNCIsoAtmTimeSeriesReadMod.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/biogeochem/CNCIsoAtmTimeSeriesReadMod.F90 b/src/biogeochem/CNCIsoAtmTimeSeriesReadMod.F90 index 5e15c98d3b..83b174379e 100644 --- a/src/biogeochem/CNCIsoAtmTimeSeriesReadMod.F90 +++ b/src/biogeochem/CNCIsoAtmTimeSeriesReadMod.F90 @@ -122,13 +122,13 @@ subroutine C14_init_BombSpike() character(len=*), parameter :: vname = 'Delta14co2_in_air' ! Variable name on file !----------------------------------------------------------------------- + call getfil(atm_c14_filename, locfn, 0) + if ( masterproc ) then write(iulog, *) 'C14_init_BombSpike: preparing to open file:' write(iulog, *) trim(locfn) endif - call getfil(atm_c14_filename, locfn, 0) - call ncd_pio_openfile (ncid, trim(locfn), 0) call ncd_inqdlen(ncid,dimid,ntim,'time') @@ -241,13 +241,13 @@ subroutine C13_init_TimeSeries() character(len=*), parameter :: vname = 'delta13co2_in_air' ! Variable name on file !----------------------------------------------------------------------- + call getfil(atm_c13_filename, locfn, 0) + if ( masterproc ) then write(iulog, *) 'C13_init_TimeSeries: preparing to open file:' write(iulog, *) trim(locfn) endif - call getfil(atm_c13_filename, locfn, 0) - call ncd_pio_openfile (ncid, trim(locfn), 0) call ncd_inqdlen(ncid,dimid,ntim,'time') From 18b0a7711c58fcb0ab1072b0663371fd7d15f48c Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 06:49:05 -0600 Subject: [PATCH 40/46] Change compset used for testing CMIP6WACCMDECK The year-2000 test I tried picked up an finidat without C isotopes. I see that a Hist test can pick up an finidat with C isotopes, which is needed for this configuration. --- cime_config/config_compsets.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 77dda30ed6..35b22e2ebe 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -108,8 +108,8 @@ throughput, which is particularly relevant for single-point cases (where datm dominates the runtime). --> - I2000Clm50BgcCropQianGsCmip6waccm - 2000_DATM%QIA_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_SGLC_SWAV + IHistClm50BgcCropQianGsCmip6waccm + HIST_DATM%QIA_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_SGLC_SWAV From ca93b55d4f361bea31bbbce91ef053d29ad945a0 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 20:56:32 -0600 Subject: [PATCH 41/46] Add a test of the CMIP6WACCM modifier Also change the compset exercising this modifier to one with CISM, not for a single-point resolution: this is needed for the histaux_l2x1yrg part of this configuration to work. --- cime_config/config_compsets.xml | 12 ++++-------- cime_config/testdefs/testlist_clm.xml | 9 +++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/cime_config/config_compsets.xml b/cime_config/config_compsets.xml index 35b22e2ebe..4b820c1ffa 100644 --- a/cime_config/config_compsets.xml +++ b/cime_config/config_compsets.xml @@ -102,14 +102,10 @@ 1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6DECK_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV - - - IHistClm50BgcCropQianGsCmip6waccm - HIST_DATM%QIA_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_SGLC_SWAV + + + I1850Clm50BgcCropCmip6waccm + 1850_DATM%GSWP3v1_CLM50%BGC-CROP-CMIP6WACCMDECK_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 1b5519d085..be873fd1bb 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1926,4 +1926,13 @@ + + + + + + + + + From c16ee9d91f3e01af140b237fadd6985fb8a71c1d Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sat, 27 Oct 2018 21:12:43 -0600 Subject: [PATCH 42/46] Add tests of the new output usermods --- cime_config/testdefs/testlist_clm.xml | 32 ++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index be873fd1bb..ae27810ec1 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1932,7 +1932,37 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From de4a13456761736ad09a304fe847120bfb2aefa7 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Sun, 28 Oct 2018 14:29:43 -0600 Subject: [PATCH 43/46] Update changelog --- doc/ChangeLog | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++ doc/ChangeSum | 1 + 2 files changed, 175 insertions(+) diff --git a/doc/ChangeLog b/doc/ChangeLog index 02838127c7..96569f387b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,178 @@ =============================================================== +Tag name: ctsm1.0.dev015 +Originator(s): sacks (Bill Sacks) +Date: Sun Oct 28 14:29:30 MDT 2018 +One-line Summary: CMIP6 compset modifiers, usermods for typical output, and other output enhancements + +Purpose of changes +------------------ + +(1) Support %BGC-CROP-CMIP6DECK and %BGC-CROP-CMIP6WACCMDECK compset + modifiers, so that we can turn on the necessary options + (output-related and others) via new CMIP6-specific compsets. + +(2) Turn on carbon isotopes in CMIP6 runs (from Erik Kluzek) + +(3) Remove setting of CCSM_BGC=CO2A in the cmip6 usermods + +(4) Add usermods directories for getting typical extra output that's + wanted in many cases: output_crop, output_crop_highfreq, output_bgc, + output_bgc_highfreq, output_sp, and output_sp_highfreq. These can be + enabled by adding something like '--user-mods-dir output_crop' on + the create_newcase line (that short-hand works for an I compset; for + F or B compsets, you need to provide the full path to the usermod + directory). + +(4) Allow holes in the number of history tapes. Holes are cases where, + for example, we have h0, h1 and h3 tapes, but no h2 tape (because + there are no fields on the h2 tape). (This is needed for (3).) + +(5) Fix reading and writing of 1-d logical global arrays. This fixes + ESCOMP/ctsm#24 for real (rather than just preventing an attempt to + read/write 1-d logical arrays, as was done in the previous 'fix'). + +(6) Add C13_NBP and C14_NBP diagnostic fields (from Keith Oleson) + +(7) Make a bunch of carbon isotope diagnostic fields inactive by default + +(8) Don't allow interpolation (use_init_interp) from a case without + carbon isotopes to a case with carbon isotopes: Due to + https://github.com/ESCOMP/ctsm/issues/67, interpolation from a case + without carbon isotopes to a case with carbon isotopes yields + incorrect initialization values for the carbon isotopes. Now that + we're turning carbon isotopes on via some semi-out-of-the-box + usermods (for cmip6), it is becoming more important to check to make + sure someone doesn't shoot themselves in the foot this way. + +(9) Add tests of the new output usermods as well as of the CMIP6 compset + modifiers + +Bugs fixed or introduced +------------------------ + +Issues fixed (include CTSM Issue #): +- Fixes #24 for real (ncd_io_1d_log_glob is broken) +- Fixes #529 (Organize usermods_dirs to facilitate running cases with + the right output) + + +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.] + +[ ] clm5_0 + +[ ] clm4_5 + +[ ] clm4_0 + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): none + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): +- New namelist variable, just for testing purposes: + for_testing_allow_interp_non_ciso_to_ciso. This bypasses an error + check, and should only be used in tests. + +Changes made to namelist defaults (e.g., changed parameter values): none + +Changes to the datasets (e.g., parameter, surface or initial files): none + +Substantial timing or memory changes: none + +Notes of particular relevance for developers: (including Code reviews and testing) +--------------------------------------------- +NOTE: Be sure to review the steps in ../CTSMMasterChecklist as well as the coding style in the Developers Guide + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): none + +Changes to tests or testing: +- Reworked tests of cmip6_deck usermods to use the new + %BGC-CROP-CMIP6DECK compset modifier, and changed f09_g16 to f09_g17 +- Added a test of the %BGC-CROP-CMIP6WACCMDECK compset modifier +- Added tests of output_crop_highfreq, output_bgc_highfreq and + output_sp_highfreq usermods directories +- Note that there are NO tests covering the cmip6_evolving_icesheet + usermods: this usermod directory adds very little beyond cmip6_deck, + so it didn't seem worth its own test + +Code reviewed by: Erik Kluzek + + +CTSM testing: + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - not run + + unit-tests (components/clm/src): + + cheyenne - pass + + tools-tests (components/clm/test/tools): + + cheyenne - not run + + PTCLM testing (components/clm/tools/shared/PTCLM/test): + + cheyenne - not run + + regular tests (aux_clm): + + cheyenne_intel ---- pass + cheyenne_gnu ------ pass + hobart_nag -------- pass + hobart_pgi -------- pass + hobart_intel ------ pass + + ERI_D_Ld9.T31_g37.I2000Clm50Sp.cheyenne_intel.clm-SNICARFRC + initially failed COMPARE_base_hybrid, COMPARE_base_rest and BASELINE + comparisons. I reran it and it passed. + + Manually compared all history files from + ERS_Ly3.f10_f10_musgs.I1850Clm50BgcCropCmip6.cheyenne_intel.clm-basic + with baseline + ERS_Ly3.f10_f10_musgs.I1850Clm50BgcCrop.cheyenne_intel.clm-cmip6. They + were all identical. Also compared all history files from + SMS_Ld5_D.f09_g17.I1850Clm50BgcCropCmip6.cheyenne_intel.clm-basic + with baseline + SMS_Ld5_D.f09_g17.I1850Clm50BgcCrop.cheyenne_intel.clm-cmip6. They + were all identical (but note that this basically just compared the + cpl.hi file: the test was too short to produce monthly files.) + +CTSM tag used for the baseline comparisons: ctsm1.0.dev014 + + +Answer changes +-------------- + +Changes answers relative to baseline: NO + + +Detailed list of changes +------------------------ + +List any externals directories updated (cime, rtm, mosart, cism, fates, etc.): none + +Pull Requests that document the changes (include PR ids): +- https://github.com/ESCOMP/ctsm/pull/536 - Allow holes in the number of + history tapes and reorganize cmip6 usermods (main PR containing all of + these changes) +- https://github.com/ESCOMP/ctsm/pull/527 - Add carbon_isotope user-mod + directory to turn on c13 and c14 +- https://github.com/ESCOMP/ctsm/pull/539 - Support a %CMIP6DECK compset + modifier + +=============================================================== +=============================================================== Tag name: ctsm1.0.dev014 Originator(s): sacks (Bill Sacks) Date: Fri Oct 26 06:20:34 MDT 2018 diff --git a/doc/ChangeSum b/doc/ChangeSum index 43a82c36a3..717aa6f8f5 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm1.0.dev015 sacks 10/28/2018 CMIP6 compset modifiers, usermods for typical output, and other output enhancements ctsm1.0.dev014 sacks 10/26/2018 Miscellaneous minor, bit-for-bit bug fixes release-clm5.0.09 erik 10/23/2018 Bring in bit-for-bit changes from master up to ctsm1.0.dev012: AnnEt init, snowmip fields ctsm1.0.dev012 erik 09/29/2018 Add snow-free fields for snowmip, fix several issues From 76788b0534bfd2f2696f15d572abb82ac69bf30a Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 29 Oct 2018 06:11:02 -0600 Subject: [PATCH 44/46] Change cause of waccmx_offline test failure It looks like, at least since release-clm5.0.09, this has been failing the exact restart comparison rather than in model build. --- cime_config/testdefs/ExpectedTestFails.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index fe7373dc38..0cce48c27e 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -7,7 +7,7 @@ FAIL ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropGs.cheyenne_intel.clm-monthly RUN FAIL SMS.f10_f10_musgs.I2000Clm50BgcCrop.hobart_pgi.clm-crop RUN FAIL SMS_D.f10_f10_musgs.I2000Clm50BgcCrop.hobart_pgi.clm-crop RUN - FAIL ERS_D_Ln9_P480x3.f19_g16.I2000Clm50SpGs.cheyenne_intel.clm-waccmx_offline MODEL_BUILD + FAIL ERS_D_Ln9_P480x3.f19_g16.I2000Clm50SpGs.cheyenne_intel.clm-waccmx_offline COMPARE_base_rest FAIL ERS_Ld60.f45_f45_mg37.I2000Clm45Fates.hobart_nag.clm-Fates COMPARE_base_rest From 1e38c06130bb37b765f8a8e988b4c4cd448220c8 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 29 Oct 2018 06:30:58 -0600 Subject: [PATCH 45/46] Add a test back to the ExpectedFails list I had removed this test on master, but it's failing for me on the release branch - both from this development branch and from a fresh checkout of release-clm5.0.09. --- cime_config/testdefs/ExpectedTestFails.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 0cce48c27e..5a33dec0ab 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -5,6 +5,7 @@ FAIL ERP_D_Ld10_P36x2.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_decStart RUN FAIL ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropGs.cheyenne_gnu.clm-monthly RUN FAIL ERS_Lm20_Mmpi-serial.1x1_smallvilleIA.I2000Clm50BgcCropGs.cheyenne_intel.clm-monthly RUN + FAIL ERP_D_Ld5.f09_g17.I2000Clm50Vic.cheyenne_intel.clm-vrtlay RUN FAIL SMS.f10_f10_musgs.I2000Clm50BgcCrop.hobart_pgi.clm-crop RUN FAIL SMS_D.f10_f10_musgs.I2000Clm50BgcCrop.hobart_pgi.clm-crop RUN FAIL ERS_D_Ln9_P480x3.f19_g16.I2000Clm50SpGs.cheyenne_intel.clm-waccmx_offline COMPARE_base_rest From 0c8bc02569ea4469e2d90d7206de01633df260c0 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Mon, 29 Oct 2018 06:55:53 -0600 Subject: [PATCH 46/46] Update changelog --- doc/ChangeSum | 1 + doc/release-clm5.0.ChangeLog | 177 +++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) diff --git a/doc/ChangeSum b/doc/ChangeSum index 717aa6f8f5..1f019d7460 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ +release-clm5.0.10 sacks 10/29/2018 Bring in CMIP6 compset modifiers, output usermods and bit-for-bit fixes from dev014 and dev015 ctsm1.0.dev015 sacks 10/28/2018 CMIP6 compset modifiers, usermods for typical output, and other output enhancements ctsm1.0.dev014 sacks 10/26/2018 Miscellaneous minor, bit-for-bit bug fixes release-clm5.0.09 erik 10/23/2018 Bring in bit-for-bit changes from master up to ctsm1.0.dev012: AnnEt init, snowmip fields diff --git a/doc/release-clm5.0.ChangeLog b/doc/release-clm5.0.ChangeLog index c0fd701b3c..9fdba22f7c 100644 --- a/doc/release-clm5.0.ChangeLog +++ b/doc/release-clm5.0.ChangeLog @@ -1,4 +1,181 @@ =============================================================== +Tag name: release-clm5.0.10 +Originator(s): sacks (Bill Sacks) +Date: Mon Oct 29 06:55:41 MDT 2018 +One-line Summary: Bring in CMIP6 compset modifiers, output usermods and bit-for-bit fixes from dev014 and dev015 + +Purpose of this version: +------------------------ + +Bring in all changes from ctsm1.0.dev014 and ctsm1.0.dev015: + +From ctsm1.0.dev015: + +(1) Support %BGC-CROP-CMIP6DECK and %BGC-CROP-CMIP6WACCMDECK compset + modifiers, so that we can turn on the necessary options + (output-related and others) via new CMIP6-specific compsets. + +(2) Turn on carbon isotopes in CMIP6 runs (from Erik Kluzek) + +(3) Remove setting of CCSM_BGC=CO2A in the cmip6 usermods + +(4) Add usermods directories for getting typical extra output that's + wanted in many cases: output_crop, output_crop_highfreq, output_bgc, + output_bgc_highfreq, output_sp, and output_sp_highfreq. These can be + enabled by adding something like '--user-mods-dir output_crop' on + the create_newcase line (that short-hand works for an I compset; for + F or B compsets, you need to provide the full path to the usermod + directory). + +(4) Allow holes in the number of history tapes. Holes are cases where, + for example, we have h0, h1 and h3 tapes, but no h2 tape (because + there are no fields on the h2 tape). (This is needed for (3).) + +(5) Fix reading and writing of 1-d logical global arrays. This fixes + ESCOMP/ctsm#24 for real (rather than just preventing an attempt to + read/write 1-d logical arrays, as was done in the previous 'fix'). + +(6) Add C13_NBP and C14_NBP diagnostic fields (from Keith Oleson) + +(7) Make a bunch of carbon isotope diagnostic fields inactive by default + +(8) Don't allow interpolation (use_init_interp) from a case without + carbon isotopes to a case with carbon isotopes: Due to + https://github.com/ESCOMP/ctsm/issues/67, interpolation from a case + without carbon isotopes to a case with carbon isotopes yields + incorrect initialization values for the carbon isotopes. Now that + we're turning carbon isotopes on via some semi-out-of-the-box + usermods (for cmip6), it is becoming more important to check to make + sure someone doesn't shoot themselves in the foot this way. + +(9) Add tests of the new output usermods as well as of the CMIP6 compset + modifiers + +From ctsm1.0.dev014: Four miscellaneous minor, bit-for-bit bug fixes: + +(1) Py3 pylint check and address cime issue ESMCI/cime#2822 (from Jim + Edwards: ESCOMP/ctsm#526) + +(2) Change uppercase DEBUG variables to lowercase debug (requested by + Jim Edwards to avoid conflicting with the DEBUG CPP token) + (Fixes ESCOMP/ctsm#534) + +(3) Remove unnecessary line of code in LunaMod.F90 that was causing + problems with some compilers due to an uninitialized variable + (Fixes ESCOMP/ctsm#322) + +(4) Add r8 to 0 constant to fix build issue with XLF compiler (from Jim + Edwards: ESCOMP/ctsm#531) + + +CTSM Master Tag This Corresponds To: ctsm1.0.dev015 (but doesn't yet +include ctsm1.0.dev013) + +Summary of changes: +------------------- + +Issues fixed (include CTSM Issue #): +- Fixes #322 (ERS_D_Ld5.f19_g16.I2000Clm50BgcCruGs run FAIL (intel)) +- Fixes #534 (Rename DEBUG to debug in a few places) +- Fixes #24 for real (ncd_io_1d_log_glob is broken) +- Fixes #529 (Organize usermods_dirs to facilitate running cases with + the right output) + +Science changes since: release-clm5.0.09 + +None + +Software changes since: release-clm5.0.09 + +See above for full list + +Changes to User Interface since: release-clm5.0.09 + +- New namelist variable, just for testing purposes: + for_testing_allow_interp_non_ciso_to_ciso. This bypasses an error + check, and should only be used in tests. + +Testing: +-------- + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - not run + + unit-tests (components/clm/src): + + cheyenne - pass + hobart --- not run + + tools-tests (components/clm/test/tools): + + cheyenne - not run + hobart --- not run + + PTCLM testing (components/clm/tools/shared/PTCLM/test): + + cheyenne - not run + hobart --- not run + + regular tests (aux_clm): + + cheyenne_intel ---- pass + cheyenne_gnu ------ pass + hobart_nag -------- pass + hobart_pgi -------- pass + hobart_intel ------ pass + + regular tests (prealpha): + + cheyenne_intel - not run + cheyenne_gnu --- not run + hobart_nag ----- not run + + regular tests (prebeta): + + cheyenne_intel - not run + cheyenne_gnu --- not run + hobart_nag ----- not run + +Summary of Answer changes: +------------------------- + +Baseline version for comparison: release-clm5.0.09 + +Changes answers relative to baseline: NO + + +Detailed list of changes: +------------------------ + +Externals being used: + + cism: release-cesm2.0.04 + rtm: release-cesm2.0.00 + mosart: release-cesm2.0.00 + cime: cime_cesm2_0_rel_05 + FATES: fates_s1.8.1_a3.0.0 + PTCLM: PTCLM2_180611 + +CTSM Tag versions pulled over from master development branch: +- ctsm1.0.dev014 +- ctsm1.0.dev015 + +Pull Requests that document the changes (include PR ids): +- https://github.com/ESCOMP/ctsm/pull/531 - fix build issue with xlf compiler +- https://github.com/ESCOMP/ctsm/pull/526 - fix cime issue 2822 and pylint chk +- https://github.com/ESCOMP/ctsm/pull/536 - Allow holes in the number of + history tapes and reorganize cmip6 usermods (main PR containing all of + these changes) +- https://github.com/ESCOMP/ctsm/pull/527 - Add carbon_isotope user-mod + directory to turn on c13 and c14 +- https://github.com/ESCOMP/ctsm/pull/539 - Support a %CMIP6DECK compset + modifier + +=============================================================== +=============================================================== Tag name: release-clm5.0.09 Originator(s): erik (Erik Kluzek) Date: Tue Oct 23 00:00:50 MDT 2018