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 dtc/develop from master 2020/07/07 #468

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
e563a91
Update CODEOWNERS for gsd/develop
climbfuji Dec 3, 2019
73717d2
physics/GFS_time_vary_pre.fv3.*: allow for radiation being called on …
climbfuji Dec 6, 2019
e81ee36
Update CODEOWNERS for move to NOAA-GSD
climbfuji Dec 12, 2019
32e245a
Merge pull request #1 from climbfuji/first_n_radiation_calls_on_physi…
DomHeinzeller Dec 12, 2019
bdf4f8e
add qdiag3d support
SamuelTrahanNOAA Dec 19, 2019
a486814
several missing changes for qdiag3d support
SamuelTrahanNOAA Dec 27, 2019
a0286b1
Updating MYNN surface layer scheme
joeolson42 Dec 30, 2019
017ae42
Move Thompson MP initialization logic to mp_thompson_init, fix number…
climbfuji Dec 31, 2019
92f9b63
physics/GFS_rrtmg_pre.F90: turn off cloud effective radii initializat…
climbfuji Dec 31, 2019
a77488d
Further bug fixes to tendency accumulation
SamuelTrahanNOAA Jan 3, 2020
6dcc757
physics/mp_thompson.F90: bugfix, initialize nr_mp from nr and not fro…
climbfuji Jan 6, 2020
4eaa560
Merge pull request #4 from climbfuji/thompson_init_update
DomHeinzeller Jan 6, 2020
1c6cad5
Number Concentrated code moved to interstitial code
hannahcbarnes Jan 6, 2020
a227ad0
fix several bugs mentioned in code review
SamuelTrahanNOAA Jan 6, 2020
ff02358
Bugfix for bit-for-bit identical restart runs
climbfuji Jan 10, 2020
44f9e59
Merge pull request #6 from climbfuji/bugfix_b4b_identical_restarts
DomHeinzeller Jan 12, 2020
4367882
Move PBL tendencies into the PBL run subroutine.
SamuelTrahanNOAA Jan 14, 2020
2850217
add a missing intent(in) to physics/moninedmf.meta
SamuelTrahanNOAA Jan 14, 2020
d5a5278
add ldiag3d and qdiag3d support to physics/module_MYNNPBL_wrapper.F90…
SamuelTrahanNOAA Jan 16, 2020
16f6a02
Merge branch 'NCmove' of https://github.com/hannahcbarnes/ccpp-physic…
climbfuji Jan 22, 2020
8d5fe8c
physics/module_mp_thompson.F90: bugfix, remove threaded computation/r…
climbfuji Jan 23, 2020
6c9e614
Merge branch 'master' of https://github.com/ncar/ccpp-physics into HEAD
climbfuji Jan 27, 2020
3449dd5
Add missing updates from IPD physics commit 7ffe6471c20404091fbbf8f32…
climbfuji Jan 27, 2020
c23b8d1
Add ozone tendencies to ozphys_2015
SamuelTrahanNOAA Jan 28, 2020
a779ea8
Merge pull request #9 from climbfuji/update_gsd_develop_from_master
DomHeinzeller Jan 30, 2020
2ee8e48
Changes in cloud/radiation interaction in GSD physics suite that uses
tanyasmirnova Jan 31, 2020
63303d3
Several changes in the comments.
tanyasmirnova Feb 4, 2020
f110166
Merge branch 'gsd/develop' of https://github.com/noaa-gsd/ccpp-physic…
tanyasmirnova Feb 4, 2020
4ae3591
1.The unnecessary arays NI and NC are removed.
tanyasmirnova Feb 5, 2020
15f36e7
Correct tendency flag names, implement some more diagnostic tendencie…
SamuelTrahanNOAA Feb 6, 2020
47b26be
merge gsd/develop
SamuelTrahanNOAA Feb 7, 2020
a76c066
Workaround/bugfix for correct initialization of Thompson aerosol surf…
climbfuji Feb 12, 2020
ba242de
Merge pull request #14 from climbfuji/bugfix_thompson_init
DomHeinzeller Feb 13, 2020
d2f38dd
Reorganize interstitial code around convection, bugfixes for Hannah's…
climbfuji Feb 13, 2020
f0e8369
Merge branch 'gsd/develop' of https://github.com/noaa-gsd/ccpp-physic…
climbfuji Feb 13, 2020
c796456
Merge branch 'bugfix_threading_thompson' of https://github.com/climbf…
climbfuji Feb 13, 2020
1a3c4d1
All gfs v15p2 and v16beta 3d diagnostic tendencies look reasonable
SamuelTrahanNOAA Feb 13, 2020
d632cd5
Merge branch 'gsd/develop' of https://github.com/noaa-gsd/ccpp-physic…
tanyasmirnova Feb 13, 2020
4261b15
QC, Qi and NWFA are not needed in the parameters list as they come into
tanyasmirnova Feb 14, 2020
cebdfa4
Minor cleanup of physics/GFS_suite_interstitial.F90
climbfuji Feb 17, 2020
e9621ef
Merge pull request #15 from climbfuji/move_number_concentration_bugfi…
DomHeinzeller Feb 18, 2020
1e5bbc8
Merge branch 'gsd-dev-clouds' of https://github.com/tanyasmirnova/ccp…
climbfuji Feb 21, 2020
3a852e8
physics/GFS_PBL_generic.F90: add missing tracers to vertical diffusio…
climbfuji Feb 21, 2020
f273e40
Merge pull request #1 from NOAA-GSD/gsd/develop
joeolson42 Feb 28, 2020
762f7f4
Update to MYNN Surface Layer Scheme and related modules - part I
joeolson42 Feb 28, 2020
b4918a4
Model tendencies add up to total change in 3 hours for the gfs v16 be…
SamuelTrahanNOAA Mar 4, 2020
abde3d0
Remove debug prints and commented-out code. One piece of commented-ou…
SamuelTrahanNOAA Mar 4, 2020
2edeead
Bugfixes: uninitialized data before entering effective radii calculat…
climbfuji Mar 12, 2020
d1ef650
Merge pull request #16 from climbfuji/gsd-dev-clouds_thompson-no-aero…
DomHeinzeller Mar 13, 2020
fe74f5a
Merge branch 'gsd/develop' of https://github.com/joeolson42/ccpp-phys…
climbfuji Mar 17, 2020
5960e5e
Cosmetic changes to physics/GFS_debug.F90
climbfuji Mar 17, 2020
10e357f
physics/module_MYNNSFC_wrapper.F90: add comment about CCPP being able…
climbfuji Mar 20, 2020
92b6ee8
physics/module_MYNNSFC_wrapper.F90: perform unit conversion m <-> cm …
climbfuji Mar 23, 2020
65da24e
physics/GFS_surface_composites.*: initialize composites uustar_*, qss…
climbfuji Mar 23, 2020
a6f3ded
Updates from @joeolson42 for physics/module_MYNNSFC_wrapper.F90, phys…
climbfuji Mar 26, 2020
afd6481
Compile physics/module_sf_mynn.F90 with -O1 instead of -O2 to avoid a…
climbfuji Apr 1, 2020
fadc3cd
Merge pull request #19 from climbfuji/mynnsfclay_from_joe_in_latest_code
DomHeinzeller Apr 3, 2020
e4b80ea
Merge gsd/develop (untested)
SamuelTrahanNOAA Apr 3, 2020
680c365
Remove code that does not belong to CCPP, minor formatting changes an…
climbfuji Apr 16, 2020
5e99073
Update standard names as per code review
climbfuji Apr 16, 2020
344c852
Merge pull request #2 from NOAA-GSD/gsd/develop
joeolson42 Apr 17, 2020
8d9b799
Updating MYNN-EDMF part I: ccpp-physics part
joeolson42 Apr 17, 2020
43f107c
Add new CCPP scheme phys_tend to sum up all physics tendencies
climbfuji Apr 17, 2020
0ef2dba
tweak update: (1) slightly reduce high RH bias at 700 mb, (2) allow s…
joeolson42 Apr 20, 2020
8056b68
Bug fix: (1) ambiguous conditional for defining Fng, (2) alleviate ex…
joeolson42 Apr 21, 2020
d7bcc47
Bug fixes for uninitialized variables...
joeolson42 Apr 22, 2020
314c5f5
Merge pull request #21 from climbfuji/tendencies_sam_with_dom_mods
DomHeinzeller Apr 22, 2020
531d557
Fixes to run the CCPP multi_gases option with 32 bit
XiaqiongZhou-NOAA Apr 28, 2020
d0c9248
bug fix for restart applications
joeolson42 Apr 28, 2020
6f64482
Merge branch 'gsd/develop' of https://github.com/joeolson42/ccpp-phys…
climbfuji Apr 28, 2020
ffee333
Merge pull request #23 from climbfuji/joe_mynnpbl_update_based_on_lat…
DomHeinzeller Apr 29, 2020
3826fd9
Updated GSL orographic drag suite to enable use of custom orographic …
mdtoyNOAA May 1, 2020
bbc6f33
Number concentration bug and code clean up in GFS_suite_interstitial_…
hannahcbarnes May 13, 2020
238c84c
fix bugs found in pbl and ozone 3d diagnostic tendencies (#27)
SamuelTrahanNOAA May 14, 2020
9c7fa58
Merge branch 'master' of https://github.com/NCAR/ccpp-physics into HEAD
climbfuji May 15, 2020
187a69c
Bugfixes for cu_gf_driver, cu_ntiedtke and module_MYNNPBL_wrapper rel…
climbfuji May 15, 2020
6d2cdfb
Fix bugs from merge process
climbfuji May 15, 2020
6e4c787
Move canopy heat storage calculation of reduced latent/sensible heat …
climbfuji May 19, 2020
e585f50
Merge branch 'gsd/develop' of https://github.com/NOAA-GSD/ccpp-physic…
mdtoyNOAA May 19, 2020
7d7c2ca
physics/rrtmgp_lw_cloud_sampling.*, physics/rrtmgp_sw_cloud_sampling.…
climbfuji May 20, 2020
4b5c379
Remove physics/GFS_suite_init_finalize_test.*
climbfuji May 20, 2020
b328abb
Merge of latest GSL drag suite with latest updates on NOAA-GSD repo, …
mdtoyNOAA May 20, 2020
06473f6
Merge pull request #28 from climbfuji/update_gsd_develop_from_master
DomHeinzeller May 20, 2020
5f01f22
Merge branch 'gsd/develop' of https://github.com/NOAA-GSD/ccpp-physic…
climbfuji May 26, 2020
d44e2e7
Clean up use of horizontal_dimension versus horizontal_loop_extent in…
climbfuji May 27, 2020
b3c070d
physics/GFS_debug.F90: bugfix for conditionally allocated variables
climbfuji May 27, 2020
fca0786
physics/GFS_phys_time_vary.fv3.meta: bugfix, use correct dimensions i…
climbfuji May 27, 2020
2354a89
physics/module_bl_mynn.F90: fix compiler warning
climbfuji May 27, 2020
6d6dd49
physics/mp_thompson.{F90,meta}: revert workaround in mp_thompson_init…
climbfuji May 27, 2020
5e5cfb3
Minor bugfixes for handling conditionally allocated variables
climbfuji May 27, 2020
ecd6777
Remove legacy code in physics/module_mp_thompson.F90
climbfuji May 28, 2020
64e8ff6
Merge pull request #29 from climbfuji/gsd_develop_blocked_data_struct…
DomHeinzeller Jun 1, 2020
d9816a2
physics/mp_thompson.{F90,meta}: cleanup use of optional arguments for…
climbfuji Jun 2, 2020
a219a47
physics/GFS_rrtmg_pre.F90: cleanup calculation of cloud effective rad…
climbfuji Jun 2, 2020
2aa91ae
physics/GFS_suite_interstitial.F90: update of calculation of number c…
climbfuji Jun 2, 2020
02bdecf
Merge pull request #30 from climbfuji/thompson_mp_cloud_effective_rad…
DomHeinzeller Jun 3, 2020
7c8d43c
Merge branch 'updated_GSL_drag_suite_apr2020' of https://github.com/m…
climbfuji Jun 3, 2020
b271cf7
mp_thompson_post.F90: print statistics about tendency limiter use onl…
climbfuji Jun 3, 2020
56d3bda
Follow up commit for Cleanup of Thompson MP cloud effective radii cal…
joeolson42 Jun 4, 2020
def46ff
Implement option to roll back Thompson MP to WRFV3.8.1 used in RAPv5/…
climbfuji Jun 4, 2020
a40b653
Merge branch 'gsd/develop' of https://github.com/NOAA-GSD/ccpp-physic…
climbfuji Jun 4, 2020
72ac01d
updating comment to provide more general meaning
joeolson42 Jun 4, 2020
c41d691
physics/module_mp_thompson.F90: add guard to prevent running Thompson…
climbfuji Jun 4, 2020
8fd1674
remove progcld6 and thompson & wsm6 flags
joeolson42 Jun 4, 2020
3a48b23
Merge pull request #32 from climbfuji/add_drag_suite_and_other_updates
DomHeinzeller Jun 5, 2020
42d2e67
Merge branch 'gsd/develop' of https://github.com/joeolson42/ccpp-phys…
climbfuji Jun 5, 2020
fc9a06d
Correct typos in comments in physics/module_SGSCloud_RadPre.F90
climbfuji Jun 5, 2020
3b0f7c2
Merge pull request #35 from climbfuji/radcloud_cleanup
DomHeinzeller Jun 5, 2020
6b5bbfa
Merge pull request #1 from NOAA-GSD/gsd/develop
joeolson42 Jun 5, 2020
90c83b5
MYNNPBL wrapper update to include all required variables for ocean co…
joeolson42 Jun 5, 2020
3f9c520
Merge branch 'gsd/develop' of https://github.com/NOAA-GSD/ccpp-physic…
climbfuji Jun 5, 2020
990ffba
Add stochastic perturbation variables to mp_thompson.F90, bugfix in m…
climbfuji Jun 5, 2020
45e6b4e
Removing del and ix. using the *_reduced_by_... versions of hflx and …
joeolson42 Jun 5, 2020
840f135
Removing the im dimension specification of the *_cpl arrays, and maki…
joeolson42 Jun 5, 2020
755de19
Updates to MYNN-EDMF
joeolson42 Jun 5, 2020
49b7f3c
Update to MYNN sfc layer scheme
joeolson42 Jun 5, 2020
43821e3
2 small cosmetic updates, no impact on model behavior.
joeolson42 Jun 8, 2020
84047fe
Merge pull request #36 from joeolson42/gsd/develop
DomHeinzeller Jun 9, 2020
626ec0e
Clean up of effective radii calculation for Thompson MP: move initial…
climbfuji Jun 9, 2020
647d676
Merge branch 'gsd/develop' of https://github.com/NOAA-GSD/ccpp-physic…
climbfuji Jun 9, 2020
4619424
physics/module_mp_thompson.F90: update comment on possible bug in nc …
climbfuji Jun 9, 2020
1d8328c
Merge pull request #1 from NOAA-GSD/gsd/develop
benwgreen Jun 10, 2020
783ccf9
Merge pull request #34 from climbfuji/rollback_thompson
DomHeinzeller Jun 12, 2020
785cc52
Merge branch 'master' of https://github.com/NCAR/ccpp-physics into HEAD
climbfuji Jun 17, 2020
4e9bf5d
Merge branch 'gsd/develop' of https://github.com/benwgreen/ccpp-physi…
Jun 18, 2020
e889b03
Mods to GSL physics for fractional
Jun 18, 2020
2d5ca0b
Merge remote-tracking branch 'origin/gsd/develop' into bwg_mod_for_frac
Jun 18, 2020
707dece
Cosmetic changes to MYNNPBL
Jun 18, 2020
008cf1a
Merge pull request #2 from NOAA-GSD/gsd/develop
joeolson42 Jun 18, 2020
1315db3
MYNN-EDMF wrapper bug fix: mis-handling ozone when using GFDL microph…
joeolson42 Jun 18, 2020
37719da
cleanup of .meta file order to match corresponding .F90
Jun 18, 2020
cb28c67
Merge branch 'gsd/develop' of https://github.com/joeolson42/ccpp-phys…
climbfuji Jun 18, 2020
10eaa1a
Merge pull request #37 from climbfuji/update_gsd_develop_from_master_…
DomHeinzeller Jun 19, 2020
d4c6755
Merge remote-tracking branch 'NCAR/master' into rt_multigases
XiaqiongZhou-NOAA Jun 22, 2020
0d6db42
Merge branch 'gsd/develop' of https://github.com/NOAA-GSD/ccpp-physic…
climbfuji Jun 25, 2020
728c076
physics/module_MYNNPBL_wrapper.F90: modify coupling code as suggested…
climbfuji Jun 25, 2020
022ae37
Merge pull request #41 from climbfuji/ben_bwg_mod_for_frac
DomHeinzeller Jun 25, 2020
46d0200
Merge pull request #3 from NOAA-GSD/gsd/develop
joeolson42 Jun 26, 2020
3e214f7
Updates to module_SGSCloud_RadPre.F90 and .meta (from Tanya)
joeolson42 Jun 26, 2020
37e799e
Merge pull request #42 from joeolson42/gsd/develop
DomHeinzeller Jun 29, 2020
daddd74
Cleanup/revert changes after merge of gsd/develop into master
climbfuji Jun 30, 2020
8a90168
Merge pull request #465 from climbfuji/update_master_from_gsl_develop…
climbfuji Jul 2, 2020
44d3891
Merge remote-tracking branch 'NCAR/master' into rt_multigases
XiaqiongZhou-NOAA Jul 2, 2020
01c2257
Merge pull request #444 from XiaqiongZhou-NOAA/rt_multigases
climbfuji Jul 7, 2020
5d956e6
Merge branch 'master' of https://github.com/NCAR/ccpp-physics into HEAD
climbfuji Jul 7, 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
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,17 @@ elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
${CMAKE_CURRENT_SOURCE_DIR}/physics/cu_gf_sh.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_bl_mynn.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNPBL_wrapper.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNSFC_wrapper.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNrad_pre.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_MYNNrad_post.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_mp_thompson_make_number_concentrations.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_SF_JSFC.F90
${CMAKE_CURRENT_SOURCE_DIR}/physics/module_BL_MYJPBL.F90
PROPERTIES COMPILE_FLAGS "-r8 -ftz")

