Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates to MYNN-EDMF and Thompson #120

Merged
merged 36 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f0117df
Changes in RUC LSM:
tanyasmirnova Oct 12, 2023
876a1ac
Fire heat flux computation is added to the smoke-dust code.
tanyasmirnova Oct 12, 2023
6b8aa05
Fix the segmentation fault error in computing fire heat flux.
tanyasmirnova Oct 12, 2023
16e640e
updates from HFIP dev branch
joeolson42 Oct 16, 2023
14c5887
missed a variable in the argument for activ_ncloud during the intial …
joeolson42 Oct 17, 2023
fe5322b
Addressed the reviewer's comments.
tanyasmirnova Oct 18, 2023
056f420
Changes in module_sf_ruclsm.F90:
tanyasmirnova Oct 18, 2023
1a56327
Merge remote-tracking branch 'upstream/ufs/dev' into ruclsm_lai
tanyasmirnova Oct 18, 2023
ffb0912
Adding back a missing exclamation point in module_bl_mynn.F90 and add…
joeolson42 Oct 19, 2023
a515ec3
Based on 1-D testing in ESM-SnowMIP a change to computation of snow t…
tanyasmirnova Oct 23, 2023
ce11da7
In module_sf_ruclsm.F90: clean-up comments, changed the constant for …
tanyasmirnova Oct 24, 2023
4541893
Further tweaks to improve the MYNN, will update the attached pdf.
joeolson42 Oct 25, 2023
6d079b8
Hail diagnostic
AndersJensen-NOAA Oct 26, 2023
ed82327
Max hail diameter
AndersJensen-NOAA Oct 26, 2023
1000af7
Fixes after debug
AndersJensen-NOAA Oct 27, 2023
ddf6a5c
real to double for graupel psd parameters
AndersJensen-NOAA Oct 27, 2023
dbfd4e6
Updating snow cloud fractions in MYNN-EDMF and removing redundant log…
joeolson42 Oct 27, 2023
872f488
Addressing comments from Dustin
joeolson42 Oct 29, 2023
277bd48
Addressing comments from Dustin
joeolson42 Oct 29, 2023
b2dc0bf
Adding some comments to describe overall changes.
joeolson42 Oct 29, 2023
5658192
fix typo
joeolson42 Oct 30, 2023
ac108da
Merge branch 'ufs/dev' into mynnthomp_oct2023
joeolson42 Oct 30, 2023
5351c16
Merge branch 'max_hail_mp' into mynnthomp_oct2023
grantfirl Oct 30, 2023
e0991a8
Removed requested by the reviewer commented lines.
tanyasmirnova Nov 2, 2023
6d62ab8
Better range checks for output in surface layer, tweaked cloud fracti…
joeolson42 Nov 3, 2023
ce7a3c0
Updates to Thompson MP after code review
AndersJensen-NOAA Nov 3, 2023
551e503
removing the effective radii limit due to concerns by GFS developers
joeolson42 Nov 3, 2023
6ea2bce
Merge branch 'ufs/dev' into mynnthomp_oct2023
joeolson42 Nov 3, 2023
571cb59
Bug fix for divide by zero in hail size
AndersJensen-NOAA Nov 4, 2023
94bc140
Merge branch 'ufs/dev' into mynnthomp_oct2023
grantfirl Nov 9, 2023
793ec64
add extra condition in line 2655 of module_sf_noahmp_glacier.F90 to a…
grantfirl Nov 9, 2023
d595541
Computation of surface fire heat for use in LSM to rrfs_smoke_wrapper.
tanyasmirnova Nov 9, 2023
851dbfa
Small changes to fire feedback to RUC LSM.
tanyasmirnova Nov 9, 2023
5c8a8c1
Merge branch 'ruclsm_lai' into mynnthomp_oct2023
grantfirl Nov 15, 2023
967740f
fix intent in mp_thompson.meta
grantfirl Nov 15, 2023
fe12e79
Merge branch 'ufs/dev' into mynnthomp_oct2023
grantfirl Nov 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,9 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling,
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_thl ', Diag%det_thl)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_sqv ', Diag%det_sqv)
end if
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%nupdraft ', Diag%nupdraft)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%maxwidth ', Diag%maxwidth)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%maxMF ', Diag%maxMF)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ktop_plume ', Diag%ktop_plume)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ztop_plume ', Diag%ztop_plume)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_h ', Diag%exch_h)
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_m ', Diag%exch_m)
end if
Expand Down
1,654 changes: 851 additions & 803 deletions physics/module_bl_mynn.F90

Large diffs are not rendered by default.

