CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
clm_lake Module Reference

This module contains the CLM Lake model. More...

Functions/Subroutines

logical function limit_temperature_by_climatology (xlat_d, xlon_positive)
 
subroutine is_salty (xlat_d, xlon_positive, cannot_freeze, salty)
 
subroutine calculate_z_dz_lake (i, input_lakedepth, clm_lakedepth, z_lake, dz_lake)
 
subroutine, public clm_lake_run (flag_restart, im, km, me, master, fhour, idate, kdt, iopt_lake, iopt_lake_clm, min_lakeice, lakedepth_default, use_lakedepth, dtp, use_lake_model, clm_lake_initialized, frac_grid, frac_ice, lkm, tg3, pgr, zlvl, gt0, prsi, phii, qvcurr, gu0, gv0, xlat_d, xlon_d, ch, cm, dlwsfci, dswsfci, oro_lakedepth, wind, tsfc, flag_iter, flag_lakefreeze, isltyp, rainncprv, raincprv, evap_wat, evap_ice, hflx_wat, hflx_ice, gflx_wat, gflx_ice, ep1d_water, ep1d_ice, tsurf_water, tsurf_ice, tsfc_wat, tisfc, weasdi, snodi, hice, qss_water, qss_ice, cmm_water, cmm_ice, chh_water, chh_ice, uustar_water, uustar_ice, lake_t_snow, albedo, zorlw, zorli, lake_t2m, lake_q2m, weasd, snowd, fice, icy, salty, savedtke12d, snowdp2d, h2osno2d, snl2d, t_grnd2d, t_lake3d, lake_icefrac3d, t_soisno3d, h2osoi_ice3d, h2osoi_liq3d, h2osoi_vol3d, z3d, dz3d, zi3d, t1, qv1, prsl1, input_lakedepth, clm_lakedepth, cannot_freeze, errflg, errmsg)
 
subroutine lakemain (forc_t, forc_pbot, forc_psrf, forc_hgt, forc_hgt_q, forc_hgt_t, forc_hgt_u, forc_q, forc_u, forc_v, forc_lwrad, prec, sabg, lat, z_lake, dz_lake, lakedepth, do_capsnow, h2osno, snowdp, snl, z, dz, zi, h2osoi_vol, h2osoi_liq, h2osoi_ice, t_grnd, t_soisno, t_lake, savedtke1, lake_icefrac, eflx_lwrad_net, eflx_gnet, eflx_sh_tot, eflx_lh_tot, t_ref2m, q_ref2m, dtime, watsat, tksatu, tkmg, tkdry, csol, taux, tauy, ram1, z0mg, ustar_out, errmsg, errflg, xlat_d, xlon_d)
 
subroutine shallakefluxes (forc_t, forc_pbot, forc_psrf, forc_hgt, forc_hgt_q, forc_hgt_t, forc_hgt_u, forc_q, forc_u, forc_v, forc_lwrad, forc_snow, forc_rain, t_grnd, h2osno, snowdp, sabg, lat, dz, dz_lake, t_soisno, t_lake, snl, h2osoi_liq, h2osoi_ice, savedtke1, qflx_prec_grnd, qflx_evap_soi, qflx_evap_tot, eflx_sh_grnd, eflx_lwrad_out, eflx_lwrad_net, eflx_soil_grnd, eflx_sh_tot, eflx_lh_tot, eflx_lh_grnd, t_veg, t_ref2m, q_ref2m, taux, tauy, ram1, ws, ks, eflx_gnet, z0mg, ustar_out, errmsg, errflg, xlat_d, xlon_d)
 Calculates lake temperatures and surface fluxes for shallow lakes.
 
subroutine shallaketemperature (t_grnd, h2osno, sabg, dz, dz_lake, z, zi, z_lake, ws, ks, snl, eflx_gnet, lakedepth, lake_icefrac, snowdp, eflx_sh_grnd, eflx_sh_tot, eflx_soil_grnd, t_lake, t_soisno, h2osoi_liq, h2osoi_ice, savedtke1, watsat, tksatu, tkmg, tkdry, csol, dtime, frac_iceold, qflx_snomelt, imelt, errmsg, errflg, xlat_d, xlon_d)
 
subroutine soilthermprop_lake (snl, dz, zi, z, t_soisno, h2osoi_liq, h2osoi_ice, watsat, tksatu, tkmg, tkdry, csol, tk, cv, tktopsoillay, errmsg, errflg)
 Calculation of thermal conductivities and heat capacities of snow/soil layers
(1) The volumetric heat capacity is calculated as a linear combination in terms of the volumetric fraction of the constituent phases.
 
