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

Add RAS to CCPP, update SHOC and MG2/3 #378

Merged
merged 29 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ab96404
three files GFS_debug.F90, rrtmg_lw_pre.F90, and rrtmg_sw_pre.F90 are…
SMoorthi-emc Sep 18, 2019
596c435
adding ras
SMoorthi-emc Oct 21, 2019
e071bcd
updating rascnv.meta
SMoorthi-emc Oct 21, 2019
2b42c9e
addingarg_table_rascnv-run to rascnv.F90
SMoorthi-emc Oct 22, 2019
42997f3
updating rascnv.F90 and rascnv.meta
SMoorthi-emc Oct 23, 2019
de0058a
modifying rascvnv and GFS_suite_interstitial to include ras convectio…
SMoorthi-emc Oct 28, 2019
9e906cc
bug fix in rascnv.F90
SMoorthi-emc Nov 1, 2019
5658661
updated master on my fork
SMoorthi-emc Nov 1, 2019
fe8dbe3
Merge branch 'master' of https://github.com/NCAR/ccpp-physics
SMoorthi-emc Nov 1, 2019
d672104
Merge branch 'master' of https://github.com/SMoorthi-emc/ccpp-physics…
SMoorthi-emc Nov 4, 2019
51c13be
after merging with ccpp/physics master on nom04
SMoorthi-emc Nov 6, 2019
af996a7
debugging rascnv in ccpp
SMoorthi-emc Nov 12, 2019
052a0d5
fix ia in rascnv and lat/lon for debug point
SMoorthi-emc Nov 12, 2019
947d7c9
adding RAS and updating mg driver and shoc and and corresponding upda…
SMoorthi-emc Dec 16, 2019
62fb748
after updates to make ras+mg3+shoc reproduce between ipd and ccpp
SMoorthi-emc Dec 28, 2019
647a9cf
updtes to GFS_suite_interstitial.F90 , gcm_shoc.F90, m_micro.F90 with…
SMoorthi-emc Dec 30, 2019
372bd9d
after merging with NCAR/ccpp-physics and some updates
SMoorthi-emc Jan 14, 2020
06aeee6
after updating the code based on climbfuji comments from CCPP
SMoorthi-emc Jan 27, 2020
85b04fb
Adjust long names for hydrometeors
climbfuji Jan 30, 2020
5c7252f
Restore scientific documentation in physics/micro_mg3_0.F90
climbfuji Jan 31, 2020
6e5cc78
Merge pull request #1 from climbfuji/update_longnames_dom_scidoc_micr…
SMoorthi-emc Jan 31, 2020
b7e321b
changing doxygen command in two lines in file micro_mg3.F90
SMoorthi-emc Jan 31, 2020
8a8de17
setting the momentum, sensible and latent heat fluxes over land expor…
SMoorthi-emc Feb 10, 2020
90b5d9a
update gcycle to define tsfco
SMoorthi-emc Feb 19, 2020
a8384f0
seting tem(i) to 0.0 in ugwp_driver_v0.f
SMoorthi-emc Feb 19, 2020
08aa96d
removing some blanks in ugwp_driver_v0.F
SMoorthi-emc Feb 19, 2020
21190a8
fixing a bug in gcycle update
SMoorthi-emc Feb 26, 2020
02a0e7f
fixing a typo in gcycle.F90
SMoorthi-emc Feb 26, 2020
5936661
removing updating tsfco in gcycle when nsstr is on
SMoorthi-emc Feb 27, 2020
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
25 changes: 12 additions & 13 deletions physics/GFS_DCNV_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ end subroutine GFS_DCNV_generic_pre_finalize
subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, do_ca, cplchm,&
isppt_deep, gu0, gv0, gt0, gq0_water_vapor, &
save_u, save_v, save_t, save_qv, ca_deep, &
dqdti, errmsg, errflg)
dqdti, lprnt, ipr, errmsg, errflg)
climbfuji marked this conversation as resolved.
Show resolved Hide resolved

use machine, only: kind_phys

implicit none

integer, intent(in) :: im, levs
logical, intent(in) :: ldiag3d, do_cnvgwd, do_ca, cplchm, isppt_deep
integer, intent(in) :: im, levs, ipr
logical, intent(in) :: ldiag3d, do_cnvgwd, do_ca, cplchm, isppt_deep, lprnt
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 @@ -104,25 +104,24 @@ end subroutine GFS_DCNV_generic_post_finalize
!!
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, &
gq0_water_vapor, ud_mf, dd_mf, dt_mf, con_g, npdf3d, num_p3d, ncnvcld3d, &
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)
cape, tconvtend, qconvtend, uconvtend, vconvtend, lprnt, ipr, errmsg, errflg)
climbfuji marked this conversation as resolved.
Show resolved Hide resolved

use machine, only: kind_phys

implicit none

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

