Tags: wanghaibokm/ctsm
Tags
Start adding water tracers to LakeHydrology, and related refactoring Start adding water tracers to LakeHydrology, beginning with some initial things done for snow. This also includes some significant refactoring to allow LakeHydrology to reuse some of the same snow code used for non-lake columns.
Branch tag with the changes needed to create the TRENDY-2019 surface … …datasets 1700 and landuse.timeseries 1700-2018 for the 2019 version of TRENDY simulations. Branch is on the ekluzek fork of ctsm.
Add new prescribed moisture streams feature from Sean Swenson. This a… …llows the user to specify a steams file for soil moisture and use it in place of the model prognostically determining soil moisture. To turn it on set use_soil_moisture_streams=T. You can also set the filename to use with stream_fldfilename_soilm, and there are other _soilm namelist items to control the years to run over. The file MUST be on the same grid as the model resolution. Update 0.125x0.125 mapping and surfdata data, and fix hirespft data issues. Update cime with SSP1-2.6 presaero data. So now can run the SSP1-2.6 CMIP6 future scenario. Update rtm release branch to rtm1_0_69, which brings in a fix for cold starts. Move mksurfdata changes from ctsm1.0.dev053 over, which fixes a rare soil color bug.
Modularize snow cover fraction method This tag moves the calculation of frac_sno - and the related updates of snow_depth - into a new set of classes, with one class for each parameterization (Niu & Yang 2007 and Swenson & Lawrence 2012). Previously, the code always calculated frac_sno the new way, but then possibly overwrote it if using the older Niu & Yang method. The new code cleans this up, only doing the calculations that are needed for each method. In addition, other code that is specific to one of the two methods is now moved to a home that makes this dependence on method explicit. This includes the addition of newsnow to int_snow: previously, int_snow was always updated using an equation specific to the newer CLM5 parameterization of frac_sno, which was not appropriate if using the Niu & Yang parameterization; this doesn't make a difference currently, since int_snow is only referenced if using the Swenson & Lawrence parameterization, but this clears up some confusion. Also, time-constant parameters read from namelist or the netCDF parameter file now reside in the appropriate class rather than being more global. This tag also renames two namelist options to increase clarity: - subgridflag is renamed to use_subgrid_fluxes, and is now a logical - oldfflag is renamed to snow_cover_fraction_method, and is now a string
Fix interp. of surfdat soil layers so we can use interp. for 10SL case
Previously, on master, there was special-purpose code for the 10SL case
that avoided doing interpolation from the surface dataset to the soil
variables in the model. It would be cleaner - especially now that we
allow user-defined soil layer structures - if we could use the general
interpolation code always, rather than sometimes having special-purpose
code that avoids doing the interpolation.
This tag accomplishes that generality. In order to preserve answers for
clm45 cases, I needed to make three changes:
1. The constant 0.025 needed an _r8 appended to it; otherwise, zisoifl
could differ by roundoff from zisoi.
2. I changed which level is used when zisoi(lev) is exactly equal to
zisoifl(j) for some j: I changed the conditional in the following:
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
to:
if (zisoi(lev) > zisoifl(j) .AND. zisoi(lev) <= zisoifl(j+1)) then
Previously, when the zisoi values in the model exactly lined up with
the zisoi values in the file, we would set clay in model level j
equal to the value from level j+1 from the surface dataset (and
similarly for sand and om_frac); in the new code, we use level j from
the surface dataset for model level j in this case.
3. I changed the way zisoifl is calculated for the lowest layer, so that
it matches zisoi(nlevsoi) when running with 10SL_3.5m. Previously, we
had:
zisoi(10) = 0.38018819123227207690E+01
zisoifl(10) = 0.34330930154359391437E+01
This tag changes zisoifl(10) to match zisoi(10).
Soil layer definition clean-up and user-defined option Code clean-up clarifes that there are two types of soil layer definition: the node-based and the thickness-based. User-defined option allows user to specify a soil layer profile in the form of a dzsoi vector (values in meters) in the thickness-based approach. Default nlevsoi for NWP configurations had to change from 5 to 4 for consistency with the new error check described in known bugs below. Other code clean-up removes a couple of sections of repeating code.
Add CN prec. control call to fix problems related to small neg. values Small negative values (roughly roundoff-level different from zero) in frootc (and possibly other quantities) were occasionally creating problems with carbon isotope fluxes and FPI in the first time step of the year, at the time of transient landcover change. This tag fixes the problem by introducing an extra call to SoilBiogeochemPrecisionControl in between computing the patch-level transient landcover fluxes and moving these to column-level. In particular, this truncates small negative values of decomp_cpools_vr_col to zero, which prevents the previous blow-ups. For most of the problematic fields, the explanation seems to be: frootc can sometimes be negative; this is intentional. Negative frootc causes negative dwt_frootc_to_litter if the patch in question is shrinking. The resulting negative fluxes cause problems in the ciso calculation. This can be worked around by inserting an extra precision control call between the calculation of the dwt fluxes and the ciso fluxes, so that small negative dwt fluxes are set to 0. This does not necessarily fully explain the issue with FPI, but the insertion of the extra precision control call fixes that issue, too. For more details, see the discussion in ESCOMP#741 Resolves ESCOMP#741
Correct some of the documentation of the new soilm namelist variables… …. Also remove soilm_mapalgo as has to be none. Also update to ctsm1.0.dev052.
Fix rare soil color bug in mksurfdata_map Under rare conditions, mksurfdata_map could put the default soil color in an output cell where there is actually more information. This tag fixes that issue. None of the out-of-the-box surface datasets are impacted by this bug, so I have not recreated any surface datasets. (I checked all out-of-the-box surface datasets except for surfdata_0.125x0.125_mp24_simyr2000_c150114.nc, because it doesn't get remade cleanly out of the box.) Also: - Add some unit tests for the creation of soil color in mksurfdata_map - Point to correct (existing) surface dataset for year-1850 at f05 resolution
Update water tracers for remainder of first stage of hydrology
Main change is to do tracer updates for final pieces of first stage of
hydrology: HandleNewSnow and UpdateFracH2oSfc. Along with this, I have
introduced greater modularity into these routines (breaking the
operations down into more granular steps).
Other changes included here (somewhat related to the main changes) are:
- Added a routine that resets checked tracers to bulk*ratio to allow
running the tracer consistency check for more than one time step; we
now run it for 10 days
- Change logic for rain-snow conversion terms: Use rain diff in rain to
snow, snow diff in snow to rain. This is less sensitive to roundoff
errors, and was needed in order to get the 10-day tracer consistency
test to pass.
- Setting of qflx_snow_h2osfc moved to CanopyInterceptionAndThroughfall
- Add col%lun_itype. col%lun_itype(ci) is the same as
lun%itype(col%landunit(ci)), but is often a more convenient way to
access this type. I got tired of having to get the landunit index just
for the sake of getting the landunit's type of a given column. I have
NOT gone through the code and replaced lun%itype(l) with
col%lun_itype(c) where applicable, but this will be useful for the
future.
- Removed unnecessary code for backwards compatibility of FH2OSFC from
restart files
- Point to slightly modified initial conditions files for two CLm45
initial conditions files. These two had FH2OSFC > 0 for some glc_mec
points. I'm not sure how that came to be, but Sean Swenson and I think
that shouldn't be the case. This caused soil balance errors in these
tests:
ERS_Ly5_P72x1.f10_f10_musgs.IHistClm45BgcCrop.cheyenne_intel.clm-cropMonthOutput
SMS_D_Ld1.f09_g17.I1850Clm45BgcCruGs.cheyenne_intel.clm-default
I'm fixing the problem by pointing to updated files with FH2OSFC set
to 0 for special landunits, using the following python:
ctypel = dat.variables['cols1d_ityplun'][:]
dat.variables['FH2OSFC'][ctypel > 2] = 0
- Small cime update to fix the SHAREDLIBBUILD phase of
ERS_D_Ln9_P480x3.f19_g16.I2000Clm50SpGs.cheyenne_intel.clm-waccmx_offline
Resolves ESCOMP#718 (Implement water tracers for HandleNewSnow and
FracH2oSfc)
Resolves ESCOMP#498 (Do tracer consistency checks every time step,
not just first)
PreviousNext