subroutine phasechange_lake (snl, h2osno, dz, dz_lake, t_soisno, h2osoi_liq, h2osoi_ice, lake_icefrac, t_lake, snowdp, qflx_snomelt, eflx_snomelt, imelt, cv, cv_lake, lhabs)
 Calculation of the phase change within snow, soil, & lake layers:
(1) Check the conditions for which the phase change may take place, i.e., the layer temperature is greater than the freezing point and the ice mass is not equal to zero (i.e. melting),
or the layer temperature is less than the freezing point
and the liquid water mass is greater than the allowable supercooled (i.e. freezing).
(2) Assess the amount of phase change from the energy excess (or deficit) after setting the layer temperature to freezing point, depending on how much water or ice is available.
(3) Re-adjust the ice and liquid mass, and the layer temperature: either to the freezing point if enough water or ice is available to fully compensate, or to a remaining temperature.
 
subroutine shallakehydrology (dz_lake, forc_rain, forc_snow, begwb, qflx_evap_tot, forc_t, do_capsnow, t_grnd, qflx_evap_soi, qflx_snomelt, imelt, frac_iceold, z, dz, zi, snl, h2osno, snowdp, lake_icefrac, t_lake, endwb, snowage, snowice, snowliq, t_snow, t_soisno, h2osoi_ice, h2osoi_liq, h2osoi_vol, qflx_drain, qflx_surf, qflx_infl, qflx_qrgwl, qcharge, qflx_prec_grnd, qflx_snowcap, qflx_snowcap_col, qflx_snow_grnd_pft, qflx_snow_grnd_col, qflx_rain_grnd, qflx_evap_tot_col, soilalpha, zwt, fcov, rootr_column, qflx_evap_grnd, qflx_sub_snow, qflx_dew_snow, qflx_dew_grnd, qflx_rain_grnd_col, watsat, tksatu, tkmg, tkdry, csol, dtime, errmsg, errflg)
 Calculation of Shallow Lake Hydrology. Full hydrology of snow layers is done. However, there is no infiltration, and the water budget is balanced with qflx_qrgwl. Lake water mass is kept constant. The soil is simply maintained at volumetric saturation if ice melting frees up pore space. Likewise, if the water portion alone at some point exceeds pore capacity, it is reduced. This is consistent with the possibility of initializing the soil layer with excess ice. The only real error with that is that the thermal conductivity will ignore the excess ice (and accompanying thickness change).
 
subroutine qsat (t, p, es, esdt, qs, qsdt)
 Computes saturation mixing ratio and the change in saturation mixing ratio with respect to temperature.
 
subroutine tridiagonal (lbc, ubc, lbj, ubj, jtop, numf, filter, a, b, c, r, u)
 
subroutine snowwater (lbc, ubc, num_snowc, filter_snowc, num_nosnowc, filter_nosnowc, snl, do_capsnow, qflx_snomelt, qflx_rain_grnd, qflx_sub_snow, qflx_evap_grnd, qflx_dew_snow, qflx_dew_grnd, dz, dtime, h2osoi_ice, h2osoi_liq, qflx_top_soil)
 Evaluate the change of snow mass and the snow water onto soil. Water flow within snow is computed by an explicit and non-physical based scheme, which permits a part of liquid water over the holding capacity (a tentative value is used, i.e. equal to 0.033*porosity) to percolate into the underlying layer. Except for cases where the porosity of one of the two neighboring layers is less than 0.05, zero flow is assumed. The water flow out of the bottom of the snow pack will participate as the input of the soil water and runoff. This subroutine uses a filter for columns containing snow which must be constructed prior to being called.
 
subroutine snowcompaction (lbc, ubc, num_snowc, filter_snowc, snl, imelt, frac_iceold, t_soisno, h2osoi_ice, h2osoi_liq, dtime, dz)
 Determine the change in snow layer thickness due to compaction and settling. Three metamorphisms of changing snow characteristics are implemented, i.e., destructive, overburden, and melt. The treatments of the former two are from SNTHERM.89 and SNTHERM.99 (1991, 1999). The contribution due to melt metamorphism is simply taken as a ratio of snow ice fraction after the melting versus before the melting.
 
subroutine combinesnowlayers (lbc, ubc, num_snowc, filter_snowc, snl, h2osno, snowdp, dz, zi, t_soisno, h2osoi_ice, h2osoi_liq, z)
 Combine snow layers that are less than a minimum thickness or mass If the snow element thickness or mass is less than a prescribed minimum, then it is combined with a neighboring element.

 