real(kind=kind_phys), intent(in) :: frain, dtf
real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d
real(kind=kind_phys), dimension(im,levs), intent(in) :: save_u, save_v, save_t, save_qv
real(kind=kind_phys), dimension(im,levs), intent(in) :: gu0, gv0, gt0, gq0_water_vapor
real(kind=kind_phys), dimension(im,levs), intent(in) :: ud_mf, dd_mf, dt_mf
real(kind=kind_phys), intent(in) :: con_g
real(kind=kind_phys), dimension(im,levs), intent(in) :: clw_ice, clw_liquid
integer, intent(in) :: npdf3d, num_p3d, ncnvcld3d

real(kind=kind_phys), dimension(im), intent(inout) :: rainc, cldwrk
Expand Down Expand Up @@ -151,7 +150,7 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c
if (.not. ras .and. .not. cscnv) then
if(do_ca) then
do i=1,im
cape(i)=cld1d(i)
cape(i) = cld1d(i)
enddo
endif
if (npdf3d == 3 .and. num_p3d == 4) then
Expand Down Expand Up @@ -186,13 +185,13 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv, do_c
do k=1,levs
do i=1,im
dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain
! dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k)-save_qv(i,k)) * frain
! dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k)-save_qv(i,k)) * frain
du3dt(i,k) = du3dt(i,k) + (gu0(i,k)-save_u(i,k)) * frain
dv3dt(i,k) = dv3dt(i,k) + (gv0(i,k)-save_v(i,k)) * frain

! upd_mf(i,k) = upd_mf(i,k) + ud_mf(i,k) * (con_g*frain)
! dwn_mf(i,k) = dwn_mf(i,k) + dd_mf(i,k) * (con_g*frain)
! det_mf(i,k) = det_mf(i,k) + dt_mf(i,k) * (con_g*frain)
! upd_mf(i,k) = upd_mf(i,k) + ud_mf(i,k) * (con_g*frain)
! dwn_mf(i,k) = dwn_mf(i,k) + dd_mf(i,k) * (con_g*frain)
! det_mf(i,k) = det_mf(i,k) + dt_mf(i,k) * (con_g*frain)
enddo
enddo
endif ! if (ldiag3d)
Expand Down
50 changes: 32 additions & 18 deletions physics/GFS_DCNV_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,22 @@
kind = kind_phys
intent = inout
optional = F
[lprnt]
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
standard_name = flag_print
long_name = control flag for diagnostic print out
units = flag
dimensions = ()
type = logical
intent = inout
optional = F
[ipr]
standard_name = horizontal_index_of_printed_column
long_name = horizontal index of printed column
units = index
dimensions = ()
type = integer
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down Expand Up @@ -377,24 +393,6 @@
kind = kind_phys
intent = in
optional = F
[clw_ice]
standard_name = ice_water_mixing_ratio_convective_transport_tracer
long_name = moist (dry+vapor, no condensates) mixing ratio of ice water in the convectively transported tracer array
units = kg kg-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[clw_liquid]
standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer
long_name = moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array
units = kg kg-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[npdf3d]
standard_name = number_of_3d_arrays_associated_with_pdf_based_clouds
long_name = number of 3d arrays associated with pdf based clouds/mp
Expand Down Expand Up @@ -581,6 +579,22 @@
kind = kind_phys
intent = inout
optional = F
[lprnt]
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
standard_name = flag_print
long_name = control flag for diagnostic print out
units = flag
dimensions = ()
type = logical
intent = inout
optional = F
[ipr]
standard_name = horizontal_index_of_printed_column
long_name = horizontal index of printed column
units = index
dimensions = ()
type = integer
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
37 changes: 18 additions & 19 deletions physics/GFS_MP_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ end subroutine GFS_MP_generic_pre_init
!> \section arg_table_GFS_MP_generic_pre_run Argument Table
!! \htmlinclude GFS_MP_generic_pre_run.html
!!
subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_q, errmsg, errflg)
subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, do_aw, ntcw, nncl, ntrac, gt0, gq0, save_t, save_q, lprnt, ipr, errmsg, errflg)
!
use machine, only: kind_phys

implicit none
integer, intent(in) :: im, levs, ntcw, nncl, ntrac
logical, intent(in) :: ldiag3d, do_aw
integer, intent(in) :: im, levs, ntcw, nncl, ntrac, ipr
logical, intent(in) :: ldiag3d, do_aw, lprnt
real(kind=kind_phys), dimension(im, levs), intent(in) :: gt0
real(kind=kind_phys), dimension(im, levs, ntrac), intent(in) :: gq0

Expand Down Expand Up @@ -86,15 +86,15 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, &
totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, dt3dt, dq3dt, rain_cpl, rainc_cpl, snow_cpl, pwat, &
do_sppt, dtdtr, dtdtc, drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, errmsg, errflg)
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, lprnt, ipr, errmsg, errflg)
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
!
use machine, only: kind_phys

implicit none

