Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions driver/fvGFS/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ module atmosphere_mod
atmosphere_get_bottom_layer, &
atmosphere_nggps_diag, &
get_bottom_mass, get_bottom_wind, &
get_stock_pe, set_atmosphere_pelist
get_stock_pe, set_atmosphere_pelist, &
get_nth_domain_info

!--- physics/radiation data exchange routines
public :: atmos_phys_driver_statein
Expand Down Expand Up @@ -914,15 +915,30 @@ subroutine set_atmosphere_pelist ()
end subroutine set_atmosphere_pelist


subroutine get_nth_domain_info(n, layout, nx, ny, pelist)
integer, intent(in) :: n
integer, intent(out) :: layout(2)
integer, intent(out) :: nx, ny
integer, pointer, intent(out) :: pelist(:)

layout(1:2) = Atm(n)%layout(1:2)
nx = Atm(n)%npx -1
ny = Atm(n)%npy -1
pelist => Atm(n)%pelist

end subroutine get_nth_domain_info

!>@brief The subroutine 'atmosphere_domain' is an API to return
!! the "domain2d" variable associated with the coupling grid and the
!! decomposition for the current cubed-sphere tile.
!>@detail Coupling is done using the mass/temperature grid with no halos.
subroutine atmosphere_domain ( fv_domain, layout, regional, nested, pelist )
subroutine atmosphere_domain ( fv_domain, layout, regional, nested, ngrids_atmos, mygrid_atmos, pelist )
type(domain2d), intent(out) :: fv_domain
integer, intent(out) :: layout(2)
logical, intent(out) :: regional
logical, intent(out) :: nested
integer, intent(out) :: ngrids_atmos
integer, intent(out) :: mygrid_atmos
integer, pointer, intent(out) :: pelist(:)
! returns the domain2d variable associated with the coupling grid
! note: coupling is done using the mass/temperature grid with no halos
Expand All @@ -931,6 +947,8 @@ subroutine atmosphere_domain ( fv_domain, layout, regional, nested, pelist )
layout(1:2) = Atm(mygrid)%layout(1:2)
regional = Atm(mygrid)%flagstruct%regional
nested = ngrids > 1
ngrids_atmos = ngrids
mygrid_atmos = mygrid
call set_atmosphere_pelist()
pelist => Atm(mygrid)%pelist

Expand Down
3 changes: 3 additions & 0 deletions driver/fvGFS/fv_nggps_diag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ subroutine fv_dyn_bundle_setup(axes, dyn_bundle, fcst_grid, quilting, rc)
line=__LINE__, &
file=__FILE__)) &
return ! bail out
deallocate(axis_name_vert)
endif

do id = 1,num_axes
Expand Down Expand Up @@ -1345,6 +1346,8 @@ subroutine fv_dyn_bundle_setup(axes, dyn_bundle, fcst_grid, quilting, rc)
! name="output_file", value=fld_outfilename, rc=rc)
! print *,'in dyn bundle setup, i=',i,' fieldname=',trim(fieldnamelist(i)),' out filename=',trim(fld_outfilename)
! enddo
deallocate(axis_name)
deallocate(all_axes)

end subroutine fv_dyn_bundle_setup

Expand Down
8 changes: 4 additions & 4 deletions model/fv_regional_bc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ subroutine setup_regional_BC(Atm &
!
call check(nf90_open(file_name,nf90_nowrite,ncid)) !<-- Open the BC file; get the file ID.
if (is_master()) then
write(0,*)' opened BC file ',trim(file_name)
write(*,*)' opened BC file ',trim(file_name)
endif
!
!-----------------------------------------------------------------------
Expand Down Expand Up @@ -1672,7 +1672,7 @@ subroutine regional_bc_data(Atm,bc_hour &
!
call check(nf90_open(file_name,nf90_nowrite,ncid)) !<-- Open the BC file; get the file ID.
if (is_master()) then
write(0,*)' opened BC file ',trim(file_name)
write(*,*)' opened BC file ',trim(file_name)
endif
!
call check(nf90_inq_dimid(ncid,'lev',dimid)) !<-- Get the vertical dimension's NetCDF ID.
Expand Down Expand Up @@ -3305,7 +3305,7 @@ subroutine read_regional_bc_file(is_input,ie_input &
call check(status)
endif
if (status /= nf90_noerr) then
if (east_bc.and.is_master()) write(0,*)' WARNING: Tracer ',trim(var_name),' not in input file'
if (east_bc.and.is_master()) write(*,*)' WARNING: Tracer ',trim(var_name),' not in input file'
array_4d(:,:,:,tlev)=0. !<-- Tracer not in input so set to zero in boundary.
!
blend_this_tracer(tlev)=.false. !<-- Tracer not in input so do not apply blending.
Expand Down Expand Up @@ -6741,7 +6741,7 @@ subroutine get_data_source(data_source_fv3gfs,regional)
logical, intent(out):: data_source_fv3gfs

character (len=80) :: source
logical :: lstatus
logical :: lstatus = .false.
type(FmsNetcdfFile_t) :: Gfs_data
integer, allocatable, dimension(:) :: pes !< Array of the pes in the current pelist
!
Expand Down