171 changes: 134 additions & 37 deletions physics/module_mp_thompson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
rainprod, evapprod, &
#endif
refl_10cm, diagflag, do_radar_ref, &
max_hail_diam_sfc, &
vt_dbz_wt, first_time_step, &
re_cloud, re_ice, re_snow, &
has_reqc, has_reqi, has_reqs, &
Expand Down Expand Up @@ -1062,6 +1063,8 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
GRAUPELNC, GRAUPELNCV
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT):: &
refl_10cm
REAL, DIMENSION(ims:ime, jms:jme), INTENT(INOUT):: &
max_hail_diam_sfc
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
vt_dbz_wt
LOGICAL, INTENT(IN) :: first_time_step
Expand Down Expand Up @@ -1416,14 +1419,14 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
qcten1(k) = 0.
endif initialize_extended_diagnostics
enddo
lsml = lsm(i,j)
if (is_aerosol_aware .or. merra2_aerosol_aware) then
do k = kts, kte
nc1d(k) = nc(i,k,j)
nwfa1d(k) = nwfa(i,k,j)
nifa1d(k) = nifa(i,k,j)
enddo
else
lsml = lsm(i,j)
do k = kts, kte
if(lsml == 1) then
nc1d(k) = Nt_c_l/rho(k)
Expand Down Expand Up @@ -1679,6 +1682,8 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
(nsteps>1 .and. istep==nsteps) .or. &
(nsteps==1 .and. ndt==1)) THEN

max_hail_diam_sfc(i,j) = hail_mass_99th_percentile(kts, kte, qg1d, t1d, p1d, qv1d)

!> - Call calc_refl10cm()

diagflag_present: IF ( PRESENT (diagflag) ) THEN
Expand Down Expand Up @@ -2464,17 +2469,17 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
!+---+-----------------------------------------------------------------+
!> - Calculate y-intercept, slope values for graupel.
!+---+-----------------------------------------------------------------+
do k = kte, kts, -1
ygra1 = alog10(max(1.E-9, rg(k)))
zans1 = 3.4 + 2./7.*(ygra1+8.) + rand1
N0_exp = 10.**(zans1)
N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
ilamg(k) = 1./lamg
N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
enddo

! do k = kte, kts, -1
! ygra1 = alog10(max(1.E-9, rg(k)))
! zans1 = 3.4 + 2./7.*(ygra1+8.) + rand1
! N0_exp = 10.**(zans1)
! N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
! lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
! lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
! ilamg(k) = 1./lamg
! N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
! enddo
call graupel_psd_parameters(kts, kte, rand1, rg, ilamg, N0_g)
endif

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment lines 2472-2481, 3549-3558, and 6104-6113 can be removed

!+---+-----------------------------------------------------------------+
Expand Down Expand Up @@ -3541,17 +3546,17 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
!+---+-----------------------------------------------------------------+
!> - Calculate y-intercept, slope values for graupel.
!+---+-----------------------------------------------------------------+
do k = kte, kts, -1
ygra1 = alog10(max(1.E-9, rg(k)))
zans1 = 3.4 + 2./7.*(ygra1+8.) + rand1
N0_exp = 10.**(zans1)
N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
ilamg(k) = 1./lamg
N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
enddo

! do k = kte, kts, -1
! ygra1 = alog10(max(1.E-9, rg(k)))
! zans1 = 3.4 + 2./7.*(ygra1+8.) + rand1
! N0_exp = 10.**(zans1)
! N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
! lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
! lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
! ilamg(k) = 1./lamg
! N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
! enddo
call graupel_psd_parameters(kts, kte, rand1, rg, ilamg, N0_g)
endif

!+---+-----------------------------------------------------------------+
Expand Down Expand Up @@ -3589,7 +3594,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
!+---+-----------------------------------------------------------------+ ! DROPLET NUCLEATION
if (clap .gt. eps) then
if (is_aerosol_aware .or. merra2_aerosol_aware) then
xnc = MAX(2., activ_ncloud(temp(k), w1d(k)+rand3, nwfa(k)))
xnc = MAX(2., activ_ncloud(temp(k), w1d(k)+rand3, nwfa(k), lsml))
else
if(lsml == 1) then
xnc = Nt_c_l
Expand Down Expand Up @@ -5366,14 +5371,15 @@ end subroutine table_ccnAct
! TO_DO ITEM: For radiation cooling producing fog, in which case the
!.. updraft velocity could easily be negative, we could use the temp
!.. and its tendency to diagnose a pretend postive updraft velocity.
real function activ_ncloud(Tt, Ww, NCCN)
real function activ_ncloud(Tt, Ww, NCCN, lsm_in)