subroutine dividesnowlayers (lbc, ubc, num_snowc, filter_snowc, snl, dz, zi, t_soisno, h2osoi_ice, h2osoi_liq, z)
 Subdivides snow layers if they exceed their prescribed maximum thickness.
 
subroutine combo (dz, wliq, wice, t, dz2, wliq2, wice2, t2)
 Combines two elements and returns the following combined variables: dz, t, wliq, wice.
 
subroutine buildsnowfilter (lbc, ubc, num_nolakec, filter_nolakec, snl, num_snowc, filter_snowc, num_nosnowc, filter_nosnowc)
 Constructs snow filter for use in vectorized loops for snow hydrology.
 
subroutine frictionvelocity (pgridcell, forc_hgt, forc_hgt_u, forc_hgt_t, forc_hgt_q, lbp, ubp, fn, filterp, displa, z0m, z0h, z0q, obu, iter, ur, um, ustar, temp1, temp2, temp12m, temp22m, u10, fv, fm)
 Calculation of the friction velocity, relation for potential temperature and humidity profiles of surface boundary layer.
The scheme is based on the work of Zeng et al. (1998): Intercomparison of bulk aerodynamic algorithms for the computation of sea surface fluxes using TOGA CORE and TAO data. J. Climate, Vol. 11, 2628-2644.

 
real(kind_lake) function stabilityfunc1 (zeta)
 
real(kind_lake) function stabilityfunc2 (zeta)
 
subroutine moninobukini (ur, thv, dthv, zldis, z0m, um, obu)
 
subroutine, public clm_lake_init (con_pi, karman, con_g, con_sbc, con_t0c, rhowater, con_csol, con_cliq, con_hfus, con_hvap, con_rd, con_cp, rholakeice, clm_lake_debug, clm_debug_print, con_eps_model, con_fvirt_model, errmsg, errflg)
 
subroutine lakeini (kdt, isltyp, gt0, snowd, weasd, lakedepth_default, fhour, oro_lakedepth, savedtke12d, snowdp2d, h2osno2d, snl2d, t_grnd2d, t_lake3d, lake_icefrac3d, t_soisno3d, h2osoi_ice3d, h2osoi_liq3d, h2osoi_vol3d, z3d, dz3d, zi3d, fice, hice, min_lakeice, tsfc, use_lake_model, use_lakedepth, im, prsi, xlat_d, xlon_d, clm_lake_initialized, input_lakedepth, tg3, clm_lakedepth, km, me, master, errmsg, errflg)
 

Variables

integer, parameter, public kind_lake = kind_dbl_prec
 
logical, public lakedebug = .false.
 
logical debug_print = .false.
 
logical, parameter pergro = .false.
 
logical, parameter use_etalake = .false.
 
real(kind_lake), parameter etalake = 1.1925*50**(-0.424)
 Set this to your desired value if USE_ETALAKE=.true.
 
integer, parameter nlevsoil = 10
 number of soil layers
 
integer, parameter nlevlake = 10
 number of lake layers
 
integer, parameter nlevsnow = 5
 maximum number of snow layers
 
real(kind_lake), parameter scalez = 0.025_kind_lake
 Soil layer thickness discretization (m)
 
integer, parameter lbp = 1
 pft-index bounds
 
integer, parameter ubp = 1
 
integer, parameter lbc = 1
 column-index bounds
 
integer, parameter ubc = 1
 
integer, parameter num_shlakec = 1
 number of columns in lake filter
 
integer, dimension(1), parameter filter_shlakec = 1
 lake filter (columns)
 
integer, parameter num_shlakep = 1
 number of pfts in lake filter
 
integer, dimension(1), parameter filter_shlakep = 1
 lake filter (pfts)
 
integer, dimension(1), parameter pcolumn = 1
 
integer, dimension(1), parameter pgridcell = 1
 
integer, dimension(1), parameter cgridcell = 1
 gridcell index of column
 
integer, dimension(1), parameter clandunit = 1
 landunit index of column
 
integer, parameter begg = 1
 
integer, parameter endg = 1
 
integer, parameter begl = 1
 
integer, parameter endl = 1
 
integer, parameter begc = 1
 
integer, parameter endc = 1
 
integer, parameter begp = 1
 
integer, parameter endp = 1
 
integer, parameter column =1
 
logical, dimension(1), parameter lakpoi = .true.
 
real(kind_lake), parameter tcrit = 2.5
 critical temperature to determine rain or snow
 
real(kind_lake), parameter tkwat = 0.6
 thermal conductivity of water [W/m/k]
 
real(kind_lake), parameter tkice = 2.290
 thermal conductivity of ice [W/m/k]
 
