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

Update master from gmtb/develop 2019/10/16 #340

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
e48c99c
initial addition of CCPP metadata for NoahMP
grantfirl Aug 20, 2019
366378c
Merge branch 'fix_LSM_units' into noahmp
grantfirl Aug 20, 2019
6236796
put sfc_noahmp_drv.f in module; add init/finalize + meta file html br…
grantfirl Aug 20, 2019
747c5a4
fix soil_moisture_content unit error
grantfirl Aug 21, 2019
aa5aec7
add CCPP error variables to sfc_noahmp_drv.f and fix local name error…
grantfirl Aug 21, 2019
e5e6b78
add NoahMP interstitial code (only pre routine needed for GFS suite f…
grantfirl Aug 22, 2019
6c2cab8
send physical constants through the argument list
grantfirl Aug 23, 2019
24b8942
remove WRF error handling in favor of CCPP error handling
grantfirl Aug 24, 2019
1098500
pass errmsg and errflg down call chain
grantfirl Aug 24, 2019
dab6e6d
move NoahMP calculation of julian day and year length to GFS_time_var…
grantfirl Aug 26, 2019
869e874
add MYJ surface layer scheme and MYJ PBL scheme to CCPP
Qingfu-Liu Aug 27, 2019
2dc18d2
add MYJ surface layer scheme and PBL scheme to CCPP
Qingfu-Liu Aug 28, 2019
d0af67a
add set_soilveg to noahmpdrv_init
grantfirl Aug 30, 2019
3e2f892
add calculation of sncovr to GFS_surface_generic_pre_run (not to init…
grantfirl Aug 30, 2019
78523cf
add calculation of sncovr to GFS_phys_time_vary_run (not to init beca…
grantfirl Sep 3, 2019
64f70df
Merge branch 'fix_sncovr' into noahmp
grantfirl Sep 3, 2019
6d04c51
Merge branch 'gmtb/develop' into noahmp
grantfirl Sep 3, 2019
af34508
fix GFS_time_vary_pre.fv3.F90 compilation error
grantfirl Sep 3, 2019
619afe0
add calculation of precipitation variables for NoahMP in GFS_MP_gener…
grantfirl Sep 4, 2019
de728a8
add resetting of sfcprop%t2m and q2m to values from noahmp if noahmp …
grantfirl Sep 5, 2019
775f4ff
(temporarily?) move calculation of precip rates for NoahMP to scheme-…
grantfirl Sep 6, 2019
a311364
Merge branch 'gmtb/develop' into noahmp
grantfirl Sep 10, 2019
e7bb31a
revert whitespace changes to GFS_MP_generic.F90
grantfirl Sep 10, 2019
69c215f
fix bug in metadata table for GFS_phys_time_vary_run for FV3
grantfirl Sep 12, 2019
48d27a6
Merge branch 'myj_from_qingfu' into HEAD
climbfuji Sep 13, 2019
822c647
Revert changes to physics/module_BL_MYJPBL.F90 physics/module_SF_JSFC…
climbfuji Sep 13, 2019
248af59
Convert physics/module_MYJPBL_wrapper.F90 and physics/module_MYJSFC_w…
climbfuji Sep 13, 2019
e8bbc76
Merge branch 'noahmp' of https://github.com/grantfirl/ccpp-physics in…
climbfuji Sep 13, 2019
268f9a5
physics/GFS_time_vary_pre.fv3.F90: trim trailing whitespaces
climbfuji Sep 13, 2019
aadbcfd
Merge branch 'master' of https://github.com/NCAR/ccpp-physics into my…
climbfuji Sep 13, 2019
26ed038
physics/GFS_phys_time_vary.fv3.F90: disable calculation of snocvr in …
climbfuji Sep 16, 2019
d98248a
CMakeLists.txt: compile ./physics/module_SF_JSFC.F90 ./physics/module…
climbfuji Sep 18, 2019
806de33
physics/module_BL_MYJPBL.F90, physics/module_SF_JSFC.F90, physics/mo…
climbfuji Sep 18, 2019
dceac20
physics/module_MYJPBL_wrapper.F90: use double precision floats, remov…
climbfuji Sep 18, 2019
d58c0ea
update SCM version of GFS_time_vary_pre.F90 (matches FV3 version exce…
grantfirl Sep 18, 2019
2442eda
Merge pull request #320 from climbfuji/myj_with_dom_mods
climbfuji Sep 19, 2019
95b887c
Remove TRANSITION mode
climbfuji Sep 20, 2019
d5f0275
Merge branch 'gmtb/develop' into noahmp_scm
grantfirl Sep 20, 2019
3db2144
add calculation of snow cover in GFS_phys_time_vary.scm.F90 to match …
grantfirl Sep 20, 2019
5d776f6
physics/machine.*: add kind_LOGICAL, add metadata for kind_LOGICAL an…
climbfuji Sep 21, 2019
f7ca087
Replace internal kind definitions for MYJ SFC/PBL schemes with import…
climbfuji Sep 21, 2019
92cc1ef
Adding gsd drag suite to ccpp.
mdtoyNOAA Sep 23, 2019
d808b16
Merge pull request #322 from climbfuji/remove_transition_mode
climbfuji Sep 23, 2019
dc74b57
Merge pull request #321 from grantfirl/noahmp_scm
grantfirl Sep 23, 2019
e5828d5
Merge pull request #321 from grantfirl/noahmp_scm
grantfirl Sep 23, 2019
817e0f8
Merge pull request #326 from climbfuji/update_gsd_develop_from_gmtb_d…
climbfuji Sep 24, 2019
89fd370
Incorporated changes suggested in PR review
mdtoyNOAA Sep 24, 2019
6d7eafa
Merge branch 'adding_gsd_drag_suite_to_ccpp' of https://github.com/md…
climbfuji Sep 27, 2019
5b7201d
Revert change to CMakeLists.txt, convert physics/drag_suite.F90 to ne…
climbfuji Sep 27, 2019
78c5910
physics/drag_suite.F90: bugfixes
climbfuji Sep 29, 2019
ecb641e
Merge pull request #327 from climbfuji/drag_suite_dom
grantfirl Oct 3, 2019
848d2c8
three files GFS_debug.F90, rrtmg_lw_pre.F90, and rrtmg_sw_pre.F90 are…
SMoorthi-emc Sep 18, 2019
60a8e10
physics/GFS_debug.F90, physics/rrtmg_lw_pre.F90, physics/rrtmg_sw_pre…
climbfuji Sep 23, 2019
3e38cf6
First pass through GFSv16 updates, excluding SHOC and NoahMP
climbfuji Sep 27, 2019
b4d277e
physics/GFS_surface_composites.F90, physics/GFS_PBL_generic.F90: upda…
climbfuji Oct 7, 2019
78dc94b
Remove debug prints from GFSv16 changes
climbfuji Oct 7, 2019
11e1d3d
Fix the unit conversion for soil moisture content.
tanyasmirnova Oct 7, 2019
a5a15d8
physics/GFS_PBL_generic.F90: bugfix, add missing local variable k1
climbfuji Oct 8, 2019
2191c55
Update NoahMP in CCPP
climbfuji Oct 8, 2019
e1a2451
physics/GFS_PBL_generic.F90: change order of modules
climbfuji Oct 8, 2019
cb60e20
Added semi-implicit time differencing for turbulent form drag and sma…
mdtoyNOAA Oct 8, 2019
b1d5f4c
Added sea_land_ice mask to the parameter list in sfc_drv_ruc. It will…
tanyasmirnova Oct 8, 2019
86e06df
physics/GFS_surface_composites.{F90,meta}: create new interstitial sc…
climbfuji Oct 8, 2019
c0a7aee
physics/cires_ugwp_post.{F90,meta}: add missing block to save diagnos…
climbfuji Oct 8, 2019
8af686d
Merge pull request #334 from tanyasmirnova/ruc_land_ice_v1
climbfuji Oct 8, 2019
325f9b1
Modifications of CMakeLists.txt to support out-of-source builds, requ…
climbfuji Aug 29, 2019
d9d0ff0
physics/sfc_noahmp_drv.meta: bugfix, use interstitial variables over …
climbfuji Oct 9, 2019
4b840ff
physics/GFS_surface_composites.F90: bugfix for surface temperature as…
climbfuji Oct 10, 2019
7fbe839
Bug fix in the unit conversion from [mm] to [m] for liquid rain.
tanyasmirnova Oct 10, 2019
15de364
Use fraction of frozen precipitation SR, computed in GFDL or Thompson…
tanyasmirnova Oct 10, 2019
543f640
Merge pull request #337 from tanyasmirnova/gsd_develop_ructhomp
climbfuji Oct 10, 2019
36d2070
Merge pull request #330 from climbfuji/update_gmtb_develop_with_vlab_…
climbfuji Oct 11, 2019
57e5c69
physics/cires_ugwp_post.F90: use assumed-size arrays for arrays that …
climbfuji Oct 13, 2019
a44ff42
Merge branch 'gsd/develop' of https://github.com/NCAR/ccpp-physics in…
climbfuji Oct 13, 2019
9d6dd01
Merge pull request #333 from mdtoy/gmtb/develop
climbfuji Oct 13, 2019
b9854b3
Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics i…
climbfuji Oct 13, 2019
81e02a7
physics/gwdps.f: remove note that adding intent(in) for certain varia…
climbfuji Oct 13, 2019
cfafb29
Merge pull request #339 from climbfuji/merge_gsd_develop_drag_suite_u…
climbfuji Oct 15, 2019
f3e4180
Merge branch 'gmtb/develop' of https://github.com/NCAR/ccpp-physics i…
climbfuji Oct 16, 2019
d139dbb
physics/sfc_drv_ruc.*: update for GFSv16
climbfuji Oct 18, 2019
3bb41d6
Add / prefix to all source files
climbfuji Oct 21, 2019
774141b
Merge branch 'ccpp_prebuild_out_of_source_build' of https://github.co…
climbfuji Oct 21, 2019
e1a33ba
CMakeLists.txt: extract filename from full path for auto-generated ca…
climbfuji Oct 22, 2019
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
215 changes: 117 additions & 98 deletions CMakeLists.txt

Large diffs are not rendered by default.

62 changes: 30 additions & 32 deletions physics/GFS_DCNV_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ end subroutine GFS_DCNV_generic_pre_finalize
!! \htmlinclude GFS_DCNV_generic_pre_run.html
!!
#endif
subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, cnvgwd, lgocart, do_ca, &
isppt_deep, gu0, gv0, gt0, gq0_water_vapor, &
save_u, save_v, save_t, save_qv, ca_deep, &
subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, &
isppt_deep, gu0, gv0, gt0, gq0_water_vapor, &
save_u, save_v, save_t, save_qv, ca_deep, &
errmsg, errflg)

use machine, only: kind_phys

implicit none

integer, intent(in) :: im, levs
logical, intent(in) :: ldiag3d, cnvgwd, lgocart, do_ca, isppt_deep
logical, intent(in) :: ldiag3d, do_cnvgwd, do_ca, isppt_deep
real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0
real(kind=kind_phys), dimension(im,levs), intent(in) :: gv0
real(kind=kind_phys), dimension(im,levs), intent(in) :: gt0
Expand Down Expand Up @@ -62,13 +62,21 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, cnvgwd, lgocart, do_ca,
save_v(i,k) = gv0(i,k)
enddo
enddo
elseif (cnvgwd) then
save_t(1:im,:) = gt0(1:im,:)
endif ! end if_ldiag3d/cnvgwd
elseif (do_cnvgwd) then
do k=1,levs
do i=1,im
save_t(i,k) = gt0(i,k)
enddo
enddo
endif

if (ldiag3d .or. lgocart .or. isppt_deep) then
save_qv(1:im,:) = gq0_water_vapor(1:im,:)
endif ! end if_ldiag3d/lgocart
if (ldiag3d .or. isppt_deep) then
do k=1,levs
do i=1,im
save_qv(i,k) = gq0_water_vapor(i,k)
enddo
enddo
endif

end subroutine GFS_DCNV_generic_pre_run

Expand All @@ -87,19 +95,19 @@ end subroutine GFS_DCNV_generic_post_finalize
!> \section arg_table_GFS_DCNV_generic_post_run Argument Table
!! \htmlinclude GFS_DCNV_generic_post_run.html
!!
subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, lgocart, ras, cscnv, do_ca, &
subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_ca, &
isppt_deep, frain, rain1, dtf, cld1d, save_u, save_v, save_t, save_qv, gu0, gv0, gt0, &
gq0_water_vapor, ud_mf, dd_mf, dt_mf, con_g, clw_ice, clw_liquid, npdf3d, num_p3d, ncnvcld3d, &
rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, dqdti, &
cnvqci, upd_mfi, dwn_mfi, det_mfi, cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, &
rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, &
cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, &
cape, tconvtend, qconvtend, uconvtend, vconvtend, errmsg, errflg)

use machine, only: kind_phys

implicit none

integer, intent(in) :: im, levs
logical, intent(in) :: lssav, ldiag3d, lgocart, ras, cscnv, do_ca, isppt_deep
logical, intent(in) :: lssav, ldiag3d, ras, cscnv, do_ca, isppt_deep

real(kind=kind_phys), intent(in) :: frain, dtf
real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d
Expand All @@ -114,8 +122,6 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, lgocart, ras, cs
! dt3dt, dq3dt, du3dt, dv3dt upd_mf, dwn_mf, det_mf only allocated if ldiag3d == .true.
real(kind=kind_phys), dimension(:,:), intent(inout) :: dt3dt, dq3dt, du3dt, dv3dt
real(kind=kind_phys), dimension(:,:), intent(inout) :: upd_mf, dwn_mf, det_mf
! dqdti, cnvqci, upd_mfi, dwn_mfi, det_mfi only allocated if ldiag3d == .true. or lgocart == .true.
real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti, cnvqci, upd_mfi, dwn_mfi, det_mfi
real(kind=kind_phys), dimension(im,levs), intent(inout) :: cnvw, cnvc
! The following arrays may not be allocated, depending on certain flags and microphysics schemes.
! Since Intel 15 crashes when passing unallocated arrays to arrays defined with explicit shape,
Expand Down Expand Up @@ -186,24 +192,16 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, lgocart, ras, cs

endif ! if (lssav)

!update dqdt_v to include moisture tendency due to deep convection
! if (lgocart) then
! do k=1,levs
! do i=1,im
! dqdti (i,k) = (gq0_water_vapor(i,k) - save_qv(i,k)) * frain
! upd_mfi(i,k) = upd_mfi(i,k) + ud_mf(i,k) * frain
! dwn_mfi(i,k) = dwn_mfi(i,k) + dd_mf(i,k) * frain
! det_mfi(i,k) = det_mfi(i,k) + dt_mf(i,k) * frain
! cnvqci (i,k) = cnvqci (i,k) + (clw_ice(i,k)+clw_liquid(i,k))*frain
! enddo
! enddo
! endif ! if (lgocart)

if (isppt_deep) then
tconvtend = gt0 - save_t
qconvtend = gq0_water_vapor - save_qv
uconvtend = gu0 - save_u
vconvtend = gv0 - save_v
do k=1,levs
do i=1,im
tconvtend(i,k) = gt0(i,k) - save_t(i,k)
qconvtend(i,k) = gq0_water_vapor(i,k) - save_qv(i,k)
uconvtend(i,k) = gu0(i,k) - save_u(i,k)
vconvtend(i,k) = gv0(i,k) - save_v(i,k)
enddo
enddo
endif

end subroutine GFS_DCNV_generic_post_run
Expand Down
67 changes: 3 additions & 64 deletions physics/GFS_DCNV_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,9 @@
type = logical
intent = in
optional = F
[cnvgwd]
standard_name = flag_convective_gravity_wave_drag
long_name = flag for conv gravity wave drag
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[lgocart]
standard_name = flag_gocart
long_name = flag for 3d diagnostic fields for gocart 1
[do_cnvgwd]
standard_name = flag_for_convective_gravity_wave_drag
long_name = flag for convective gravity wave drag (gwd)
units = flag
dimensions = ()
type = logical
Expand Down Expand Up @@ -192,14 +184,6 @@
type = logical
intent = in
optional = F
[lgocart]
standard_name = flag_gocart
long_name = flag for 3d diagnostic fields for gocart 1
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[ras]
standard_name = flag_for_ras_deep_convection
long_name = flag for ras convection scheme
Expand Down Expand Up @@ -499,51 +483,6 @@
kind = kind_phys
intent = inout
optional = F
[dqdti]
standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection
long_name = instantaneous moisture tendency due to convection
units = kg kg-1 s-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[cnvqci]
standard_name = instantaneous_deep_convective_cloud_condensate_mixing_ratio_on_dynamics_time_step
long_name = instantaneous total convective condensate mixing ratio
units = kg kg-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[upd_mfi]
standard_name = instantaneous_atmosphere_updraft_convective_mass_flux_on_dynamics_timestep
long_name = (updraft mass flux) * delt
units = kg m-2
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[dwn_mfi]
standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux_on_dynamics_timestep
long_name = (downdraft mass flux) * delt
units = kg m-2
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[det_mfi]
standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux_on_dynamics_timestep
long_name = (detrainment mass flux) * delt
units = kg m-2
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[cnvw]
standard_name = convective_cloud_water_mixing_ratio
long_name = moist convective cloud water mixing ratio
Expand Down
8 changes: 2 additions & 6 deletions physics/GFS_GWD_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ end subroutine GFS_GWD_generic_pre_init
!! @{
subroutine GFS_GWD_generic_pre_run( &
& im, levs, nmtvr, mntvar, &
& hprime, oc, oa4, clx, theta, &
& oc, oa4, clx, theta, &
& sigma, gamma, elvmax, lssav, ldiag3d, &
& dtdt, dt3dt, dtf, errmsg, errflg)

Expand All @@ -30,7 +30,7 @@ subroutine GFS_GWD_generic_pre_run( &
real(kind=kind_phys), intent(in) :: mntvar(im,nmtvr)

real(kind=kind_phys), intent(out) :: &
& hprime(im), oc(im), oa4(im,4), clx(im,4), &
& oc(im), oa4(im,4), clx(im,4), &
& theta(im), sigma(im), gamma(im), elvmax(im)

logical, intent(in) :: lssav, ldiag3d
Expand All @@ -49,7 +49,6 @@ subroutine GFS_GWD_generic_pre_run( &
errflg = 0

if (nmtvr == 14) then ! current operational - as of 2014
hprime(:) = mntvar(:,1)
oc(:) = mntvar(:,2)
oa4(:,1) = mntvar(:,3)
oa4(:,2) = mntvar(:,4)
Expand All @@ -64,7 +63,6 @@ subroutine GFS_GWD_generic_pre_run( &
sigma(:) = mntvar(:,13)
elvmax(:) = mntvar(:,14)
elseif (nmtvr == 10) then
hprime(:) = mntvar(:,1)
oc(:) = mntvar(:,2)
oa4(:,1) = mntvar(:,3)
oa4(:,2) = mntvar(:,4)
Expand All @@ -75,7 +73,6 @@ subroutine GFS_GWD_generic_pre_run( &
clx(:,3) = mntvar(:,9)
clx(:,4) = mntvar(:,10)
elseif (nmtvr == 6) then
hprime(:) = mntvar(:,1)
oc(:) = mntvar(:,2)
oa4(:,1) = mntvar(:,3)
oa4(:,2) = mntvar(:,4)
Expand All @@ -86,7 +83,6 @@ subroutine GFS_GWD_generic_pre_run( &
clx(:,3) = 0.0
clx(:,4) = 0.0
else
hprime = 0
oc = 0
oa4 = 0
clx = 0
Expand Down
9 changes: 0 additions & 9 deletions physics/GFS_GWD_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@
kind = kind_phys
intent = in
optional = F
[hprime]
standard_name = standard_deviation_of_subgrid_orography
long_name = standard deviation of subgrid orography
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = out
optional = F
[oc]
standard_name = convexity_of_subgrid_orography
long_name = convexity of subgrid orography
Expand Down
51 changes: 30 additions & 21 deletions physics/GFS_MP_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
enddo
enddo

! Conversion factor mm per physics timestep to m per day
! Conversion factor from mm per day to m per physics timestep
tem = dtp * con_p001 / con_day

!> - For GFDL and Thompson MP scheme, determine convective snow by surface temperature;
Expand All @@ -280,29 +280,38 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
if (imp_physics == imp_physics_gfdl .or. imp_physics == imp_physics_thompson) then
! determine convective rain/snow by surface temperature
! determine large-scale rain/snow by rain/snow coming out directly from MP
do i = 1, im
!tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp ! DH now lines 245-250
srflag(i) = 0. ! clu: default srflag as 'rain' (i.e. 0)
if (tsfc(i) >= 273.15) then
crain = rainc(i)
csnow = 0.0
else
crain = 0.0
csnow = rainc(i)
endif
! if (snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow > rain0(i,1)+crain) then
! if (snow0(i)+ice0(i)+graupel0(i)+csnow > 0.0) then
! Sfcprop%srflag(i) = 1. ! clu: set srflag to 'snow' (i.e. 1)
! endif

if (lsm/=lsm_ruc) then
do i = 1, im
!tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp ! DH now lines 245-250
srflag(i) = 0. ! clu: default srflag as 'rain' (i.e. 0)
if (tsfc(i) >= 273.15) then
crain = rainc(i)
csnow = 0.0
else
crain = 0.0
csnow = rainc(i)
endif
! if (snow0(i,1)+ice0(i,1)+graupel0(i,1)+csnow > rain0(i,1)+crain) then
! if (snow0(i)+ice0(i)+graupel0(i)+csnow > 0.0) then
! Sfcprop%srflag(i) = 1. ! clu: set srflag to 'snow' (i.e. 1)
! endif
! compute fractional srflag
total_precip = snow0(i)+ice0(i)+graupel0(i)+rain0(i)+rainc(i)
if (total_precip > rainmin) then
srflag(i) = (snow0(i)+ice0(i)+graupel0(i)+csnow)/total_precip
endif
enddo
total_precip = snow0(i)+ice0(i)+graupel0(i)+rain0(i)+rainc(i)
if (total_precip > rainmin) then
srflag(i) = (snow0(i)+ice0(i)+graupel0(i)+csnow)/total_precip
endif
enddo
else
! only for RUC LSM
do i=1,im
srflag(i) = sr(i)
enddo
endif ! lsm==lsm_ruc
elseif( .not. cal_pre) then
if (imp_physics == imp_physics_mg) then ! MG microphysics
do i=1,im
tprcp(i) = max(0.0, rain(i) ) ! clu: rain -> tprcp
if (rain(i)*tem > rainmin) then
srflag(i) = max(zero, min(one, (rain(i)-rainc(i))*sr(i)/rain(i)))
else
Expand All @@ -311,7 +320,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
enddo
else
do i = 1, im
tprcp(i) = max(0.0, rain(i) )! clu: rain -> tprcp
tprcp(i) = max(0.0, rain(i) ) ! clu: rain -> tprcp
srflag(i) = 0.0 ! clu: default srflag as 'rain' (i.e. 0)
if (t850(i) <= 273.16) then
srflag(i) = 1.0 ! clu: set srflag to 'snow' (i.e. 1)
Expand Down
Loading