implicit none
REAL, INTENT(IN):: Tt, Ww, NCCN
INTEGER, INTENT(IN):: lsm_in
REAL:: n_local, w_local
INTEGER:: i, j, k, l, m, n
REAL:: A, B, C, D, t, u, x1, x2, y1, y2, nx, wy, fraction

REAL:: lower_lim_nuc_frac

! ta_Na = (/10.0, 31.6, 100.0, 316.0, 1000.0, 3160.0, 10000.0/) ntb_arc
! ta_Ww = (/0.01, 0.0316, 0.1, 0.316, 1.0, 3.16, 10.0, 31.6, 100.0/) ntb_arw
Expand Down Expand Up @@ -5420,6 +5426,14 @@ real function activ_ncloud(Tt, Ww, NCCN)
l = 3
m = 2

if (lsm_in .eq. 1) then ! land
lower_lim_nuc_frac = 0.
else if (lsm_in .eq. 0) then ! water
lower_lim_nuc_frac = 0.15
else
lower_lim_nuc_frac = 0.15 ! catch-all for anything else
endif

A = tnccn_act(i-1,j-1,k,l,m)
B = tnccn_act(i,j-1,k,l,m)
C = tnccn_act(i,j,k,l,m)
Expand All @@ -5434,7 +5448,8 @@ real function activ_ncloud(Tt, Ww, NCCN)
! u = (w_local-ta_Ww(j-1))/(ta_Ww(j)-ta_Ww(j-1))

fraction = (1.0-t)*(1.0-u)*A + t*(1.0-u)*B + t*u*C + (1.0-t)*u*D

fraction = MAX(fraction, lower_lim_nuc_frac)