real(kind_lake), parameter tkairc = 0.023
 thermal conductivity of air [W/m/k]
 
real(kind_lake), parameter snow_bd = 250
 constant snow bulk density (only used in special case here) [kg/m^3]
 
real(kind_lakepi
 ratio of the circumference of a circle to its diameter
 
real(kind_lakevkc
 von Karman constant [-]
 
real(kind_lakegrav
 gravity constant [m/s2]
 
real(kind_lakesb
 stefan-boltzmann constant [W/m2/K4]
 
real(kind_laketfrz
 freezing temperature [K]
 
real(kind_lakedenh2o
 density of liquid water [kg/m3]
 
real(kind_lakedenice
 density of ice [kg/m3]
 
real(kind_lakecpice
 Specific heat of ice [J/kg-K].
 
real(kind_lakecpliq
 Specific heat of water [J/kg-K].
 
real(kind_lakehfus
 Latent heat of fusion for ice [J/kg].
 
real(kind_lakehvap
 Latent heat of evap for water [J/kg].
 
real(kind_lakehsub
 Latent heat of sublimation [J/kg].
 
real(kind_lakeinvhvap
 1/hvap [kg/J]
 
real(kind_lakeinvhsub
 1/hsub [kg/J]
 
real(kind_lakerair
 gas constant for dry air [J/kg/K]
 
real(kind_lakecpair
 specific heat of dry air [J/kg/K]
 
real(kind_lakecon_eps
 ratio of gas constants of air and water vapor [unitless]
 
real(kind_lakeone_minus_con_eps
 1 - con_eps [unitless]
 
real(kind_lakecon_fvirt
 1/con_eps - 1 [unitless]
 
real(kind_lake), parameter, public spval = 1.e36
 special value for missing data (ocean)
 
real(kind_lake), parameter depth_c = 50.
 below the level t_lake3d will be 277.0 !mchen
 
real(kind_lake), parameter zero_h2o = 1e-12
 lower mixing ratio is is treated as zero
 
real(kind_lake), parameter wimp = 0.05
 Water impermeable if porosity less than wimp.
 
real(kind_lake), parameter ssi = 0.033
 Irreducible water saturation of snow.
 
real(kind_lake), parameter cnfac = 0.5
 Crank Nicholson factor between 0 and 1.
 
integer, parameter istsoil = 1
 !soil "water" type
 
real(kind_lake), dimension(19), parameter sand = (/92.,80.,66.,20.,5.,43.,60.,10.,32.,51., 6.,22.,39.7,0.,100.,54.,17.,100.,92./)
 
real(kind_lake), dimension(19), parameter clay = (/ 3., 5.,10.,15.,5.,18.,27.,33.,33.,41.,47.,58.,14.7,0., 0., 8.5,54., 0., 3./)
 
real(kind_lake), dimension(1:nlevlakezlak
 lake z (layers)
 
real(kind_lake), dimension(1:nlevlakedzlak
 lake dz (thickness)
 
real(kind_lake), dimension(1:nlevsoilzsoi
 soil z (layers)
 
real(kind_lake), dimension(1:nlevsoildzsoi
 soil dz (thickness)
 
real(kind_lake), dimension(0:nlevsoilzisoi
 soil zi (interfaces)

 
real, dimension(1:25), parameter saltlk_t = (/ 0.5, 0.,-0.5, 3., 4., 7., 8., 12., 13., 16., 19., 21., 23.5, 25., 26.,24.,23.,20.5,18., 15., 11.5, 8., 4., 1., 0.5/)
 
real, dimension(12), parameter month_length = (/ 31, 29, 31, 30, 31, 30, 31, 30, 30, 31, 30, 31 /)
 
logical, parameter include_all_salty_locations = .false.
 

Detailed Description

This lake scheme was taken from module_sf_lake in WRF 4.3.1, and modified for CCPP by Sam Trahan in June 2022.

The original documentation said:

The lake scheme was retrieved from the Community Land Model version 4.5 (Oleson et al. (2013) [154]) with some modifications by Gu et al. (2015) [74]. It is a one-dimensional mass and energy balance scheme with 20-25 model layers, including up to 5 snow layers on the lake ice, 10 water layers, and 10 soil layers on the lake bottom. The lake scheme is used with actual lake points and lake depth derived from the WPS, and it also can be used with user defined lake points and lake depth in WRF (lake_min_elev and lakedepth_default). The lake scheme is independent of a land surface scheme and therefore can be used with any land surface scheme embedded in WRF. The lake scheme developments and evaluations were included in Subin et al. (2012) [189] and Gu et al. (2015) [74] .