Skip to content

Commit

Permalink
Optional argument cleanup: GWD
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Nov 19, 2024
1 parent e2eea95 commit 76eaf4a
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 55 deletions.
8 changes: 4 additions & 4 deletions physics/GWD/cires_ugwp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr
real(kind=kind_phys), intent(out), dimension(:) :: tau_mtb, tau_ogw, tau_tofd, tau_ngw
real(kind=kind_phys), intent(out), dimension(:, :):: gw_dudt, gw_dvdt, gw_dtdt, gw_kdis
real(kind=kind_phys), intent(out), dimension(:, :):: dudt_mtb, dudt_tms
real(kind=kind_phys), intent(out), dimension(:, :), optional :: dudt_ogw
real(kind=kind_phys), intent(out), dimension(:), optional :: dusfc_ms, dvsfc_ms, dusfc_bl, dvsfc_bl
real(kind=kind_phys), intent(out), dimension(:, :), optional :: dtauy2d_ms
real(kind=kind_phys), intent(out), dimension(:, :), optional :: dtaux2d_bl, dtauy2d_bl
real(kind=kind_phys), intent(out), dimension(:, :) :: dudt_ogw
real(kind=kind_phys), intent(out), dimension(:) :: dusfc_ms, dvsfc_ms, dusfc_bl, dvsfc_bl
real(kind=kind_phys), intent(out), dimension(:, :) :: dtauy2d_ms
real(kind=kind_phys), intent(out), dimension(:, :) :: dtaux2d_bl, dtauy2d_bl