# Reduce optimization for module_sf_mynn.F90 (to avoid an apparent compiler bug with Intel 18 on Hera)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90
PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS_OPT} -O1")
list(APPEND SCHEMES_SFX_OPT ${CMAKE_CURRENT_SOURCE_DIR}/physics/module_sf_mynn.F90)

# Replace -xHost or -xCORE-AVX2 with -xCORE-AVX-I for certain files
set(CMAKE_Fortran_FLAGS_LOPT1 ${CMAKE_Fortran_FLAGS_OPT})
string(REPLACE "-xHOST" "-xCORE-AVX-I"
Expand Down
40 changes: 22 additions & 18 deletions physics/GFS_DCNV_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ end subroutine GFS_DCNV_generic_pre_init
subroutine GFS_DCNV_generic_pre_finalize()
end subroutine GFS_DCNV_generic_pre_finalize

#if 0
!> \brief Interstitial scheme called prior to any deep convective scheme to save state variables for calculating tendencies after the deep convective scheme is executed
!! \section arg_table_GFS_DCNV_generic_pre_run Argument Table
!! \htmlinclude GFS_DCNV_generic_pre_run.html
!!
#endif
subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, cplchm, &
gu0, gv0, gt0, gq0_water_vapor, &
save_u, save_v, save_t, save_qv, ca_deep, &
dqdti, errmsg, errflg)
subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, qdiag3d, do_cnvgwd, cplchm,&
gu0, gv0, gt0, gq0_water_vapor, &
save_u, save_v, save_t, save_qv, dqdti, &
errmsg, errflg)