! if (NCCN*fraction .gt. 0.75*Nt_c_max) then
! write(*,*) ' DEBUG-GT ', n_local, w_local, Tt, i, j, k
! endif
Expand Down Expand Up @@ -5854,6 +5869,7 @@ subroutine calc_effectRad (t1d, p1d, qv1d, qc1d, nc1d, qi1d, ni1d, qs1d, &
endif
lamc = (nc(k)*am_r*g_ratio(inu_c)/rc(k))**obmr
re_qc1d(k) = SNGL(0.5D0 * DBLE(3.+inu_c)/lamc)
if (lsml .ne. 1) re_qc1d(k) = max(re_qc1d(k), 7.0E-6)
joeolson42 marked this conversation as resolved.
Show resolved Hide resolved
enddo
endif

Expand Down Expand Up @@ -6085,16 +6101,17 @@ subroutine calc_refl10cm (qv1d, qc1d, qr1d, nr1d, qs1d, qg1d, &
!+---+-----------------------------------------------------------------+

if (ANY(L_qg .eqv. .true.)) then
do k = kte, kts, -1
ygra1 = alog10(max(1.E-9, rg(k)))
zans1 = 3.4 + 2./7.*(ygra1+8.) + rand1
N0_exp = 10.**(zans1)
N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
ilamg(k) = 1./lamg
N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
enddo
! do k = kte, kts, -1
! ygra1 = alog10(max(1.E-9, rg(k)))
! zans1 = 3.4 + 2./7.*(ygra1+8.) + rand1
! N0_exp = 10.**(zans1)
! N0_exp = MAX(DBLE(gonv_min), MIN(N0_exp, DBLE(gonv_max)))
! lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
! lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
! ilamg(k) = 1./lamg
! N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
! enddo
call graupel_psd_parameters(kts, kte, rand1, rg, ilamg, N0_g)
endif

!+---+-----------------------------------------------------------------+
Expand Down Expand Up @@ -6471,6 +6488,86 @@ SUBROUTINE semi_lagrange_sedim(km,dzl,wwl,rql,precip,pfsan,dt,R1)

END SUBROUTINE semi_lagrange_sedim

!>\ingroup aathompson
!! @brief Calculates graupel size distribution parameters
!!
!! Calculates graupel intercept and slope parameters for
!! for a vertical column
!!
!! @param[in] kts integer start index for vertical column
!! @param[in] kte integer end index for vertical column
!! @param[in] rand1 real random number for stochastic physics
!! @param[in] rg real array, size(kts:kte) for graupel mass concentration [kg m^3]
!! @param[out] ilamg double array, size(kts:kte) for inverse graupel slope parameter [m]
!! @param[out] N0_g double array, size(kts:kte) for graupel intercept paramter [m-4]
subroutine graupel_psd_parameters(kts, kte, rand1, rg, ilamg, N0_g)

implicit none

integer, intent(in) :: kts, kte
real, intent(in) :: rand1
real, intent(in) :: rg(:)
double precision, intent(out) :: ilamg(:), N0_g(:)

integer :: k
real :: ygra1, zans1
double precision :: N0_exp, lam_exp, lamg

do k = kte, kts, -1
ygra1 = alog10(max(1.e-9, rg(k)))
zans1 = 3.4 + 2./7.*(ygra1+8.) + rand1
N0_exp = 10.**(zans1)
N0_exp = max1(dble(gonv_min), min(N0_exp, dble(gonv_max)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndersJensen-NOAA We settled on changing this to "max" or "dmax1", right? "max1" should be returning an integer that is then cast to double precision, which I don't think is what you want, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see that you already did this and this is outdated.

lam_exp = (N0_exp*am_g*cgg(1)/rg(k))**oge1
lamg = lam_exp * (cgg(3)*ogg2*ogg1)**obmg
ilamg(k) = 1./lamg
N0_g(k) = N0_exp/(cgg(2)*lam_exp) * lamg**cge(2)
enddo

end subroutine graupel_psd_parameters

!>\ingroup aathompson
!! @brief Calculates graupel/hail maximum diameter
!!
!! Calculates graupel/hail maximum diameter (currently the 99th percentile of mass distribtuion)
!! for a vertical column
!!
!! @param[in] kts integer start index for vertical column
!! @param[in] kte integer end index for vertical column
!! @param[in] qg real array, size(kts:kte) for graupel mass mixing ratio [kg kg^-1]
!! @param[in] temperature double array, size(kts:kte) temperature [K]
!! @param[in] pressure double array, size(kts:kte) pressure [Pa]
!! @param[in] qv real array, size(kts:kte) water vapor mixing ratio [kg kg^-1]
!! @param[out] max_hail_diam real maximum hail diameter [m]
function hail_mass_99th_percentile(kts, kte, qg, temperature, pressure, qv) result(max_hail_diam)

implicit none

integer, intent(in) :: kts, kte
real, intent(in) :: qg(:), temperature(:), pressure(:), qv(:)
real :: max_hail_diam

integer :: k
real :: rho(kts:kte), rg(kts:kte), max_hail_column(kts:kte)
double precision :: ilamg(kts:kte), N0_g(kts:kte)
real, parameter :: random_number = 0.

max_hail_column = 0.
rg = 0.
do k = kts, kte
rho(k) = 0.622*pressure(k)/(R*temperature(k)*(max(1.e-10, qv(k))+0.622))
if (qg(k) .gt. R1) then
rg(k) = qg(k)*rho(k)
endif
enddo

call graupel_psd_parameters(kts, kte, random_number, rg, ilamg, N0_g)

where(rg .gt. 1.e-9) max_hail_column = 10.05 * ilamg
max_hail_diam = max_hail_column(kts)

end function hail_mass_99th_percentile

!+---+-----------------------------------------------------------------+
!+---+-----------------------------------------------------------------+
END MODULE module_mp_thompson
Expand Down
7 changes: 4 additions & 3 deletions physics/module_mp_thompson_make_number_concentrations.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
!>\ingroup aathompson
module module_mp_thompson_make_number_concentrations

use machine, only : kind_phys
use physcons, only: PI => con_pi

implicit none
Expand Down Expand Up @@ -35,7 +36,7 @@ elemental real function make_IceNumber (Q_ice, temp)
!IMPLICIT NONE
REAL, PARAMETER:: Ice_density = 890.0
!REAL, PARAMETER:: PI = 3.1415926536
real, intent(in):: Q_ice, temp
real(kind_phys), intent(in):: Q_ice, temp
grantfirl marked this conversation as resolved.
Show resolved Hide resolved
integer idx_rei
real corr, reice, deice
double precision lambda
Expand Down Expand Up @@ -134,7 +135,7 @@ elemental real function make_DropletNumber (Q_cloud, qnwfa)

!IMPLICIT NONE

real, intent(in):: Q_cloud, qnwfa
real(kind_phys), intent(in):: Q_cloud, qnwfa

!real, parameter:: PI = 3.1415926536
real, parameter:: am_r = PI*1000./6.
Expand Down Expand Up @@ -173,7 +174,7 @@ elemental real function make_RainNumber (Q_rain, temp)

IMPLICIT NONE

real, intent(in):: Q_rain, temp
real(kind_phys), intent(in):: Q_rain, temp
double precision:: lambda, N0, qnr
!real, parameter:: PI = 3.1415926536
real, parameter:: am_r = PI*1000./6.
Expand Down
14 changes: 8 additions & 6 deletions physics/module_sf_mynn.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MODULE module_sf_mynn
!
! LAND only:
! "iz0tlnd" namelist option is used to select the following momentum options:
! (default) =0: Zilitinkevich (1995); Czil now set to 0.085
! (default) =0: Zilitinkevich (1995); Czil now set to 0.095
! =1: Czil_new (modified according to Chen & Zhang 2008)
! =2: Modified Yang et al (2002, 2008) - generalized for all landuse
! =3: constant zt = z0/7.4 (original form; Garratt 1992)
Expand Down Expand Up @@ -225,7 +225,7 @@ SUBROUTINE SFCLAY_mynn( &
! (water =1: z0 from Davis et al (2008), zt & zq from COARE3.0/3.5
! only) =2: z0 from Davis et al (2008), zt & zq from Garratt (1992)
! =3: z0 from Taylor and Yelland (2004), zt and zq from COARE 3.0/3.5
!-- iz0tlnd =0: Zilitinkevich (1995) with Czil=0.085,
!-- iz0tlnd =0: Zilitinkevich (1995) with Czil=0.095,
! (land =1: Czil_new (modified according to Chen & Zhang 2008)
! only) =2: Modified Yang et al (2002, 2008) - generalized for all landuse
! =3: constant zt = z0/7.4 (Garratt 1992)
Expand Down Expand Up @@ -947,7 +947,7 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, &
! CONVERT SKIN TEMPERATURES TO POTENTIAL TEMPERATURE:
THSK_lnd(I) = TSK_lnd(I)*THCON(I) !(K)
THVSK_lnd(I) = THSK_lnd(I)*(1.+EP1*qsfc_lnd(I))
if(THVSK_lnd(I) < 170. .or. THVSK_lnd(I) > 360.) &
if(THVSK_lnd(I) < 160. .or. THVSK_lnd(I) > 390.) &
print *,'THVSK_lnd(I)',itimestep,i,THVSK_lnd(I),THSK_lnd(i),tsurf_lnd(i),tskin_lnd(i),qsfc_lnd(i)
endif
if(icy(i)) then
Expand All @@ -956,7 +956,7 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, &
! CONVERT SKIN TEMPERATURES TO POTENTIAL TEMPERATURE:
THSK_ice(I) = TSK_ice(I)*THCON(I) !(K)
THVSK_ice(I) = THSK_ice(I)*(1.+EP1*qsfc_ice(I)) !(K)
if(THVSK_ice(I) < 170. .or. THVSK_ice(I) > 360.) &
if(THVSK_ice(I) < 160. .or. THVSK_ice(I) > 390.) &
print *,'THVSK_ice(I)',itimestep,i,THVSK_ice(I),THSK_ice(i),tsurf_ice(i),tskin_ice(i),qsfc_ice(i)
endif
if(wet(i)) then
Expand All @@ -965,7 +965,7 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, &
! CONVERT SKIN TEMPERATURES TO POTENTIAL TEMPERATURE:
THSK_wat(I) = TSK_wat(I)*THCON(I) !(K)
THVSK_wat(I) = THSK_wat(I)*(1.+EP1*QVSH(I)) !(K)
if(THVSK_wat(I) < 170. .or. THVSK_wat(I) > 360.) &
if(THVSK_wat(I) < 160. .or. THVSK_wat(I) > 390.) &
print *,'THVSK_wat(I)',i,THVSK_wat(I),THSK_wat(i),tsurf_wat(i),tskin_wat(i),qsfc_wat(i)
endif
endif ! flag_iter
Expand Down Expand Up @@ -1380,6 +1380,8 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, &
else
ZNTstoch_lnd(I) = ZNT_lnd(I)
endif
!add limit to prevent ridiculous values of z0 (more than dz/15)
ZNTstoch_lnd(I) = min(ZNTstoch_lnd(I), dz8w1d(i)*0.0666_kind_phys)

!--------------------------------------
! LAND
Expand Down Expand Up @@ -2604,7 +2606,7 @@ SUBROUTINE zilitinkevich_1995(Z_0,Zt,Zq,restar,ustar,KARMAN,&
IF ( IZ0TLND2 .EQ. 1 ) THEN
CZIL = 10.0 ** ( -0.40 * ( Z_0 / 0.07 ) )
ELSE
CZIL = 0.085 !0.075 !0.10
CZIL = 0.095 !0.075 !0.10
END IF

Zt = Z_0*EXP(-KARMAN*CZIL*SQRT(restar))
Expand Down
Loading
Loading