integer, intent(in) :: im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac
integer, intent(in) :: im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, ipr
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires
logical, intent(in) :: cal_pre, lssav, ldiag3d, cplflx, cplchm
logical, intent(in) :: cal_pre, lssav, ldiag3d, cplflx, cplchm, lprnt

real(kind=kind_phys), intent(in) :: dtf, frain, con_g
real(kind=kind_phys), dimension(im), intent(in) :: rainc, rain1, xlat, xlon, tsfc
Expand Down Expand Up @@ -159,7 +159,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
onebg = one/con_g

do i = 1, im
rain(i) = rainc(i) + frain * rain1(i) ! time-step convective plus explicit
rain(i) = rainc(i) + frain * rain1(i) ! time-step convective plus explicit
enddo

!> - If requested (e.g. Zhao-Carr MP scheme), call calpreciptype() to calculate dominant
Expand Down Expand Up @@ -211,11 +211,11 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt

if (cal_pre) then ! hchuang: add dominant precipitation type algorithm
!
call calpreciptype (kdt, nrcm, im, ix, levs, levs+1, &
rann, xlat, xlon, gt0, &
gq0(:,:,1), prsl, prsi, &
rain, phii, tsfc, & !input
domr, domzr, domip, doms) ! output
call calpreciptype (kdt, nrcm, im, ix, levs, levs+1, &
rann, xlat, xlon, gt0, &
gq0(:,:,1), prsl, prsi, &
rain, phii, tsfc, & ! input
domr, domzr, domip, doms) ! output
!
! if (lprnt) print*,'debug calpreciptype: DOMR,DOMZR,DOMIP,DOMS '
! &,DOMR(ipr),DOMZR(ipr),DOMIP(ipr),DOMS(ipr)
Expand Down Expand Up @@ -270,7 +270,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
do k=1,levs
do i=1,im
dt3dt(i,k) = dt3dt(i,k) + (gt0(i,k)-save_t(i,k)) * frain
! dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain
! dq3dt(i,k) = dq3dt(i,k) + (gq0(i,k,1)-save_qv(i,k)) * frain
enddo
enddo
endif
Expand All @@ -281,7 +281,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
do k = 1, levs-1
do i = 1, im
if (prsl(i,k) > p850 .and. prsl(i,k+1) <= p850) then
t850(i) = gt0(i,k) - (prsl(i,k)-p850) / &
t850(i) = gt0(i,k) - (prsl(i,k)-p850) / &
(prsl(i,k)-prsl(i,k+1)) * &
(gt0(i,k)-gt0(i,k+1))
endif
Expand All @@ -299,7 +299,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
! determine convective rain/snow by surface temperature
! determine large-scale rain/snow by rain/snow coming out directly from MP

if (lsm/=lsm_ruc) then
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)
Expand All @@ -326,7 +326,8 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
enddo
endif ! lsm==lsm_ruc
elseif( .not. cal_pre) then
if (imp_physics == imp_physics_mg) then ! MG microphysics
if (imp_physics == imp_physics_mg) then ! MG microphysics
tem = con_day / (dtp * con_p001) ! mm / day
do i=1,im
tprcp(i) = max(0.0, rain(i) ) ! clu: rain -> tprcp
if (rain(i)*tem > rainmin) then
Expand Down Expand Up @@ -355,7 +356,7 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt

if (cplchm) then
do i = 1, im
rainc_cpl(i) = rainc_cpl(i) + rainc(i)
rainc_cpl(i) = rainc_cpl(i) + rainc(i)
enddo
endif

Expand All @@ -374,8 +375,6 @@ subroutine GFS_MP_generic_post_run(im, ix, levs, kdt, nrcm, ncld, nncl, ntcw, nt
do i=1,im
pwat(i) = pwat(i) + del(i,k)*(gq0(i,k,1)+work1(i))
enddo
! if (lprnt .and. i == ipr) write(0,*)' gq0=',
! &gq0(i,k,1),' qgrs=',qgrs(i,k,1),' work2=',work2(i),' k=',k
enddo
do i=1,im
pwat(i) = pwat(i) * onebg
Expand Down
32 changes: 32 additions & 0 deletions physics/GFS_MP_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@
kind = kind_phys
intent = inout
optional = F
[lprnt]
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
standard_name = flag_print
long_name = control flag for diagnostic print out
units = flag
dimensions = ()
type = logical
intent = inout
optional = F
[ipr]
standard_name = horizontal_index_of_printed_column
long_name = horizontal index of printed column
units = index
dimensions = ()
type = integer
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down Expand Up @@ -881,6 +897,22 @@
kind = kind_phys
intent = in
optional = F
[lprnt]
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
standard_name = flag_print
long_name = control flag for diagnostic print out
units = flag
dimensions = ()
type = logical
intent = inout
optional = F
[ipr]
standard_name = horizontal_index_of_printed_column
long_name = horizontal index of printed column
units = index
dimensions = ()
type = integer
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
Loading