use machine, only: kind_phys

implicit none

integer, intent(in) :: im, levs
logical, intent(in) :: ldiag3d, do_cnvgwd, cplchm
logical, intent(in) :: ldiag3d, qdiag3d, do_cnvgwd, cplchm
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 All @@ -36,7 +34,6 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, cplchm,
real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_v
real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_t
real(kind=kind_phys), dimension(im,levs), intent(inout) :: save_qv
real(kind=kind_phys), dimension(im), intent(in) :: ca_deep
! dqdti only allocated if cplchm is .true.
real(kind=kind_phys), dimension(:,:), intent(inout) :: dqdti
character(len=*), intent(out) :: errmsg
Expand Down Expand Up @@ -65,7 +62,7 @@ subroutine GFS_DCNV_generic_pre_run (im, levs, ldiag3d, do_cnvgwd, cplchm,
enddo
endif

if (ldiag3d .or. cplchm) then
if ((ldiag3d.and.qdiag3d) .or. cplchm) then
do k=1,levs
do i=1,im
save_qv(i,k) = gq0_water_vapor(i,k)
Expand Down Expand Up @@ -94,19 +91,20 @@ 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, ras, cscnv, &
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, npdf3d, num_p3d, ncnvcld3d, &
rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, &
cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, &
errmsg, errflg)
subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, qdiag3d, ras, cscnv, &
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, npdf3d, num_p3d, ncnvcld3d, &
rainc, cldwrk, dt3dt, dq3dt, du3dt, dv3dt, upd_mf, dwn_mf, det_mf, &
cnvw, cnvc, cnvw_phy_f3d, cnvc_phy_f3d, flag_for_dcnv_generic_tend, errmsg, errflg)


