Skip to content
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
96 changes: 44 additions & 52 deletions physics/GWD/cires_ugwp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module cires_ugwp
!! \htmlinclude cires_ugwp_init.html
!!
subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
fn_nml2, lonr, latr, levs, ak, bk, dtp, cdmbgwd, cgwf, &
fn_nml2, lonr, levs, ak, bk, dtp, cdmbgwd, cgwf, &
pa_rf_in, tau_rf_in, con_p0, gwd_opt,do_ugwp, errmsg, errflg)

!---- initialization of cires_ugwp
Expand All @@ -52,7 +52,6 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
integer, intent (in) :: logunit
integer, intent (in) :: lonr
integer, intent (in) :: levs
integer, intent (in) :: latr
real(kind=kind_phys), intent (in) :: ak(:), bk(:)
real(kind=kind_phys), intent (in) :: dtp
real(kind=kind_phys), intent (in) :: cdmbgwd(:), cgwf(:) ! "scaling" controls for "old" GFS-GW schemes
Expand All @@ -64,11 +63,6 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
character(len=*), intent (in) :: fn_nml2
!character(len=*), parameter :: fn_nml='input.nml'

integer :: ios
logical :: exists
real :: dxsg
integer :: k

character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

Expand All @@ -77,19 +71,21 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
errflg = 0

if (is_initialized) return

! Consistency checks
if (gwd_opt/=1) then
write(errmsg,'(*(a))') "Logic error: namelist choice of gravity wave &
& drag is different from cires_ugwp scheme"
errflg = 1
return
end if
end if

if (do_ugwp .or. cdmbgwd(3) > 0.0) then
call cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, &
cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in)
fn_nml2, lonr, levs, ak, bk, con_p0, dtp, &
cdmbgwd(1:2), cgwf, pa_rf_in, tau_rf_in, &
errmsg, errflg)
if (errflg/=0) return
else
write(errmsg,'(*(a))') "Logic error: cires_ugwp_init called but do_ugwp is false and cdmbgwd(3) <= 0"
errflg = 1
Expand All @@ -106,7 +102,6 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &

end subroutine cires_ugwp_init


! -----------------------------------------------------------------------
! finalize of cires_ugwp (_finalize)
! -----------------------------------------------------------------------
Expand Down Expand Up @@ -136,7 +131,6 @@ subroutine cires_ugwp_finalize(errmsg, errflg)

end subroutine cires_ugwp_finalize


