diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index e2a5537909..eb679d02f7 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -1668,17 +1668,10 @@ - + - - diff --git a/doc/ChangeLog b/doc/ChangeLog index ea47654875..c6b4938b57 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,126 @@ =============================================================== +Tag name: ctsm1.0.dev058 +Originator(s): slevis (Samuel Levis,SLevis Consulting LLC,303-665-1310) +Date: Thu Aug 22 10:02:49 MDT 2019 +One-line Summary: Soil texture interpolation bug-fix + +Purpose of changes +------------------ + + When assigning soil texture values from dataset soil levels to model + soil levels, we should be comparing zsoi (NOT zisoi) in the model with + zisoi on the file, i.e. we should be asking whether the node + center (NOT interface) of a given model level falls between two + interface depths on the file. + + +Bugs fixed or introduced +------------------------ + +Issues fixed (include CTSM Issue #): #772 + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[X] clm5_0 + +[X] ctsm5_0-nwp + +[ ] clm4_5 + +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 README.CHECKLIST.master_tags 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: + Unexpected failure of test + SMS_D_Ld10.f10_f10_musgs.I2000Clm50BgcCropGs.hobart_nag.clm-tracer_consistency + Bill Sacks did some follow-up testing and concluded that this may be a + compiler-specific issue, so he changed the test from "nag" to "intel" + and generated the new test's corresponding baseline + +Code reviewed by: @billsacks + + +CTSM testing: + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + cheyenne - + + tools-tests (test/tools): + + cheyenne - + + PTCLM testing (tools/shared/PTCLM/test): + + cheyenne - + + python testing (see instructions in python/README.md; document testing done): + + (any machine) - + + regular tests (aux_clm): + + cheyenne ---- OK + hobart ------ OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: + + Summarize any changes to answers, i.e., + - what code configurations: not clm45 + - what platforms/compilers: all + - nature of change: larger than roundoff/same climate + based on the assumption that shifting soil texture assignments by + one level in model soil levels below the top-most level should not + generate climate-changing differences. + +Detailed list of changes +------------------------ + 1. Changed zisoi to zsoi as described in the Purpose section above. + This caused the larger than roundoff changes. Before the fix some + model soil levels were getting assigned soil textures from a deeper + soil level in the dataset than they should. + 2. In the same section of code I completed the if-block to address all + zsoi vs. zisoifl comparisons. This ensures explicit assignment of + soil textures for all model soil levels and avoids leaving some + model soil levels with the texture assignment of the previous model + soil level. + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull/788) + +=============================================================== +=============================================================== Tag name: ctsm1.0.dev057 Originator(s): sacks (Bill Sacks) Date: Tue Aug 20 13:17:39 MDT 2019 diff --git a/doc/ChangeSum b/doc/ChangeSum index 820e2f14f6..1959b5292d 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm1.0.dev058 slevis 08/22/2019 Soil texture interpolation bug-fix ctsm1.0.dev057 sacks 08/20/2019 Fix frac_sno bugs ctsm1.0.dev056 sacks 08/16/2019 Start adding water tracers to LakeHydrology, and related refactoring ctsm1.0.dev055 sacks 08/06/2019 Modularize snow cover fraction method diff --git a/src/biogeophys/SoilStateInitTimeConstMod.F90 b/src/biogeophys/SoilStateInitTimeConstMod.F90 index f719b79f5e..5d2c0cd011 100644 --- a/src/biogeophys/SoilStateInitTimeConstMod.F90 +++ b/src/biogeophys/SoilStateInitTimeConstMod.F90 @@ -158,6 +158,7 @@ subroutine SoilStateInitTimeConst(bounds, soilstate_inst, nlfilename) integer :: begp, endp integer :: begc, endc integer :: begg, endg + integer :: found ! flag that equals 0 if not found and 1 if found !----------------------------------------------------------------------- begp = bounds%begp; endp= bounds%endp @@ -366,25 +367,46 @@ subroutine SoilStateInitTimeConst(bounds, soilstate_inst, nlfilename) else do lev = 1,nlevgrnd + ! Top-most model soil level corresponds to dataset's top-most soil + ! level regardless of corresponding depths if (lev .eq. 1) then clay = clay3d(g,1) sand = sand3d(g,1) om_frac = organic3d(g,1)/organic_max else if (lev <= nlevsoi) then - do j = 1,nlevsoifl-1 - ! NOTE(wjs, 2019-08-01) It appears that the code currently doesn't set - ! clay, sand and om_frac explicitly under some conditions. It probably - ! should. My understanding is that currently things work okay, though, - ! because clay, sand and om_frac will remain set at their previous - ! values, which is probably reasonable enough. See also - ! . - if (zisoi(lev) > zisoifl(j) .AND. zisoi(lev) <= zisoifl(j+1)) then - clay = clay3d(g,j+1) - sand = sand3d(g,j+1) - om_frac = organic3d(g,j+1)/organic_max - endif - end do - else + found = 0 ! reset value + if (zsoi(lev) <= zisoifl(1)) then + ! Search above the dataset's range of zisoifl depths + clay = clay3d(g,1) + sand = sand3d(g,1) + om_frac = organic3d(g,1)/organic_max + found = 1 + else if (zsoi(lev) > zisoifl(nlevsoifl)) then + ! Search below the dataset's range of zisoifl depths + clay = clay3d(g,nlevsoifl) + sand = sand3d(g,nlevsoifl) + om_frac = organic3d(g,nlevsoifl)/organic_max + found = 1 + else + ! For remaining model soil levels, search within dataset's + ! range of zisoifl values. Look for model node depths + ! that are between the dataset's interface depths. + do j = 1,nlevsoifl-1 + if (zsoi(lev) > zisoifl(j) .AND. zsoi(lev) <= zisoifl(j+1)) then + clay = clay3d(g,j+1) + sand = sand3d(g,j+1) + om_frac = organic3d(g,j+1)/organic_max + found = 1 + endif + if (found == 1) exit ! no need to stay in the loop + end do + end if + ! If not found, then something's wrong + if (found == 0) then + write(iulog,*) 'For model soil level =', lev + call endrun(msg="ERROR finding a soil dataset depth to interpolate the model depth to"//errmsg(sourcefile, __LINE__)) + end if + else ! if lev > nlevsoi clay = clay3d(g,nlevsoifl) sand = sand3d(g,nlevsoifl) om_frac = 0._r8