use machine, only: kind_phys

implicit none

integer, intent(in) :: im, levs
logical, intent(in) :: lssav, ldiag3d, ras, cscnv
logical, intent(in) :: lssav, ldiag3d, qdiag3d, ras, cscnv
logical, intent(in) :: flag_for_dcnv_generic_tend

real(kind=kind_phys), intent(in) :: frain, dtf
real(kind=kind_phys), dimension(im), intent(in) :: rain1, cld1d
Expand Down Expand Up @@ -165,11 +163,10 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv,
cldwrk (i) = cldwrk (i) + cld1d(i) * dtf
enddo

if (ldiag3d) then
if (ldiag3d .and. flag_for_dcnv_generic_tend) then
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
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

Expand All @@ -178,6 +175,13 @@ subroutine GFS_DCNV_generic_post_run (im, levs, lssav, ldiag3d, ras, cscnv,
! det_mf(i,k) = det_mf(i,k) + dt_mf(i,k) * (con_g*frain)
enddo
enddo
if(qdiag3d) then
do k=1,levs
do i=1,im
dq3dt(i,k) = dq3dt(i,k) + (gq0_water_vapor(i,k)-save_qv(i,k)) * frain
enddo
enddo
endif
endif ! if (ldiag3d)

endif ! if (lssav)
Expand Down
32 changes: 23 additions & 9 deletions physics/GFS_DCNV_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
type = logical
intent = in
optional = F
[qdiag3d]
standard_name = flag_tracer_diagnostics_3D
long_name = flag for 3d tracer diagnostic fields
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[do_cnvgwd]
standard_name = flag_for_convective_gravity_wave_drag
long_name = flag for convective gravity wave drag (gwd)
Expand Down Expand Up @@ -113,15 +121,6 @@
kind = kind_phys
intent = inout
optional = F
[ca_deep]
standard_name = fraction_of_cellular_automata_for_deep_convection
long_name = fraction of cellular automata for deep convection
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[dqdti]
standard_name = instantaneous_water_vapor_specific_humidity_tendency_due_to_convection
long_name = instantaneous moisture tendency due to convection
Expand Down Expand Up @@ -185,6 +184,14 @@
type = logical
intent = in
optional = F
[qdiag3d]
standard_name = flag_tracer_diagnostics_3D
long_name = flag for 3d tracer diagnostic fields
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 @@ -486,6 +493,13 @@
kind = kind_phys
intent = inout
optional = F
[flag_for_dcnv_generic_tend]
standard_name = flag_for_generic_deep_convection_tendency
long_name = true if GFS_DCNV_generic should calculate tendencies
units = flag
dimensions = ()
type = logical
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
41 changes: 33 additions & 8 deletions physics/GFS_GWD_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ end subroutine GFS_GWD_generic_pre_init
subroutine GFS_GWD_generic_pre_run( &
& im, levs, nmtvr, mntvar, &
& oc, oa4, clx, theta, &
& varss, ocss, oa4ss, clxss, &
& sigma, gamma, elvmax, lssav, ldiag3d, &
& dtdt, dt3dt, dtf, errmsg, errflg)
& dudt, dvdt, dtdt, du3dt, dv3dt, dt3dt, dtf, &
& flag_for_gwd_generic_tend, errmsg, errflg)

