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

UFS-dev PR#22 #80

Merged
merged 4 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%zngw (IM) )

! CIRES UGWP v1
if (Model%do_ugwp_v1) then
if (Model%ldiag_ugwp .or. Model%do_ugwp_v0 .or. Model%do_ugwp_v0_nst_only &
.or. Model%do_ugwp_v1) then
allocate (Interstitial%dudt_ngw (IM,Model%levs))
allocate (Interstitial%dvdt_ngw (IM,Model%levs))
allocate (Interstitial%dtdt_ngw (IM,Model%levs))
Expand Down Expand Up @@ -1550,7 +1551,8 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
Interstitial%zngw = clear_val

! CIRES UGWP v1
if (Model%do_ugwp_v1) then
if (Model%ldiag_ugwp .or. Model%do_ugwp_v0 .or. Model%do_ugwp_v0_nst_only &
.or. Model%do_ugwp_v1) then
Interstitial%dudt_ngw = clear_val
Interstitial%dvdt_ngw = clear_val
Interstitial%dtdt_ngw = clear_val
Expand Down
8 changes: 4 additions & 4 deletions ccpp/data/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2324,31 +2324,31 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2)
active = (flag_for_unified_gravity_wave_physics_diagnostics .or. flag_for_ugwp_version_0 .or. flag_for_ugwp_version_0_nonorographic_gwd .or. flag_for_ugwp_version_1)
[dvdt_ngw]
standard_name = tendency_of_y_wind_due_to_nonorographic_gravity_wave_drag
long_name = meridional wind tendency due to non-stationary GWs
units = m s-2
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2)
active = (flag_for_unified_gravity_wave_physics_diagnostics .or. flag_for_ugwp_version_0 .or. flag_for_ugwp_version_0_nonorographic_gwd .or. flag_for_ugwp_version_1)
[dtdt_ngw]
standard_name = tendency_of_air_temperature_due_to_nonorographic_gravity_wave_drag
long_name = air temperature tendency due to non-stationary GWs
units = K s-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2)
active = (flag_for_unified_gravity_wave_physics_diagnostics .or. flag_for_ugwp_version_0 .or. flag_for_ugwp_version_0_nonorographic_gwd .or. flag_for_ugwp_version_1)
[kdis_ngw]
standard_name = atmosphere_momentum_diffusivity_due_to_nonorographic_gravity_wave_drag
long_name = eddy mixing due to non-stationary GWs
units = m2 s-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2)
active = (flag_for_unified_gravity_wave_physics_diagnostics .or. flag_for_ugwp_version_0 .or. flag_for_ugwp_version_0_nonorographic_gwd .or. flag_for_ugwp_version_1)
[zlwb]
standard_name = height_of_low_level_wave_breaking
long_name = height of low level wave breaking
Expand Down
126 changes: 77 additions & 49 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ module GFS_typedefs
!vay 2018 GW physics switches

logical :: ldiag_ugwp
logical :: ugwp_seq_update ! flag to update winds between UGWP steps
logical :: do_ugwp ! do mesoscale UGWP + TOFD + RF
logical :: do_tofd ! tofd flag in gwdps.f
logical :: do_gwd ! logical for gravity wave drag (gwd)
Expand Down Expand Up @@ -978,7 +979,7 @@ module GFS_typedefs
logical :: do_ugwp_v0 !< flag for version 0 ugwp GWD
logical :: do_ugwp_v0_orog_only !< flag for version 0 ugwp GWD (orographic drag only)
logical :: do_ugwp_v0_nst_only !< flag for version 0 ugwp GWD (non-stationary GWD only)
logical :: do_gsl_drag_ls_bl !< flag for GSL drag (large-scale GWD and blocking only)
logical :: do_gsl_drag_ls_bl !< flag for GSL drag (mesoscale GWD and blocking only)
logical :: do_gsl_drag_ss !< flag for GSL drag (small-scale GWD only)
logical :: do_gsl_drag_tofd !< flag for GSL drag (turbulent orog form drag only)
logical :: do_ugwp_v1 !< flag for version 1 ugwp GWD
Expand Down Expand Up @@ -1836,14 +1837,22 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: dudt_ofd(:,:) => null() !<
real (kind=kind_phys), pointer :: dvdt_ofd(:,:) => null() !<

