Skip to content

Commit

Permalink
nesting bug fixes for uninitialized variable in fv3 and incorrect til…
Browse files Browse the repository at this point in the history
…e number in fv3atm (#331)

* pass global tile up to model

* bug fix: initialize hailwat variable
  • Loading branch information
SamuelTrahanNOAA authored Apr 13, 2024
1 parent f060e85 commit 0301022
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions driver/fvGFS/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -864,17 +864,18 @@ subroutine atmosphere_pref (p_ref)
end subroutine atmosphere_pref


subroutine atmosphere_control_data (i1, i2, j1, j2, kt, p_hydro, hydro, tile_num)
subroutine atmosphere_control_data (i1, i2, j1, j2, kt, p_hydro, hydro, tile_of_mosaic, global_tile_num)
integer, intent(out) :: i1, i2, j1, j2, kt
logical, intent(out), optional :: p_hydro, hydro
integer, intent(out), optional :: tile_num
integer, intent(out), optional :: tile_of_mosaic, global_tile_num
i1 = Atm(mygrid)%bd%isc
i2 = Atm(mygrid)%bd%iec
j1 = Atm(mygrid)%bd%jsc
j2 = Atm(mygrid)%bd%jec
kt = Atm(mygrid)%npz

if (present(tile_num)) tile_num = Atm(mygrid)%tile_of_mosaic
if (present(global_tile_num)) global_tile_num = Atm(mygrid)%global_tile
if (present(tile_of_mosaic)) tile_of_mosaic = Atm(mygrid)%tile_of_mosaic
if (present(p_hydro)) p_hydro = Atm(mygrid)%flagstruct%phys_hydrostatic
if (present( hydro)) hydro = Atm(mygrid)%flagstruct%hydrostatic

Expand Down
1 change: 1 addition & 0 deletions model/fv_nesting.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,7 @@ subroutine setup_pt_NH_BC(pt_BC, delp_BC, delz_BC, sphum_BC, q_BC, nq, &
rainwat = get_tracer_index (MODEL_ATMOS, 'rainwat')
snowwat = get_tracer_index (MODEL_ATMOS, 'snowwat')
graupel = get_tracer_index (MODEL_ATMOS, 'graupel')
hailwat = get_tracer_index (MODEL_ATMOS, 'hailwat')

if (is == 1) then
if (.not. allocated(dum_West)) then
Expand Down

0 comments on commit 0301022

Please sign in to comment.