@@ -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)
0 commit comments