real (kind=kind_phys), pointer :: du_ogwcol(:) => null() !<
real (kind=kind_phys), pointer :: dv_ogwcol(:) => null() !<
real (kind=kind_phys), pointer :: du_oblcol(:) => null() !<
real (kind=kind_phys), pointer :: dv_oblcol(:) => null() !<
real (kind=kind_phys), pointer :: du_osscol(:) => null() !<
real (kind=kind_phys), pointer :: dv_osscol(:) => null() !<
real (kind=kind_phys), pointer :: du_ofdcol(:) => null() !<
real (kind=kind_phys), pointer :: dv_ofdcol(:) => null() !<
real (kind=kind_phys), pointer :: du_ogwcol(:) => null() !< instantaneous sfc u-momentum flux from OGW
real (kind=kind_phys), pointer :: dv_ogwcol(:) => null() !< instantaneous sfc v-momentum flux from OGW
real (kind=kind_phys), pointer :: du_oblcol(:) => null() !< instantaneous sfc u-momentum flux from blocking
real (kind=kind_phys), pointer :: dv_oblcol(:) => null() !< instantaneous sfc v-momentum flux from blocking
real (kind=kind_phys), pointer :: du_osscol(:) => null() !< instantaneous sfc u-momentum flux from SSGWD
real (kind=kind_phys), pointer :: dv_osscol(:) => null() !< instantaneous sfc v-momentum flux from SSGWD
real (kind=kind_phys), pointer :: du_ofdcol(:) => null() !< instantaneous sfc u-momentum flux from TOFD
real (kind=kind_phys), pointer :: dv_ofdcol(:) => null() !< instantaneous sfc v-momentum flux from TOFD
real (kind=kind_phys), pointer :: du3_ogwcol(:) => null() !< time-averaged sfc u-momentum flux from OGW
real (kind=kind_phys), pointer :: dv3_ogwcol(:) => null() !< time-averaged sfc v-momentum flux from OGW
real (kind=kind_phys), pointer :: du3_oblcol(:) => null() !< time-averaged sfc u-momentum flux from blocking
real (kind=kind_phys), pointer :: dv3_oblcol(:) => null() !< time-averaged sfc v-momentum flux from blocking
real (kind=kind_phys), pointer :: du3_osscol(:) => null() !< time-averaged sfc u-momentum flux from SSGWD
real (kind=kind_phys), pointer :: dv3_osscol(:) => null() !< time-averaged sfc v-momentum flux from SSGWD
real (kind=kind_phys), pointer :: du3_ofdcol(:) => null() !< time-averaged sfc u-momentum flux from TOFD
real (kind=kind_phys), pointer :: dv3_ofdcol(:) => null() !< time-averaged sfc v-momentum flux from TOFD
!
!---vay-2018 UGWP-diagnostics daily mean
!
Expand All @@ -1856,28 +1865,27 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: dt3dt_pbl(:,:) => null() !< daily aver GFS_phys tend for Temp pbl
!
real (kind=kind_phys), pointer :: du3dt_ogw(:,:) => null() !< daily aver GFS_phys tend for WE-U OGW
real (kind=kind_phys), pointer :: dv3dt_ogw(:,:) => null() !< daily aver GFS_phys tend for SN-V OGW
real (kind=kind_phys), pointer :: dt3dt_ogw(:,:) => null() !< daily aver GFS_phys tend for Temp OGW
!
real (kind=kind_phys), pointer :: ldu3dt_ogw(:,:) => null() !< time aver GFS_phys tend for WE-U OGW
real (kind=kind_phys), pointer :: ldu3dt_obl(:,:) => null() !< time aver GFS_phys tend for WE-U OBL
real (kind=kind_phys), pointer :: ldu3dt_oss(:,:) => null() !< time aver GFS_phys tend for WE-U OSS
real (kind=kind_phys), pointer :: ldu3dt_ofd(:,:) => null() !< time aver GFS_phys tend for WE-U OFD
!
real (kind=kind_phys), pointer :: du3dt_mtb(:,:) => null() !< daily aver GFS_phys tend for WE-U MTB
real (kind=kind_phys), pointer :: dv3dt_mtb(:,:) => null() !< daily aver GFS_phys tend for SN-V MTB
real (kind=kind_phys), pointer :: dt3dt_mtb(:,:) => null() !< daily aver GFS_phys tend for Temp MTB
!
real (kind=kind_phys), pointer :: du3dt_tms(:,:) => null() !< daily aver GFS_phys tend for WE-U TMS
real (kind=kind_phys), pointer :: dv3dt_tms(:,:) => null() !< daily aver GFS_phys tend for SN-V TMS
real (kind=kind_phys), pointer :: dt3dt_tms(:,:) => null() !< daily aver GFS_phys tend for Temp TMS
!
real (kind=kind_phys), pointer :: du3dt_ngw(:,:) => null() !< daily aver GFS_phys tend for WE-U NGW
real (kind=kind_phys), pointer :: dv3dt_ngw(:,:) => null() !< daily aver GFS_phys tend for SN-V NGW
real (kind=kind_phys), pointer :: dt3dt_ngw(:,:) => null() !< daily aver GFS_phys tend for Temp NGW
!
real (kind=kind_phys), pointer :: du3dt_cgw(:,:) => null() !< daily aver GFS_phys tend for WE-U NGW
real (kind=kind_phys), pointer :: dv3dt_cgw(:,:) => null() !< daily aver GFS_phys tend for SN-V NGW
real (kind=kind_phys), pointer :: dt3dt_cgw(:,:) => null() !< daily aver GFS_phys tend for Temp NGW
real (kind=kind_phys), pointer :: dws3dt_ogw(:,:) => null() !< time aver GFS_phys tend for windspeed OGW
real (kind=kind_phys), pointer :: dws3dt_obl(:,:) => null() !< time aver GFS_phys tend for windspeed OBL
real (kind=kind_phys), pointer :: dws3dt_oss(:,:) => null() !< time aver GFS_phys tend for windspeed OSS
real (kind=kind_phys), pointer :: dws3dt_ofd(:,:) => null() !< time aver GFS_phys tend for windspeed OFD
!
real (kind=kind_phys), pointer :: du3dt_moist(:,:) => null() !< daily aver GFS_phys tend for WE-U MOIST
real (kind=kind_phys), pointer :: dv3dt_moist(:,:) => null() !< daily aver GFS_phys tend for SN-V MOIST
real (kind=kind_phys), pointer :: dt3dt_moist(:,:) => null() !< daily aver GFS_phys tend for Temp MOIST
real (kind=kind_phys), pointer :: ldu3dt_ngw(:,:) => null() !< time aver GFS_phys tend for u wind NGW
real (kind=kind_phys), pointer :: ldv3dt_ngw(:,:) => null() !< time aver GFS_phys tend for v wind NGW
real (kind=kind_phys), pointer :: ldt3dt_ngw(:,:) => null() !< time aver GFS_phys tend for temperature NGW
!
!--- Instantaneous UGWP-diagnostics 16-variables
! Diag%gwp_ax, Diag%gwp_axo, Diag%gwp_axc, Diag%gwp_axf, &
Expand Down Expand Up @@ -3165,16 +3173,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: do_ugwp_v0 = .true. !< flag for version 0 ugwp GWD
logical :: do_ugwp_v0_orog_only = .false. !< flag for version 0 ugwp GWD (orographic drag only)
logical :: do_ugwp_v0_nst_only = .false. !< flag for version 0 ugwp GWD (non-stationary GWD only)
logical :: do_gsl_drag_ls_bl = .false. !< flag for GSL drag (large-scale GWD and blocking only)
logical :: do_gsl_drag_ls_bl = .false. !< flag for GSL drag (mesoscale GWD and blocking only)
logical :: do_gsl_drag_ss = .false. !< flag for GSL drag (small-scale GWD only)
logical :: do_gsl_drag_tofd = .false. !< flag for GSL drag (turbulent orog form drag only)
logical :: do_ugwp_v1 = .false. !< flag for version 1 ugwp GWD
logical :: do_ugwp_v1_orog_only = .false. !< flag for version 1 ugwp GWD (orographic drag only)
logical :: do_ugwp_v1_w_gsldrag = .false. !< flag for version 1 ugwp GWD (orographic drag only)
!--- vay-2018
logical :: ldiag_ugwp = .false. !< flag for UGWP diag fields
logical :: do_ugwp = .false. !< flag do UGWP+RF
logical :: do_tofd = .false. !< flag do Turb oro Form Drag
logical :: ldiag_ugwp = .false. !< flag for UGWP diag fields
logical :: ugwp_seq_update = .false. !< flag for updating winds between UGWP steps
logical :: do_ugwp = .false. !< flag do UGWP+RF
logical :: do_tofd = .false. !< flag do Turb oro Form Drag