use machine, only : kind_phys
implicit none
Expand All @@ -29,12 +31,13 @@ subroutine GFS_GWD_generic_pre_run( &

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

logical, intent(in) :: lssav, ldiag3d
real(kind=kind_phys), intent(in) :: dtdt(im,levs)
logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend
real(kind=kind_phys), intent(in) :: dtdt(im,levs), dudt(im,levs), dvdt(im,levs)
! dt3dt only allocated only if ldiag3d is .true.
real(kind=kind_phys), intent(inout) :: dt3dt(:,:)
real(kind=kind_phys), intent(inout) :: dt3dt(:,:), du3dt(:,:), dv3dt(:,:)
real(kind=kind_phys), intent(in) :: dtf

character(len=*), intent(out) :: errmsg
Expand Down Expand Up @@ -80,6 +83,26 @@ subroutine GFS_GWD_generic_pre_run( &
clx(:,2) = 0.0
clx(:,3) = 0.0
clx(:,4) = 0.0
elseif (nmtvr == 24) then ! GSD_drag_suite
oc(:) = mntvar(:,2)
oa4(:,1) = mntvar(:,3)
oa4(:,2) = mntvar(:,4)
oa4(:,3) = mntvar(:,5)
oa4(:,4) = mntvar(:,6)
clx(:,1) = mntvar(:,7)
clx(:,2) = mntvar(:,8)
clx(:,3) = mntvar(:,9)
clx(:,4) = mntvar(:,10)
varss(:) = mntvar(:,15)
ocss(:) = mntvar(:,16)
oa4ss(:,1) = mntvar(:,17)
oa4ss(:,2) = mntvar(:,18)
oa4ss(:,3) = mntvar(:,19)
oa4ss(:,4) = mntvar(:,20)
clxss(:,1) = mntvar(:,21)
clxss(:,2) = mntvar(:,22)
clxss(:,3) = mntvar(:,23)
clxss(:,4) = mntvar(:,24)
else
oc = 0
oa4 = 0
Expand All @@ -91,10 +114,12 @@ subroutine GFS_GWD_generic_pre_run( &
endif ! end if_nmtvr

if (lssav) then
if (ldiag3d) then
if (ldiag3d .and. flag_for_gwd_generic_tend) then
do k=1,levs
do i=1,im
dt3dt(i,k) = dt3dt(i,k) - dtdt(i,k)*dtf
du3dt(i,k) = du3dt(i,k) - dudt(i,k)*dtf
dv3dt(i,k) = dv3dt(i,k) - dvdt(i,k)*dtf
enddo
enddo
endif
Expand Down Expand Up @@ -125,12 +150,12 @@ end subroutine GFS_GWD_generic_post_init
!! \section detailed Detailed Algorithm
!! @{
subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, dvdt, dtdt, &
& dugwd, dvgwd, du3dt, dv3dt, dt3dt, errmsg, errflg)
& dugwd, dvgwd, du3dt, dv3dt, dt3dt, flag_for_gwd_generic_tend, errmsg, errflg)

use machine, only : kind_phys
implicit none

logical, intent(in) :: lssav, ldiag3d
logical, intent(in) :: lssav, ldiag3d, flag_for_gwd_generic_tend

real(kind=kind_phys), intent(in) :: dusfcg(:), dvsfcg(:)
real(kind=kind_phys), intent(in) :: dudt(:,:), dvdt(:,:), dtdt(:,:)
Expand All @@ -150,7 +175,7 @@ subroutine GFS_GWD_generic_post_run(lssav, ldiag3d, dtf, dusfcg, dvsfcg, dudt, d
dugwd(:) = dugwd(:) + dusfcg(:)*dtf
dvgwd(:) = dvgwd(:) + dvsfcg(:)*dtf

if (ldiag3d) then
if (ldiag3d .and. flag_for_gwd_generic_tend) then
du3dt(:,:) = du3dt(:,:) + dudt(:,:) * dtf
dv3dt(:,:) = dv3dt(:,:) + dvdt(:,:) * dtf
dt3dt(:,:) = dt3dt(:,:) + dtdt(:,:) * dtf
Expand Down
81 changes: 81 additions & 0 deletions physics/GFS_GWD_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,42 @@
kind = kind_phys
intent = out
optional = F
[varss]
standard_name = standard_deviation_of_subgrid_orography_small_scale
long_name = standard deviation of subgrid orography small scale
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[ocss]
standard_name = convexity_of_subgrid_orography_small_scale
long_name = convexity of subgrid orography small scale
units = none
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = out
optional = F
[oa4ss]
standard_name = asymmetry_of_subgrid_orography_small_scale
long_name = asymmetry of subgrid orography small scale
units = none
dimensions = (horizontal_dimension,4)
type = real
kind = kind_phys
intent = out
optional = F
[clxss]
standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale
long_name = horizontal fraction of grid box covered by subgrid orography higher than critical height small scale
units = frac
dimensions = (horizontal_dimension,4)
type = real
kind = kind_phys
intent = out
optional = F
[theta]
standard_name = angle_from_east_of_maximum_subgrid_orographic_variations
long_name = angle with_respect to east of maximum subgrid orographic variations
Expand Down Expand Up @@ -118,6 +154,22 @@
type = logical
intent = in
optional = F
[dudt]
standard_name = tendency_of_x_wind_due_to_model_physics
long_name = zonal wind tendency due to model physics
units = m s-2
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
[dvdt]
standard_name = tendency_of_y_wind_due_to_model_physics
long_name = meridional wind tendency due to model physics
units = m s-2
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
[dtdt]
standard_name = tendency_of_air_temperature_due_to_model_physics
long_name = updated tendency of the temperature
Expand All @@ -127,6 +179,22 @@
kind = kind_phys
intent = in
optional = F
[du3dt]
standard_name = cumulative_change_in_x_wind_due_to_orographic_gravity_wave_drag
long_name = cumulative change in x wind due to orographic gravity wave drag
units = m s-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
[dv3dt]
standard_name = cumulative_change_in_y_wind_due_to_orographic_gravity_wave_drag
long_name = cumulative change in y wind due to orographic gravity wave drag
units = m s-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
[dt3dt]
standard_name = cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag
long_name = cumulative change in temperature due to orographic gravity wave drag
Expand All @@ -145,6 +213,13 @@
kind = kind_phys
intent = in
optional = F
[flag_for_gwd_generic_tend]
standard_name = flag_for_generic_gravity_wave_drag_tendency
long_name = true if GFS_GWD_generic should calculate tendencies
units = flag
dimensions = ()
type = logical
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down Expand Up @@ -287,6 +362,12 @@
kind = kind_phys
intent = inout
optional = F
[flag_for_gwd_generic_tend]
standard_name = flag_for_generic_gravity_wave_drag_tendency
long_name = true if GFS_GWD_generic should calculate tendencies
units = flag
dimensions = ()
type = logical
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
Loading