! -----------------------------------------------------------------------
! originally from ugwp_driver_v0.f
! driver of cires_ugwp (_driver)
Expand All @@ -147,45 +141,45 @@ end subroutine cires_ugwp_finalize
! -----------------------------------------------------------------------
!>@brief These subroutines and modules execute the CIRES UGWP Version 0.
!> \section gen_cires_ugwp CIRES UGWP V0 Scheme General Algorithm
!! The physics of Non-Orographic Gravity Waves (NGWs) in the UGWP framework
!!(Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, introduced in
!!Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander
!!and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003.
!!A major modification of these GW solvers was introduced with the addition of the
!!background dissipation of temperature and winds to the saturation criteria for wave breaking.
!!This feature is important in the mesosphere and thermosphere for WAM applications and it
!!considers appropriate scale-dependent dissipation of waves near the model top lid providing
!!the momentum and energy conservation in the vertical column physics (Shaw and
!!Shepherd (2009) \cite shaw_and_shepherd_2009). In the UGWP-v0 scheme, a modification of the
!!Scinocca (2003) \cite scinocca_2003 algorithm for NGWs with non-hydrostatic and rotational
!!effects for GW propagations and background dissipation is contained in the subroutine
!!fv3_ugwp_solv2_v0. Future development plans for the UGWP scheme include additional GW-solvers
!!to be implemented along with physics-based triggering of waves and stochastic approaches
!!for selection of GW modes characterized by horizontal phase velocities, azimuthal
!! The physics of Non-Orographic Gravity Waves (NGWs) in the UGWP framework
!!(Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, introduced in
!!Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander
!!and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003.
!!A major modification of these GW solvers was introduced with the addition of the
!!background dissipation of temperature and winds to the saturation criteria for wave breaking.
!!This feature is important in the mesosphere and thermosphere for WAM applications and it
!!considers appropriate scale-dependent dissipation of waves near the model top lid providing
!!the momentum and energy conservation in the vertical column physics (Shaw and
!!Shepherd (2009) \cite shaw_and_shepherd_2009). In the UGWP-v0 scheme, a modification of the
!!Scinocca (2003) \cite scinocca_2003 algorithm for NGWs with non-hydrostatic and rotational
!!effects for GW propagations and background dissipation is contained in the subroutine
!!fv3_ugwp_solv2_v0. Future development plans for the UGWP scheme include additional GW-solvers
!!to be implemented along with physics-based triggering of waves and stochastic approaches
!!for selection of GW modes characterized by horizontal phase velocities, azimuthal
!!directions and magnitude of the vertical momentum flux (VMF).
!!
!! In UGWP-v0, the specification for the VMF function is adopted from the
!! GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in
!! Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2
!! reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran
!! subroutine slat_geos5_tamp_v0() describes the latitudinal shape of
!! VMF-function as displayed in Figure 3 of Molod et al. (2015)
!! \cite molod_et_al_2015. It shows that the enhanced values of
!! VMF in the equatorial region gives opportunity to simulate the
!! QBO-like oscillations in the equatorial zonal winds and lead to more
!! realistic simulations of the equatorial dynamics in GEOS-5 operational
!! and MERRA-2 reanalysis products. For the first vertically extended
!! version of FV3GFS in the stratosphere and mesosphere, this simplified
!! function of VMF allows us to tune the model climate and to evaluate
!! multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis
!! products, along with temperature, ozone, and water vapor observations
!! of current satellite missions. After delivery of the UGWP-code, the
!! EMC group developed and tested approach to modulate the zonal mean
!! NGW forcing by 3D-distributions of the total precipitation as a proxy
!! for the excitation of NGWs by convection and the vertically-integrated
!! (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification
!! scores with updated NGW forcing, as reported elsewhere by EMC researchers,
!! display noticeable improvements in the forecast scores produced by
!! In UGWP-v0, the specification for the VMF function is adopted from the
!! GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in
!! Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2
!! reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran
!! subroutine slat_geos5_tamp_v0() describes the latitudinal shape of
!! VMF-function as displayed in Figure 3 of Molod et al. (2015)
!! \cite molod_et_al_2015. It shows that the enhanced values of
!! VMF in the equatorial region gives opportunity to simulate the
!! QBO-like oscillations in the equatorial zonal winds and lead to more
!! realistic simulations of the equatorial dynamics in GEOS-5 operational
!! and MERRA-2 reanalysis products. For the first vertically extended
!! version of FV3GFS in the stratosphere and mesosphere, this simplified
!! function of VMF allows us to tune the model climate and to evaluate
!! multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis
!! products, along with temperature, ozone, and water vapor observations
!! of current satellite missions. After delivery of the UGWP-code, the
!! EMC group developed and tested approach to modulate the zonal mean
!! NGW forcing by 3D-distributions of the total precipitation as a proxy
!! for the excitation of NGWs by convection and the vertically-integrated
!! (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification
!! scores with updated NGW forcing, as reported elsewhere by EMC researchers,
!! display noticeable improvements in the forecast scores produced by
!! FV3GFS configuration extended into the mesosphere.
!!
!> \section arg_table_cires_ugwp_run Argument Table
Expand Down Expand Up @@ -335,7 +329,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr

endif ! do_ugwp


if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then
idtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd)
if(idtend>=1) then
Expand All @@ -350,7 +343,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr
dtend(:,:,idtend) = dtend(:,:,idtend) + Pdtdt*dtp
endif
endif


if (cdmbgwd(3) > 0.0) then

Expand Down
9 changes: 1 addition & 8 deletions physics/GWD/cires_ugwp.meta
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@
dimensions = ()
type = integer
intent = in
[latr]
standard_name = number_of_latitude_points
long_name = number of global points in y-dir (j) along the meridian
units = count
dimensions = ()
type = integer
intent = in
[levs]
standard_name = vertical_layer_dimension
long_name = number of vertical levels
Expand Down Expand Up @@ -822,7 +815,7 @@
type = real
kind = kind_phys
intent = in
[dqdt_tke]
[dqdt_tke]
standard_name = process_split_cumulative_tendency_of_turbulent_kinetic_energy
long_name = turbulent kinetic energy tendency due to model physics
units = J s-1
Expand Down
65 changes: 34 additions & 31 deletions physics/GWD/cires_ugwp_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ module cires_ugwpv0_module
real, parameter :: pi2 = 2.*pi
real, parameter :: hps = 7000.
real, parameter :: hpskm = hps/1000.
!

real :: kxw = 6.28e-3/100. !< single horizontal wavenumber of ugwp schemes
real, parameter :: ricrit = 0.25
real, parameter :: frcrit = 0.50
real, parameter :: linsat = 1.00
real, parameter :: linsat2 = linsat*linsat
!

integer :: knob_ugwp_solver=1 !< 1, 2, 3, 4 - (linsat, ifs_2010, ad_gfdl, dsp_dis)
integer, dimension(4) :: knob_ugwp_source !< [1,1,1,0] - (oro, fronts, conv, imbf-owp]
Expand All @@ -38,23 +37,22 @@ module cires_ugwpv0_module
integer :: knob_ugwp_doheat=1 !< 1 -gwheat
integer :: knob_ugwp_dokdis=0 !< 1 -gwmixing
integer :: knob_ugwp_ndx4lh = 2 !< n-number of "unresolved" "n*dx" for lh_gw
!

integer :: ugwp_azdir
integer :: ugwp_stoch

integer :: ugwp_src
integer :: ugwp_nws
real :: ugwp_effac

!
data knob_ugwp_source / 1,0, 1, 0 / !< oro-conv-fjet-okw-taub_lat: 1-active 0-off
data knob_ugwp_wvspec /1,32,32,32/ !< number of waves for- (oro, fronts, conv, imbf-owp, taulat]
data knob_ugwp_azdir /2, 4, 4,4/ !< number of wave azimuths for- (oro, fronts, conv, imbf-okwp]
data knob_ugwp_stoch /0, 0, 0,0/ !< 0 - deterministic ; 1 - stochastic, non-activated option
data knob_ugwp_effac /1.,1.,1.,1./ !< efficiency factors for- (oro, fronts, conv, imbf-owp]
integer :: knob_ugwp_version = 0 !< version control had sense under IPD in CCPP=> to SUITES
integer :: launch_level = 55
!

namelist /cires_ugwp_nml/ knob_ugwp_solver, knob_ugwp_source,knob_ugwp_wvspec, knob_ugwp_azdir, &
knob_ugwp_stoch, knob_ugwp_effac,knob_ugwp_doaxyz, knob_ugwp_doheat, knob_ugwp_dokdis, &
knob_ugwp_ndx4lh, knob_ugwp_version, launch_level
Expand Down Expand Up @@ -91,7 +89,7 @@ module cires_ugwpv0_module
real, parameter :: F_coriol=1 ! Coriolis effects
real, parameter :: F_nonhyd=1 ! Nonhydrostatic waves
real, parameter :: F_kds =0 ! Eddy mixing due to GW-unstable below
real, parameter :: iPr_ktgw =1./3., iPr_spgw=iPr_ktgw
real, parameter :: iPr_ktgw =1./3., iPr_spgw=iPr_ktgw
real, parameter :: iPr_turb =1./3., iPr_mol =1.95
real, parameter :: rhp1=1./hps, rhp2=0.5*rhp1, rhp4 = rhp2*rhp2
real, parameter :: khp = 0.287*rhp1 ! R/Cp/Hp
Expand All @@ -104,15 +102,15 @@ module cires_ugwpv0_module
! init of cires_ugwp (_init) called from GFS_driver.F90
!
! -----------------------------------------------------------------------
!>This subroutine initializes CIRES UGWP
!>This subroutine initializes CIRES UGWP
subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
fn_nml, lonr, latr, levs, ak, bk, pref, dtp, cdmvgwd, cgwf, &
pa_rf_in, tau_rf_in)
fn_nml, lonr, levs, ak, bk, pref, dtp, cdmvgwd, cgwf, &
pa_rf_in, tau_rf_in, errmsg, errflg)

use ugwpv0_oro_init, only : init_oro_gws_v0
use ugwpv0_wmsdis_init, only : initsolv_wmsdis_v0, ilaunch
use ugwpv0_lsatdis_init, only : initsolv_lsatdis_v0

implicit none

integer, intent (in) :: me
Expand All @@ -123,13 +121,16 @@ subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
character(len=64), intent (in) :: fn_nml
integer, intent (in) :: lonr
integer, intent (in) :: levs
integer, intent (in) :: latr
real, intent (in) :: ak(levs+1), bk(levs+1), pref
real, intent (in) :: dtp
real, intent (in) :: cdmvgwd(2), cgwf(2) ! "scaling" controls for "old" GFS-GW schemes
real, intent (in) :: pa_rf_in, tau_rf_in

character(len=*), intent(inout) :: errmsg
integer, intent(inout) :: errflg

integer :: ios
character(len=256) :: msg
logical :: exists
real :: dxsg
integer :: k
Expand All @@ -138,21 +139,26 @@ subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
read (input_nml_file, nml = cires_ugwp_nml)
#else
if (me == master) print *, trim (fn_nml), ' GW-namelist file '

inquire (file =trim (fn_nml) , exist = exists)

if (.not. exists) then
if (me == master) &
write (6, *) 'separate ugwp :: namelist file: ', trim (fn_nml), ' does not exist'
write(errmsg,*) 'separate ugwp :: namelist file: ', trim (fn_nml), ' does not exist'
errflg = 1
return
else
open (unit = nlunit, file = trim(fn_nml), action = 'read', status = 'old', iostat = ios)
open (unit = nlunit, file = trim(fn_nml), action = 'read', status = 'old', iostat = ios, iomsg = msg)
if (ios /= 0) then
write(errmsg,*) 'ERROR: cannot open namelist file ', trim(fn_nml), ' iostat=', ios, ' msg="' // trim(msg) // '"'
errflg = 1
return
endif
endif
rewind (nlunit)
read (nlunit, nml = cires_ugwp_nml)
close (nlunit)
#endif

!

ilaunch = launch_level
pa_rf = pa_rf_in
tau_rf = tau_rf_in
Expand All @@ -167,9 +173,9 @@ subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
! effective kxw - resolution-aware
!
dxsg = pi2*arad/float(lonr) * knob_ugwp_ndx4lh
!

allocate( kvg(levs+1), ktg(levs+1) )
allocate( krad(levs+1), kion(levs+1) )
allocate( krad(levs+1), kion(levs+1) )
allocate( zkm(levs), pmb(levs) )
allocate( rfdis(levs), rfdist(levs) )
!
Expand All @@ -187,8 +193,8 @@ subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
!
! Part-2 :init_SOURCES_gws -- only orowaves, but ugwp-v0 is based on gwdps.f of EMC
!
!

!
! call init-solver for "stationary" multi-wave spectra and sub-grid oro
!
call init_oro_gws_v0( knob_ugwp_wvspec(1), knob_ugwp_azdir(1), &
Expand All @@ -205,22 +211,21 @@ subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
! call init-solvers for "broad" non-stationary multi-wave spectra
!
if (knob_ugwp_solver==1) then
!

call initsolv_lsatdis_v0(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), &
knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw )
endif
if (knob_ugwp_solver==2) then

call initsolv_wmsdis_v0(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), &
knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw)
endif
if (knob_ugwp_solver==2) then

call initsolv_wmsdis_v0(me, master, knob_ugwp_wvspec(2), knob_ugwp_azdir(2), &
knob_ugwp_stoch(2), knob_ugwp_effac(2), do_physb_gwsrcs, kxw)
endif

!======================
module_is_initialized = .true.

end subroutine cires_ugwpv0_mod_init
!
!
! -----------------------------------------------------------------------
! finalize of cires_ugwp (_finalize)
! -----------------------------------------------------------------------
Expand All @@ -241,6 +246,4 @@ subroutine cires_ugwpv0_mod_finalize
deallocate( rfdis, rfdist)

end subroutine cires_ugwpv0_mod_finalize
!
end module cires_ugwpv0_module

end module cires_ugwpv0_module
Loading