logical :: do_gwd = .false. !< flag for running gravity wave drag
logical :: do_cnvgwd = .false. !< flag for running conv gravity wave drag
Expand Down Expand Up @@ -3535,7 +3544,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
do_ugwp_v0_nst_only, &
do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, &
do_ugwp_v1, do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, &
var_ric, coef_ric_l, coef_ric_s, hurr_pbl, &
ugwp_seq_update, var_ric, coef_ric_l, coef_ric_s, hurr_pbl, &
do_myjsfc, do_myjpbl, &
hwrf_samfdeep, hwrf_samfshal,progsigma, &
h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, &
Expand Down Expand Up @@ -3723,6 +3732,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!VAY-ugwp --- set some GW-related switches
!
Model%ldiag_ugwp = ldiag_ugwp
Model%ugwp_seq_update = ugwp_seq_update
Model%do_ugwp = do_ugwp
Model%do_tofd = do_tofd

Expand Down Expand Up @@ -6924,28 +6934,29 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%dv3dt_pbl (IM,Model%levs) )
allocate (Diag%dt3dt_pbl (IM,Model%levs) )
allocate (Diag%du3dt_ogw (IM,Model%levs) )
allocate (Diag%dv3dt_ogw (IM,Model%levs) )
allocate (Diag%dt3dt_ogw (IM,Model%levs) )
allocate (Diag%du3dt_mtb (IM,Model%levs) )
allocate (Diag%dv3dt_mtb (IM,Model%levs) )
allocate (Diag%dt3dt_mtb (IM,Model%levs) )
allocate (Diag%du3dt_tms (IM,Model%levs) )
allocate (Diag%dv3dt_tms (IM,Model%levs) )
allocate (Diag%dt3dt_tms (IM,Model%levs) )
allocate (Diag%du3dt_ngw (IM,Model%levs) )
allocate (Diag%dv3dt_ngw (IM,Model%levs) )
allocate (Diag%dt3dt_ngw (IM,Model%levs) )
allocate (Diag%du3dt_cgw (IM,Model%levs) )
allocate (Diag%dv3dt_cgw (IM,Model%levs) )
allocate (Diag%dt3dt_moist (IM,Model%levs))
allocate (Diag%dudt_tot (IM,Model%levs) )
allocate (Diag%dvdt_tot (IM,Model%levs) )
allocate (Diag%dtdt_tot (IM,Model%levs) )
allocate (Diag%uav_ugwp (IM,Model%levs) )
allocate (Diag%tav_ugwp (IM,Model%levs) )
allocate (Diag%dws3dt_ogw (IM,Model%levs) )
allocate (Diag%dws3dt_obl (IM,Model%levs) )
allocate (Diag%dws3dt_oss (IM,Model%levs) )
allocate (Diag%dws3dt_ofd (IM,Model%levs) )
allocate (Diag%ldu3dt_ogw (IM,Model%levs) )
allocate (Diag%ldu3dt_obl (IM,Model%levs) )
allocate (Diag%ldu3dt_oss (IM,Model%levs) )
allocate (Diag%ldu3dt_ofd (IM,Model%levs) )
allocate (Diag%ldu3dt_ngw (IM,Model%levs) )
allocate (Diag%ldv3dt_ngw (IM,Model%levs) )
allocate (Diag%ldt3dt_ngw (IM,Model%levs) )
endif

