@@ -39,7 +39,7 @@ module cires_ugwp
3939! ! \htmlinclude cires_ugwp_init.html
4040! !
4141 subroutine cires_ugwp_init (me , master , nlunit , input_nml_file , logunit , &
42- fn_nml2 , lonr , latr , levs , ak , bk , dtp , cdmbgwd , cgwf , &
42+ fn_nml2 , lonr , levs , ak , bk , dtp , cdmbgwd , cgwf , &
4343 pa_rf_in , tau_rf_in , con_p0 , gwd_opt ,do_ugwp , errmsg , errflg )
4444
4545!- --- initialization of cires_ugwp
@@ -52,7 +52,6 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
5252 integer , intent (in ) :: logunit
5353 integer , intent (in ) :: lonr
5454 integer , intent (in ) :: levs
55- integer , intent (in ) :: latr
5655 real (kind= kind_phys), intent (in ) :: ak(:), bk(:)
5756 real (kind= kind_phys), intent (in ) :: dtp
5857 real (kind= kind_phys), intent (in ) :: cdmbgwd(:), cgwf(:) ! "scaling" controls for "old" GFS-GW schemes
@@ -64,11 +63,6 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
6463 character (len=* ), intent (in ) :: fn_nml2
6564 ! character(len=*), parameter :: fn_nml='input.nml'
6665
67- integer :: ios
68- logical :: exists
69- real :: dxsg
70- integer :: k
71-
7266 character (len=* ), intent (out ) :: errmsg
7367 integer , intent (out ) :: errflg
7468
@@ -77,19 +71,21 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
7771 errflg = 0
7872
7973 if (is_initialized) return
80-
74+
8175 ! Consistency checks
8276 if (gwd_opt/= 1 ) then
8377 write (errmsg,' (*(a))' ) " Logic error: namelist choice of gravity wave &
8478 & drag is different from cires_ugwp scheme"
8579 errflg = 1
8680 return
87- end if
81+ end if
8882
8983 if (do_ugwp .or. cdmbgwd(3 ) > 0.0 ) then
9084 call cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, &
91- fn_nml2, lonr, latr, levs, ak, bk, con_p0, dtp, &
92- cdmbgwd(1 :2 ), cgwf, pa_rf_in, tau_rf_in)
85+ fn_nml2, lonr, levs, ak, bk, con_p0, dtp, &
86+ cdmbgwd(1 :2 ), cgwf, pa_rf_in, tau_rf_in, &
87+ errmsg, errflg)
88+ if (errflg/= 0 ) return
9389 else
9490 write (errmsg,' (*(a))' ) " Logic error: cires_ugwp_init called but do_ugwp is false and cdmbgwd(3) <= 0"
9591 errflg = 1
@@ -106,7 +102,6 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, &
106102
107103 end subroutine cires_ugwp_init
108104
109-
110105! -----------------------------------------------------------------------
111106! finalize of cires_ugwp (_finalize)
112107! -----------------------------------------------------------------------
@@ -136,7 +131,6 @@ subroutine cires_ugwp_finalize(errmsg, errflg)
136131
137132 end subroutine cires_ugwp_finalize
138133
139-
140134! -----------------------------------------------------------------------
141135! originally from ugwp_driver_v0.f
142136! driver of cires_ugwp (_driver)
@@ -147,45 +141,45 @@ end subroutine cires_ugwp_finalize
147141! -----------------------------------------------------------------------
148142! >@brief These subroutines and modules execute the CIRES UGWP Version 0.
149143! > \section gen_cires_ugwp CIRES UGWP V0 Scheme General Algorithm
150- ! ! The physics of Non-Orographic Gravity Waves (NGWs) in the UGWP framework
151- ! !(Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, introduced in
152- ! !Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander
153- ! !and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003.
154- ! !A major modification of these GW solvers was introduced with the addition of the
155- ! !background dissipation of temperature and winds to the saturation criteria for wave breaking.
156- ! !This feature is important in the mesosphere and thermosphere for WAM applications and it
157- ! !considers appropriate scale-dependent dissipation of waves near the model top lid providing
158- ! !the momentum and energy conservation in the vertical column physics (Shaw and
159- ! !Shepherd (2009) \cite shaw_and_shepherd_2009). In the UGWP-v0 scheme, a modification of the
160- ! !Scinocca (2003) \cite scinocca_2003 algorithm for NGWs with non-hydrostatic and rotational
161- ! !effects for GW propagations and background dissipation is contained in the subroutine
162- ! !fv3_ugwp_solv2_v0. Future development plans for the UGWP scheme include additional GW-solvers
163- ! !to be implemented along with physics-based triggering of waves and stochastic approaches
164- ! !for selection of GW modes characterized by horizontal phase velocities, azimuthal
144+ ! ! The physics of Non-Orographic Gravity Waves (NGWs) in the UGWP framework
145+ ! !(Yudin et al. 2018 \cite yudin_et_al_2018) is represented by four GW-solvers, introduced in
146+ ! !Lindzen (1981) \cite lindzen_1981, Hines (1997) \cite hines_1997, Alexander
147+ ! !and Dunkerton (1999) \cite alexander_and_dunkerton_1999, and Scinocca (2003) \cite scinocca_2003.
148+ ! !A major modification of these GW solvers was introduced with the addition of the
149+ ! !background dissipation of temperature and winds to the saturation criteria for wave breaking.
150+ ! !This feature is important in the mesosphere and thermosphere for WAM applications and it
151+ ! !considers appropriate scale-dependent dissipation of waves near the model top lid providing
152+ ! !the momentum and energy conservation in the vertical column physics (Shaw and
153+ ! !Shepherd (2009) \cite shaw_and_shepherd_2009). In the UGWP-v0 scheme, a modification of the
154+ ! !Scinocca (2003) \cite scinocca_2003 algorithm for NGWs with non-hydrostatic and rotational
155+ ! !effects for GW propagations and background dissipation is contained in the subroutine
156+ ! !fv3_ugwp_solv2_v0. Future development plans for the UGWP scheme include additional GW-solvers
157+ ! !to be implemented along with physics-based triggering of waves and stochastic approaches
158+ ! !for selection of GW modes characterized by horizontal phase velocities, azimuthal
165159! !directions and magnitude of the vertical momentum flux (VMF).
166160! !
167- ! ! In UGWP-v0, the specification for the VMF function is adopted from the
168- ! ! GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in
169- ! ! Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2
170- ! ! reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran
171- ! ! subroutine slat_geos5_tamp_v0() describes the latitudinal shape of
172- ! ! VMF-function as displayed in Figure 3 of Molod et al. (2015)
173- ! ! \cite molod_et_al_2015. It shows that the enhanced values of
174- ! ! VMF in the equatorial region gives opportunity to simulate the
175- ! ! QBO-like oscillations in the equatorial zonal winds and lead to more
176- ! ! realistic simulations of the equatorial dynamics in GEOS-5 operational
177- ! ! and MERRA-2 reanalysis products. For the first vertically extended
178- ! ! version of FV3GFS in the stratosphere and mesosphere, this simplified
179- ! ! function of VMF allows us to tune the model climate and to evaluate
180- ! ! multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis
181- ! ! products, along with temperature, ozone, and water vapor observations
182- ! ! of current satellite missions. After delivery of the UGWP-code, the
183- ! ! EMC group developed and tested approach to modulate the zonal mean
184- ! ! NGW forcing by 3D-distributions of the total precipitation as a proxy
185- ! ! for the excitation of NGWs by convection and the vertically-integrated
186- ! ! (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification
187- ! ! scores with updated NGW forcing, as reported elsewhere by EMC researchers,
188- ! ! display noticeable improvements in the forecast scores produced by
161+ ! ! In UGWP-v0, the specification for the VMF function is adopted from the
162+ ! ! GEOS-5 global atmosphere model of GMAO NASA/GSFC, as described in
163+ ! ! Molod et al. (2015) \cite molod_et_al_2015 and employed in the MERRRA-2
164+ ! ! reanalysis (Gelaro et al., 2017 \cite gelaro_et_al_2017). The Fortran
165+ ! ! subroutine slat_geos5_tamp_v0() describes the latitudinal shape of
166+ ! ! VMF-function as displayed in Figure 3 of Molod et al. (2015)
167+ ! ! \cite molod_et_al_2015. It shows that the enhanced values of
168+ ! ! VMF in the equatorial region gives opportunity to simulate the
169+ ! ! QBO-like oscillations in the equatorial zonal winds and lead to more
170+ ! ! realistic simulations of the equatorial dynamics in GEOS-5 operational
171+ ! ! and MERRA-2 reanalysis products. For the first vertically extended
172+ ! ! version of FV3GFS in the stratosphere and mesosphere, this simplified
173+ ! ! function of VMF allows us to tune the model climate and to evaluate
174+ ! ! multi-year simulations of FV3GFS with the MERRA-2 and ERA-5 reanalysis
175+ ! ! products, along with temperature, ozone, and water vapor observations
176+ ! ! of current satellite missions. After delivery of the UGWP-code, the
177+ ! ! EMC group developed and tested approach to modulate the zonal mean
178+ ! ! NGW forcing by 3D-distributions of the total precipitation as a proxy
179+ ! ! for the excitation of NGWs by convection and the vertically-integrated
180+ ! ! (surface - tropopause) Turbulent Kinetic Energy (TKE). The verification
181+ ! ! scores with updated NGW forcing, as reported elsewhere by EMC researchers,
182+ ! ! display noticeable improvements in the forecast scores produced by
189183! ! FV3GFS configuration extended into the mesosphere.
190184! !
191185! > \section arg_table_cires_ugwp_run Argument Table
@@ -300,8 +294,9 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr
300294 ugrs, vgrs, tgrs, qgrs(:,:,1 ), kpbl, prsi,del,prsl, prslk, phii, phil, &
301295 dtp, kdt, sgh30, hprime, oc, oa4, clx, theta, sigma, gamma, elvmax, &
302296 dusfcg, dvsfcg, xlat_d, sinlat, coslat, area, cdmbgwd(1 :2 ), &
303- me, master, rdxzb, con_g, con_omega, zmtb, zogw, tau_mtb, tau_ogw, &
304- tau_tofd, dudt_mtb, dudt_ogw, dudt_tms)
297+ me, master, rdxzb, zmtb, zogw, tau_mtb, tau_ogw, &
298+ tau_tofd, dudt_mtb, dudt_ogw, dudt_tms, &
299+ errmsg, errflg)
305300
306301 else ! calling old GFS gravity wave drag as is
307302
@@ -335,7 +330,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr
335330
336331 endif ! do_ugwp
337332
338-
339333 if (ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then
340334 idtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd)
341335 if (idtend>= 1 ) then
@@ -350,7 +344,6 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr
350344 dtend(:,:,idtend) = dtend(:,:,idtend) + Pdtdt* dtp
351345 endif
352346 endif
353-
354347
355348 if (cdmbgwd(3 ) > 0.0 ) then
356349
0 commit comments