! dtend is only allocated if ldiag=.true.
real(kind=kind_phys), optional, intent(inout) :: dtend(:,:,:)
Expand Down
8 changes: 0 additions & 8 deletions physics/GWD/cires_ugwp.meta
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dvsfc_ms]
standard_name = vertically_integrated_y_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag
long_name = integrated y momentum flux from mesoscale gwd
Expand All @@ -613,7 +612,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dusfc_bl]
standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag
long_name = integrated x momentum flux from blocking drag
Expand All @@ -622,7 +620,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dvsfc_bl]
standard_name = vertically_integrated_y_momentum_flux_due_to_blocking_drag
long_name = integrated y momentum flux from blocking drag
Expand All @@ -631,7 +628,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dudt_ogw]
standard_name = tendency_of_x_wind_due_to_mesoscale_orographic_gravity_wave_drag
long_name = instantaneous change in x wind due to orographic gw drag
Expand All @@ -640,7 +636,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dtauy2d_ms]
standard_name = tendency_of_y_wind_due_to_mesoscale_orographic_gravity_wave_drag
long_name = instantaneous change in y wind due to orographic gw drag
Expand All @@ -649,7 +644,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dtaux2d_bl]
standard_name = tendency_of_x_wind_due_to_blocking_drag
long_name = x wind tendency from blocking drag
Expand All @@ -658,7 +652,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dtauy2d_bl]
standard_name = tendency_of_y_wind_due_to_blocking_drag
long_name = y wind tendency from blocking drag
Expand All @@ -667,7 +660,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dudt_mtb]
standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag
long_name = instantaneous change in x wind due to mountain blocking drag
Expand Down
2 changes: 1 addition & 1 deletion physics/GWD/cires_ugwp_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ subroutine cires_ugwp_post_run (ldiag_ugwp, dtf, im, levs, &
real(kind=kind_phys), intent(inout), dimension(:) :: tot_mtb, tot_ogw, tot_tofd, tot_ngw
real(kind=kind_phys), intent(inout), dimension(:) :: tot_zmtb, tot_zlwb, tot_zogw
real(kind=kind_phys), intent(in), dimension(:,:) :: gw_dtdt, gw_dudt, gw_dvdt, dudt_mtb, dudt_tms
real(kind=kind_phys), intent(in), dimension(:,:), optional :: dudt_ogw
real(kind=kind_phys), intent(in), dimension(:,:) :: dudt_ogw
real(kind=kind_phys), intent(inout), dimension(:,:), optional :: du3dt_mtb, du3dt_ogw, du3dt_tms, du3dt_ngw, dv3dt_ngw
real(kind=kind_phys), intent(inout), dimension(:,:) :: dtdt, dudt, dvdt

Expand Down
1 change: 0 additions & 1 deletion physics/GWD/cires_ugwp_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[dudt_tms]
standard_name = tendency_of_x_wind_due_to_turbulent_orographic_form_drag
long_name = instantaneous change in x wind due to TOFD
Expand Down
4 changes: 2 additions & 2 deletions physics/GWD/drag_suite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ subroutine drag_suite_run( &
real(kind=kind_phys), intent(in) :: var(:),oc1(:), &
& oa4(:,:),ol4(:,:), &
& dx(:)
real(kind=kind_phys), intent(in), optional :: varss(:),oc1ss(:), &
real(kind=kind_phys), intent(in) :: varss(:),oc1ss(:), &
& oa4ss(:,:),ol4ss(:,:)
real(kind=kind_phys), intent(in) :: THETA(:),SIGMA(:), &
& GAMMA(:),ELVMAX(:)
Expand Down Expand Up @@ -1567,7 +1567,7 @@ subroutine drag_suite_psl( &
real(kind=kind_phys), intent(in) :: var(:),oc1(:), &
& oa4(:,:),ol4(:,:), &
& dx(:)
real(kind=kind_phys), intent(in), optional :: varss(:),oc1ss(:), &
real(kind=kind_phys), intent(in) :: varss(:),oc1ss(:), &
& oa4ss(:,:),ol4ss(:,:)
real(kind=kind_phys), intent(in) :: THETA(:),SIGMA(:), &
& GAMMA(:),ELVMAX(:)
Expand Down
4 changes: 0 additions & 4 deletions physics/GWD/drag_suite.meta
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[oc1ss]
standard_name = convexity_of_subgrid_orography_small_scale
long_name = convexity of subgrid height_above_mean_sea_level small scale
Expand All @@ -223,7 +222,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[oa4ss]
standard_name = asymmetry_of_subgrid_orography_small_scale
long_name = asymmetry of subgrid height_above_mean_sea_level small scale
Expand All @@ -232,7 +230,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[ol4ss]
standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale
long_name = horizontal fraction of grid box covered by subgrid height_above_mean_sea_level higher than critical height small scale
Expand All @@ -241,7 +238,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[theta]
standard_name = angle_from_east_of_maximum_subgrid_orographic_variations
long_name = angle with respect to east of maximum subgrid orographic variations
Expand Down
10 changes: 5 additions & 5 deletions physics/GWD/ugwpv1_gsldrag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
real(kind=kind_phys), intent(in), dimension(:,:) :: clx, oa4

real(kind=kind_phys), intent(in), dimension(:) :: dx
real(kind=kind_phys), intent(in), dimension(:), optional :: varss,oc1ss
real(kind=kind_phys), intent(in), dimension(:,:), optional :: oa4ss,ol4ss
real(kind=kind_phys), intent(in), dimension(:) :: varss,oc1ss
real(kind=kind_phys), intent(in), dimension(:,:) :: oa4ss,ol4ss

!=====
!ccpp-style passing constants, I prefer to take them out from the "call-subr" list
Expand Down Expand Up @@ -413,7 +413,7 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,

!Output (optional):

real(kind=kind_phys), intent(out), dimension(:), optional :: &
real(kind=kind_phys), intent(out), dimension(:) :: &
du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, &
du_osscol, dv_osscol, du_ofdcol, dv_ofdcol
!
Expand All @@ -423,11 +423,11 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
real(kind=kind_phys), intent(out), dimension(:) :: dusfcg, dvsfcg
real(kind=kind_phys), intent(out), dimension(:) :: tau_ogw, tau_ngw, tau_oss

real(kind=kind_phys), intent(out) , dimension(:,:), optional :: &
real(kind=kind_phys), intent(out) , dimension(:,:) :: &
dudt_ogw, dvdt_ogw, dudt_obl, dvdt_obl, &
dudt_oss, dvdt_oss, dudt_ofd, dvdt_ofd

real(kind=kind_phys), intent(out) , dimension(:,:), optional :: dudt_ngw, dvdt_ngw, kdis_ngw, dtdt_ngw
real(kind=kind_phys), intent(out) , dimension(:,:) :: dudt_ngw, dvdt_ngw, kdis_ngw, dtdt_ngw
real(kind=kind_phys), intent(out) , dimension(:,:) :: dudt_gw, dvdt_gw, dtdt_gw, kdis_gw

real(kind=kind_phys), intent(out) , dimension(:) :: zogw, zlwb, zobl, zngw
Expand Down
24 changes: 0 additions & 24 deletions physics/GWD/ugwpv1_gsldrag.meta
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[oc1ss]
standard_name = convexity_of_subgrid_orography_small_scale
long_name = convexity of subgrid height_above_mean_sea_level small scale
Expand All @@ -577,7 +576,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[oa4ss]
standard_name = asymmetry_of_subgrid_orography_small_scale
long_name = asymmetry of subgrid height_above_mean_sea_level small scale
Expand All @@ -586,7 +584,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[ol4ss]
standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale
long_name = horizontal fraction of grid box covered by sso higher than critical height small scale
Expand All @@ -595,7 +592,6 @@
type = real
kind = kind_phys
intent = in
optional = True
[dx]
standard_name = characteristic_grid_lengthscale
long_name = size of the grid cell
Expand Down Expand Up @@ -786,7 +782,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dvdt_ogw]
standard_name = tendency_of_y_wind_due_to_mesoscale_orographic_gravity_wave_drag
long_name = y wind tendency from meso scale ogw
Expand All @@ -795,7 +790,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[du_ogwcol]
standard_name = vertically_integrated_x_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag
long_name = integrated x momentum flux from meso scale ogw
Expand All @@ -804,7 +798,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dv_ogwcol]
standard_name = vertically_integrated_y_momentum_flux_due_to_mesoscale_orographic_gravity_wave_drag
long_name = integrated y momentum flux from meso scale ogw
Expand All @@ -813,7 +806,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dudt_obl]
standard_name = tendency_of_x_wind_due_to_blocking_drag
long_name = x wind tendency from blocking drag
Expand All @@ -822,7 +814,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dvdt_obl]
standard_name = tendency_of_y_wind_due_to_blocking_drag
long_name = y wind tendency from blocking drag
Expand All @@ -831,7 +822,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[du_oblcol]
standard_name = vertically_integrated_x_momentum_flux_due_to_blocking_drag
long_name = integrated x momentum flux from blocking drag
Expand All @@ -840,7 +830,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dv_oblcol]
standard_name = vertically_integrated_y_momentum_flux_due_to_blocking_drag
long_name = integrated y momentum flux from blocking drag
Expand All @@ -849,7 +838,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dudt_oss]
standard_name = tendency_of_x_wind_due_to_small_scale_gravity_wave_drag
long_name = x wind tendency from small scale gwd
Expand All @@ -858,7 +846,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dvdt_oss]
standard_name = tendency_of_y_wind_due_to_small_scale_gravity_wave_drag
long_name = y wind tendency from small scale gwd
Expand All @@ -867,7 +854,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[du_osscol]
standard_name = vertically_integrated_x_momentum_flux_due_to_small_scale_gravity_wave_drag
long_name = integrated x momentum flux from small scale gwd
Expand All @@ -876,7 +862,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dv_osscol]
standard_name = vertically_integrated_y_momentum_flux_due_to_small_scale_gravity_wave_drag
long_name = integrated y momentum flux from small scale gwd
Expand All @@ -885,7 +870,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dudt_ofd]
standard_name = tendency_of_x_wind_due_to_form_drag
long_name = x wind tendency from form drag
Expand All @@ -894,7 +878,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dvdt_ofd]
standard_name = tendency_of_y_wind_due_to_form_drag
long_name = y wind tendency from form drag
Expand All @@ -903,7 +886,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[du_ofdcol]
standard_name = vertically_integrated_x_momentum_flux_due_to_form_drag
long_name = integrated x momentum flux from form drag
Expand All @@ -912,7 +894,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dv_ofdcol]
standard_name = vertically_integrated_y_momentum_flux_due_to_form_drag
long_name = integrated y momentum flux from form drag
Expand All @@ -921,7 +902,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dudt_ngw]
standard_name = tendency_of_x_wind_due_to_nonorographic_gravity_wave_drag
long_name = zonal wind tendency due to non-stationary GWs
Expand All @@ -930,7 +910,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dvdt_ngw]
standard_name = tendency_of_y_wind_due_to_nonorographic_gravity_wave_drag
long_name = meridional wind tendency due to non-stationary GWs
Expand All @@ -939,7 +918,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dtdt_ngw]
standard_name = tendency_of_air_temperature_due_to_nonorographic_gravity_wave_drag
long_name = air temperature tendency due to non-stationary GWs
Expand All @@ -948,7 +926,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[kdis_ngw]
standard_name = atmosphere_momentum_diffusivity_due_to_nonorographic_gravity_wave_drag
long_name = eddy mixing due to non-stationary GWs
Expand All @@ -957,7 +934,6 @@
type = real
kind = kind_phys
intent = out
optional = True
[dudt_gw]
standard_name = tendency_of_x_wind_due_to_gravity_wave_drag
long_name = zonal wind tendency due to all GWs
Expand Down
4 changes: 2 additions & 2 deletions physics/GWD/unified_ugwp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,11 @@ subroutine unified_ugwp_run(me, master, im, levs, ak,bk, ntrac, dtp, fhzero, kdt
integer, intent(in), dimension(:) :: vtype
real(kind=kind_phys), intent(in), dimension(:) :: ak, bk
real(kind=kind_phys), intent(in), dimension(:) :: oro, oro_uf, hprime, oc, theta, sigma, gamma
real(kind=kind_phys), intent(in), dimension(:), optional :: varss,oc1ss
real(kind=kind_phys), intent(in), dimension(:) :: varss,oc1ss
real(kind=kind_phys), intent(in), dimension(:) :: dx

!vay-nov 2020
real(kind=kind_phys), intent(in), dimension(:,:), optional :: oa4ss,ol4ss
real(kind=kind_phys), intent(in), dimension(:,:) :: oa4ss,ol4ss

logical, intent(in) :: flag_for_gwd_generic_tend

Expand Down
Loading

0 comments on commit 76eaf4a

Please sign in to comment.