if (Model%do_ugwp_v1 .or. Model%gwd_opt==33 .or. Model%gwd_opt==22) then
if (Model%do_ugwp_v1 .or. Model%ldiag_ugwp) then
allocate (Diag%dudt_ogw (IM,Model%levs))
allocate (Diag%dvdt_ogw (IM,Model%levs))
allocate (Diag%dudt_obl (IM,Model%levs))
Expand All @@ -6962,6 +6973,14 @@ subroutine diag_create (Diag, IM, Model)
allocate (Diag%dv_osscol (IM) )
allocate (Diag%du_ofdcol (IM) )
allocate (Diag%dv_ofdcol (IM) )
allocate (Diag%du3_ogwcol (IM) )
allocate (Diag%dv3_ogwcol (IM) )
allocate (Diag%du3_oblcol (IM) )
allocate (Diag%dv3_oblcol (IM) )
allocate (Diag%du3_osscol (IM) )
allocate (Diag%dv3_osscol (IM) )
allocate (Diag%du3_ofdcol (IM) )
allocate (Diag%dv3_ofdcol (IM) )
else
allocate (Diag%dudt_ogw (IM,Model%levs))
endif
Expand Down Expand Up @@ -7239,7 +7258,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%dtdt_gw = zero
Diag%kdis_gw = zero

