Skip to content

Commit

Permalink
Bug fix for physics/MP/GFDL/fv_sat_adj.*: use correct allocation of v…
Browse files Browse the repository at this point in the history
…ariables but internally bend everything back to where it's expected (affects some, but not all variables)
  • Loading branch information
climbfuji committed Apr 18, 2024
1 parent bbc16cd commit e5b77db
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 14 deletions.
6 changes: 5 additions & 1 deletion physics/MP/GFDL/fv_sat_adj.F90
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ end subroutine fv_sat_adj_finalize
!! \section arg_table_fv_sat_adj_run Argument Table
!! \htmlinclude fv_sat_adj_run.html
!!
subroutine fv_sat_adj_run(mdt, zvir, is, ie, isd, ied, kmp, km, kmdelz, js, je, jsd, jed, &
subroutine fv_sat_adj_run(mdt, zvir, is, ie, isd, ied, isc, iec, kmp, km, kmdelz, js, je, jsd, jed, jsc, jec, &
ng, hydrostatic, fast_mp_consv, te0_2d, te0, ngas, qvi, qv, ql, qi, qr, &
qs, qg, hs, peln, delz, delp, pt, pkz, q_con, akap, cappa, area, dtdt, &
out_dt, last_step, do_qa, qa, &
Expand All @@ -245,13 +245,17 @@ subroutine fv_sat_adj_run(mdt, zvir, is, ie, isd, ied, kmp, km, kmdelz, js, je,
integer, intent(in) :: ie
integer, intent(in) :: isd
integer, intent(in) :: ied
integer, intent(in) :: isc
integer, intent(in) :: iec
integer, intent(in) :: kmp
integer, intent(in) :: km
integer, intent(in) :: kmdelz
integer, intent(in) :: js
integer, intent(in) :: je
integer, intent(in) :: jsd
integer, intent(in) :: jed
integer, intent(in) :: jsc
integer, intent(in) :: jec
integer, intent(in) :: ng
logical, intent(in) :: hydrostatic
logical, intent(in) :: fast_mp_consv
Expand Down
54 changes: 41 additions & 13 deletions physics/MP/GFDL/fv_sat_adj.meta
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@
dimensions = ()
type = integer
intent = in
[isc]
standard_name = starting_x_direction_index_alloc
long_name = starting X direction index for allocation
units = count
dimensions = ()
type = integer
intent = in
[iec]
standard_name = ending_x_direction_index_alloc
long_name = ending X direction index for allocation
units = count
dimensions = ()
type = integer
intent = in
[isd]
standard_name = starting_x_direction_index_domain
long_name = starting X direction index for domain
Expand Down Expand Up @@ -200,6 +214,20 @@
dimensions = ()
type = integer
intent = in
[jsc]
standard_name = starting_y_direction_index_alloc
long_name = starting X direction index for allocation
units = count
dimensions = ()
type = integer
intent = in
[jec]
standard_name = ending_y_direction_index_alloc
long_name = ending X direction index for allocation
units = count
dimensions = ()
type = integer
intent = in
[ng]
standard_name = number_of_ghost_zones
long_name = number of ghost zones defined in fv_mp
Expand Down Expand Up @@ -248,7 +276,7 @@
standard_name = gas_tracers_for_multi_gas_physics_at_Lagrangian_surface
long_name = gas tracers for multi gas physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics,1:number_of_gases_for_multi_gases_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics,1:number_of_gases_for_multi_gases_physics)
type = real
kind = kind_dyn
intent = inout
Expand All @@ -257,55 +285,55 @@
standard_name = water_vapor_specific_humidity_at_Lagrangian_surface
long_name = water vapor specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = inout
[ql]
standard_name = cloud_liquid_water_specific_humidity_at_Lagrangian_surface
long_name = cloud liquid water specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = inout
[qi]
standard_name = cloud_ice_specific_humidity_at_Lagrangian_surface
long_name = cloud ice specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = inout
[qr]
standard_name = cloud_rain_specific_humidity_at_Lagrangian_surface
long_name = cloud rain specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = inout
[qs]
standard_name = cloud_snow_specific_humidity_at_Lagrangian_surface
long_name = cloud snow specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = inout
[qg]
standard_name = cloud_graupel_specific_humidity_at_Lagrangian_surface
long_name = cloud graupel specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = inout
[hs]
standard_name = surface_geopotential_at_Lagrangian_surface
long_name = surface geopotential at Lagrangian surface
units = m2 s-2
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc)
type = real
kind = kind_dyn
intent = in
Expand All @@ -329,15 +357,15 @@
standard_name = pressure_thickness_at_Lagrangian_surface
long_name = pressure thickness at Lagrangian surface
units = Pa
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = in
[pt]
standard_name = virtual_temperature_at_Lagrangian_surface
long_name = virtual temperature at Lagrangian surface
units = K
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = inout
Expand All @@ -354,7 +382,7 @@
standard_name = cloud_condensed_water_specific_humidity_at_Lagrangian_surface
long_name = cloud condensed water specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_condensed_water_at_Lagrangian_surface)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_condensed_water_at_Lagrangian_surface)
type = real
kind = kind_dyn
intent = inout
Expand All @@ -378,7 +406,7 @@
standard_name = cell_area_for_fast_physics
long_name = area of the grid cell for fast physics
units = m2
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc)
type = real
kind = kind_grid
intent = in
Expand Down Expand Up @@ -415,7 +443,7 @@
standard_name = cloud_fraction_at_Lagrangian_surface
long_name = cloud fraction at Lagrangian surface
units = none
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc:ending_x_direction_index_alloc,starting_y_direction_index_alloc:ending_y_direction_index_alloc,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
intent = out
Expand Down

0 comments on commit e5b77db

Please sign in to comment.