Skip to content

Commit 2483645

Browse files
committed
check for flag_for_generic_tendency_due_to_gravity_wave_drag before computing diagnostic tendencies in drag_suite
1 parent a018a00 commit 2483645

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

physics/GWD/drag_suite.F90

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ subroutine drag_suite_run( &
217217
& g, cp, rd, rv, fv, pi, imx, cdmbgwd, alpha_fd, &
218218
& me, master, lprnt, ipr, rdxzb, dx, gwd_opt, &
219219
& do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, &
220+
& flag_for_gwd_generic_tend, &
220221
& dtend, dtidx, index_of_process_orographic_gwd, &
221222
& index_of_temperature, index_of_x_wind, &
222223
& index_of_y_wind, ldiag3d, ldiag_ugwp, ugwp_seq_update, &
@@ -325,7 +326,7 @@ subroutine drag_suite_run( &
325326
real(kind=kind_phys), intent(in) :: deltim, G, CP, RD, RV, &
326327
& cdmbgwd(:), alpha_fd
327328
real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:)
328-
logical, intent(in) :: ldiag3d
329+
logical, intent(in) :: ldiag3d, flag_for_gwd_generic_tend
329330
integer, intent(in) :: dtidx(:,:), index_of_temperature, &
330331
& index_of_process_orographic_gwd, index_of_x_wind, index_of_y_wind
331332

@@ -542,7 +543,7 @@ subroutine drag_suite_run( &
542543
dtdt(:,:) = 0.
543544
dqdt(:,:,:)= 0.
544545

545-
if(ldiag3d) then
546+
if(ldiag3d .and. .not. flag_for_gwd_generic_tend) then
546547
udtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd)
547548
vdtend = dtidx(index_of_y_wind,index_of_process_orographic_gwd)
548549
Tdtend = dtidx(index_of_temperature,index_of_process_orographic_gwd)
@@ -1433,7 +1434,7 @@ subroutine drag_suite_psl( &
14331434
& g, cp, rd, rv, fv, pi, imx, cdmbgwd, alpha_fd, &
14341435
& me, master, lprnt, ipr, rdxzb, dx, gwd_opt, &
14351436
& do_gsl_drag_ls_bl, do_gsl_drag_ss, do_gsl_drag_tofd, &
1436-
& psl_gwd_dx_factor, &
1437+
& psl_gwd_dx_factor, flag_for_gwd_generic_tend, &
14371438
& dtend, dtidx, index_of_process_orographic_gwd, &
14381439
& index_of_temperature, index_of_x_wind, &
14391440
& index_of_y_wind, ldiag3d, ldiag_ugwp, ugwp_seq_update, &
@@ -1543,7 +1544,7 @@ subroutine drag_suite_psl( &
15431544
real(kind=kind_phys), intent(in) :: deltim, G, CP, RD, RV, &
15441545
& cdmbgwd(:), alpha_fd
15451546
real(kind=kind_phys), intent(inout), optional :: dtend(:,:,:)
1546-
logical, intent(in) :: ldiag3d
1547+
logical, intent(in) :: ldiag3d, flag_for_gwd_generic_tend
15471548
integer, intent(in) :: dtidx(:,:), index_of_temperature, &
15481549
& index_of_process_orographic_gwd, index_of_x_wind, index_of_y_wind
15491550

@@ -1768,7 +1769,7 @@ subroutine drag_suite_psl( &
17681769
dvdt(:,:) = 0.
17691770
dtdt(:,:) = 0.
17701771

1771-
if(ldiag3d) then
1772+
if(ldiag3d .and. .not. flag_for_gwd_generic_tend) then
17721773
udtend = dtidx(index_of_x_wind,index_of_process_orographic_gwd)
17731774
vdtend = dtidx(index_of_y_wind,index_of_process_orographic_gwd)
17741775
Tdtend = dtidx(index_of_temperature,index_of_process_orographic_gwd)

physics/GWD/drag_suite.meta

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,13 @@
605605
dimensions = ()
606606
type = logical
607607
intent = in
608+
[flag_for_gwd_generic_tend]
609+
standard_name = flag_for_generic_tendency_due_to_gravity_wave_drag
610+
long_name = true if GFS_GWD_generic should calculate tendencies
611+
units = flag
612+
dimensions = ()
613+
type = logical
614+
intent = in
608615
[dtend]
609616
standard_name = cumulative_change_of_state_variables
610617
long_name = diagnostic tendencies for state variables

physics/GWD/ugwpv1_gsldrag.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
563563
cdmbgwd(1:2),alpha_fd,me,master, &
564564
lprnt,ipr,rdxzb,dx,gwd_opt, &
565565
do_gsl_drag_ls_bl,do_gsl_drag_ss,do_gsl_drag_tofd, &
566-
psl_gwd_dx_factor, &
566+
psl_gwd_dx_factor, flag_for_gwd_generic_tend, &
567567
dtend, dtidx, index_of_process_orographic_gwd, &
568568
index_of_temperature, index_of_x_wind, &
569569
index_of_y_wind, ldiag3d, ldiag_ugwp, &

physics/GWD/unified_ugwp.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ subroutine unified_ugwp_run(me, master, im, levs, ak,bk, ntrac, dtp, kdt,
521521
cdmbgwd,alpha_fd,me,master, &
522522
lprnt,ipr,rdxzb,dx,gwd_opt, &
523523
do_gsl_drag_ls_bl,do_gsl_drag_ss,do_gsl_drag_tofd, &
524-
psl_gwd_dx_factor, &
524+
psl_gwd_dx_factor, flag_for_gwd_generic_tend, &
525525
dtend, dtidx, index_of_process_orographic_gwd, &
526526
index_of_temperature, index_of_x_wind, &
527527
index_of_y_wind, ldiag3d, ldiag_ugwp, &

0 commit comments

Comments
 (0)