if (Model%do_ugwp_v1 .or. Model%gwd_opt==33 .or. Model%gwd_opt==22) then
if (Model%do_ugwp_v1 .or. Model%ldiag_ugwp) then
Diag%dudt_ogw = zero
Diag%dvdt_ogw = zero
Diag%dudt_obl = zero
Expand All @@ -7256,6 +7275,14 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%dv_osscol = zero
Diag%du_ofdcol = zero
Diag%dv_ofdcol = zero
Diag%du3_ogwcol = zero
Diag%dv3_ogwcol = zero
Diag%du3_oblcol = zero
Diag%dv3_oblcol = zero
Diag%du3_osscol = zero
Diag%dv3_osscol = zero
Diag%du3_ofdcol = zero
Diag%dv3_ofdcol = zero
else
Diag%dudt_ogw = zero
end if
Expand All @@ -7265,25 +7292,26 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center)
Diag%dv3dt_pbl = zero
Diag%dt3dt_pbl = zero
Diag%du3dt_ogw = zero
Diag%dv3dt_ogw = zero
Diag%dt3dt_ogw = zero
Diag%du3dt_mtb = zero
Diag%dv3dt_mtb = zero
Diag%dt3dt_mtb = zero
Diag%du3dt_tms = zero
Diag%dv3dt_tms = zero
Diag%dt3dt_tms = zero
Diag%du3dt_ngw = zero
Diag%dv3dt_ngw = zero
Diag%dt3dt_ngw = zero
Diag%du3dt_moist = zero
Diag%dv3dt_moist = zero
Diag%dt3dt_moist = zero
Diag%dudt_tot = zero
Diag%dvdt_tot = zero
Diag%dtdt_tot = zero
Diag%uav_ugwp = zero
Diag%tav_ugwp = zero
Diag%dws3dt_ogw = zero
Diag%dws3dt_obl = zero
Diag%dws3dt_oss = zero
Diag%dws3dt_ofd = zero
Diag%ldu3dt_ogw = zero
Diag%ldu3dt_obl = zero
Diag%ldu3dt_oss = zero
Diag%ldu3dt_ofd = zero
Diag%ldu3dt_ngw = zero
Diag%ldv3dt_ngw = zero
Diag%ldt3dt_ngw = zero
!COORDE
Diag%du3dt_dyn = zero
endif
Expand Down
Loading