FV3DYCORE  Version 1.1.0
atmosphere_mod Module Reference

The module 'atmosphere' provides the interface for the Cubed-Sphere FV dynamical core. More...

Functions/Subroutines

subroutine, public atmosphere_init (Time_init, Time, Time_step, Grid_box, area)
 The subroutine 'atmosphere_init' is an API to initialize the FV3 dynamical core, including the grid structures, memory, initial state (self-initialization or restart), and diagnostics. More...
 
subroutine p_adi (km, ng, ifirst, ilast, jfirst, jlast, ptop, delp, pt, ps, pe, peln, pk, pkz, hydrostatic)
 The subroutine 'p_adi' computes (ps, pk, pe, peln, pkz) given (ptop, delp). More...
 
subroutine, public atmosphere_dynamics (Time)
 The subroutine 'atmosphere_dynamics' is an API for the main driver of the FV3 dynamical core responsible for executing a "dynamics" step. More...
 
subroutine, public atmosphere_end (Time, Grid_box)
 The subroutine 'atmosphere_end' is an API for the termination of the FV3 dynamical core responsible for writing out a restart and final diagnostic state. More...
 
subroutine, public atmosphere_restart (timestamp)
 The subroutine 'atmosphere_restart' is an API to save restart information at a given timestamp. This API is used to provide intermediate restart capability to the atmospheric driver. More...
 
subroutine, public atmosphere_resolution (i_size, j_size, global)
 The subroutine 'atmospehre_resolution' is an API to return the local extents of the current MPI-rank or the global extents of the current cubed-sphere tile. More...
 
subroutine, public atmosphere_pref (p_ref)
 The subroutine 'atmosphere_pref' is an API to return the reference pressure. More...
 
subroutine, public atmosphere_control_data (i1, i2, j1, j2, kt, p_hydro, hydro, tile_num)
 
subroutine, public atmosphere_grid_ctr (lon, lat)
 The subroutine 'atmosphere_grid_ctr' is an API that returns the longitude and latitude cell centers of the current MPI-rank. More...
 
subroutine, public atmosphere_grid_bdry (blon, blat, global)
 The subroutine 'atmosphere_grid_bdry' is an API to returns the longitude and latitude finite volume edges (grid box) for the current MPI-rank. More...
 
subroutine, public set_atmosphere_pelist ()
 
subroutine, public atmosphere_domain (fv_domain, layout, regional, nested, pelist)
 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. Coupling is done using the mass/temperature grid with no halos. More...
 
subroutine, public atmosphere_diag_axes (axes)
 The subroutine 'atmosphere_diag_axes' is an API to return the axis indices for the atmospheric (mass) grid. More...
 
subroutine, public atmosphere_etalvls (ak, bk, flip)
 The subroutine 'atmosphere_etalvls' is an API to return the ak/bk pairs used to compute the eta or pressure levels. By default, the vertical dimension assumes the standard FV3 convention of TOA (k=1) to Surface (k=npz). More...
 
subroutine, public atmosphere_hgt (hgt, position, relative, flip)
 The subroutine 'atmosphere_hgt' is an API to return the height coordinate. By default, the vertical dimension assumes the standard FV3 convention of TOA (k=1) to Surface (k=npz). There are options to choose location [level (interface) or layer] and absolute vs. relative height (zero-based). More...
 
subroutine, public atmosphere_scalar_field_halo (data, halo, isize, jsize, ksize, data_p)
 The subroutine 'atmosphere_scalar_field_halo' is an API to return halo information of the current MPI_rank for an input scalar field. Up to three point haloes can be returned by this API which includes special handling for the cubed-sphere tile corners. Output will be in (i,j,k) while input can be in (i,j,k) or horizontally-packed form (ix,k). More...
 
subroutine, public atmosphere_diss_est (npass)
 
subroutine, public atmosphere_nggps_diag (Time, init, ltavg, avg_max_length)
 The subroutine 'atmosphere_nggps_diag' is an API to trigger output of diagnostics in NCEP/EMC format. More...
 
subroutine get_bottom_mass (t_bot, tr_bot, p_bot, z_bot, p_surf, slp)
 
subroutine get_bottom_wind (u_bot, v_bot)
 
subroutine, public atmosphere_get_bottom_layer (Atm_block, DYCORE_Data)
 The subroutine 'atmosphere_get_bottom_layer' is an API to provide the bottom layer quantities needed for coupling with other external components. The data will be provided in a DDT which is a packed, blocked structure. More...
 
subroutine get_stock_pe (index, value)
 
subroutine, public atmosphere_state_update (Time, IPD_Data, IAU_Data, Atm_block, flip_vc)
 The subroutine 'atmosphere_state_update' is an API to apply tendencies and compute a consistent prognostic state. More...
 
subroutine adiabatic_init (zvir, nudge_dz, time)
 The subroutine 'adiabatic_init' is an optional step during initialization to pre-condition a solution via backward-forward steps with capability for various nudgings. More...
 
subroutine, public atmos_phys_driver_statein (IPD_Data, Atm_block, flip_vc)
 The subroutine 'atmos_phys_driver_statein' is an API to populate the IPD_DataStatein container with the prognostic state at the end of the advection (dynamics) step of integration. Performs a mass adjustment to be consistent with the GFS physics and if necessary, converts quantities to hydrostatic representation. More...
 

Variables

character(len=20) mod_name = 'fvGFS/atmosphere_mod'
 
type(time_type) time_step_atmos
 
real dt_atmos
 
real zvir
 
integer npx
 
integer npy
 
integer npz
 
integer ncnst
 
integer pnats
 
integer isc
 
integer iec
 
integer jsc
 
integer jec
 
integer isd
 
integer ied
 
integer jsd
 
integer jed
 
integer nq
 
integer sec
 
integer seconds
 
integer days
 
integer id_dynam
 
integer id_fv_diag
 
integer id_subgridz
 
logical cold_start = .false.
 
integer, dimension(:), allocatable id_tracerdt_dyn
 
integer sphum
 
integer liq_wat
 
integer rainwat
 
integer ice_wat
 
integer snowwat
 
integer graupel
 
integer, public mytile = 1
 
integer p_split = 1
 
integer, dimension(:), allocatable pelist
 
logical, dimension(:), allocatable grids_on_this_pe
 
type(fv_atmos_type), dimension(:), allocatable, target, public atm
 
integer id_udt_dyn
 
integer id_vdt_dyn
 
real, parameter w0_big = 60.
 
real, dimension(:,:,:), allocatable u_dt
 
real, dimension(:,:,:), allocatable v_dt
 
real, dimension(:,:,:), allocatable t_dt
 
real, dimension(:,:), allocatable pref
 
real, dimension(:), allocatable dum1d
 
logical first_diag = .true.
 

Detailed Description

The module 'atmosphere' provides the interface for the Cubed-Sphere FV dynamical core.

Function/Subroutine Documentation

◆ adiabatic_init()

subroutine atmosphere_mod::adiabatic_init ( real, intent(in)  zvir,
logical, intent(inout)  nudge_dz,
type(time_type), intent(in)  time 
)
private

The subroutine 'adiabatic_init' is an optional step during initialization to pre-condition a solution via backward-forward steps with capability for various nudgings.

Definition at line 1609 of file atmosphere.F90.

◆ atmos_phys_driver_statein()

subroutine, public atmosphere_mod::atmos_phys_driver_statein ( type (ipd_data_type), dimension(:), intent(inout)  IPD_Data,
type (block_control_type), intent(in)  Atm_block,
logical, intent(in)  flip_vc 
)

The subroutine 'atmos_phys_driver_statein' is an API to populate the IPD_DataStatein container with the prognostic state at the end of the advection (dynamics) step of integration. Performs a mass adjustment to be consistent with the GFS physics and if necessary, converts quantities to hydrostatic representation.

Definition at line 1897 of file atmosphere.F90.

◆ atmosphere_control_data()

subroutine, public atmosphere_mod::atmosphere_control_data ( integer, intent(out)  i1,
integer, intent(out)  i2,
integer, intent(out)  j1,
integer, intent(out)  j2,
integer, intent(out)  kt,
logical, intent(out), optional  p_hydro,
logical, intent(out), optional  hydro,
integer, intent(out), optional  tile_num 
)

Definition at line 809 of file atmosphere.F90.

◆ atmosphere_diag_axes()

subroutine, public atmosphere_mod::atmosphere_diag_axes ( integer, dimension (:), intent(out)  axes)

The subroutine 'atmosphere_diag_axes' is an API to return the axis indices for the atmospheric (mass) grid.

Definition at line 896 of file atmosphere.F90.

◆ atmosphere_diss_est()

subroutine, public atmosphere_mod::atmosphere_diss_est ( integer, intent(in)  npass)

Definition at line 1071 of file atmosphere.F90.

◆ atmosphere_domain()

subroutine, public atmosphere_mod::atmosphere_domain ( type(domain2d), intent(out)  fv_domain,
integer, dimension(2), intent(out)  layout,
logical, intent(out)  regional,
logical, intent(out)  nested,
integer, dimension(:), intent(out), pointer  pelist 
)

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. Coupling is done using the mass/temperature grid with no halos.

Definition at line 875 of file atmosphere.F90.

◆ atmosphere_dynamics()

subroutine, public atmosphere_mod::atmosphere_dynamics ( type(time_type), intent(in)  Time)

The subroutine 'atmosphere_dynamics' is an API for the main driver of the FV3 dynamical core responsible for executing a "dynamics" step.

Definition at line 604 of file atmosphere.F90.

◆ atmosphere_end()

subroutine, public atmosphere_mod::atmosphere_end ( type (time_type), intent(in)  Time,
type(grid_box_type), intent(inout)  Grid_box 
)

The subroutine 'atmosphere_end' is an API for the termination of the FV3 dynamical core responsible for writing out a restart and final diagnostic state.

Definition at line 716 of file atmosphere.F90.

◆ atmosphere_etalvls()

subroutine, public atmosphere_mod::atmosphere_etalvls ( real(kind=kind_phys), dimension(:), intent(inout), pointer  ak,
real(kind=kind_phys), dimension(:), intent(inout), pointer  bk,
logical, intent(in)  flip 
)

The subroutine 'atmosphere_etalvls' is an API to return the ak/bk pairs used to compute the eta or pressure levels. By default, the vertical dimension assumes the standard FV3 convention of TOA (k=1) to Surface (k=npz).

Parameters
[in]flipcontrol vertical index flipping

Definition at line 913 of file atmosphere.F90.

◆ atmosphere_get_bottom_layer()

subroutine, public atmosphere_mod::atmosphere_get_bottom_layer ( type(block_control_type), intent(in)  Atm_block,
type(dycore_data_type), dimension(:), intent(inout)  DYCORE_Data 
)

The subroutine 'atmosphere_get_bottom_layer' is an API to provide the bottom layer quantities needed for coupling with other external components. The data will be provided in a DDT which is a packed, blocked structure.

Definition at line 1249 of file atmosphere.F90.

◆ atmosphere_grid_bdry()

subroutine, public atmosphere_mod::atmosphere_grid_bdry ( real, dimension(:,:), intent(out)  blon,
real, dimension(:,:), intent(out)  blat,
logical, intent(in), optional  global 
)

The subroutine 'atmosphere_grid_bdry' is an API to returns the longitude and latitude finite volume edges (grid box) for the current MPI-rank.

Parameters
[out]blatUnit: radian

Definition at line 845 of file atmosphere.F90.

◆ atmosphere_grid_ctr()

subroutine, public atmosphere_mod::atmosphere_grid_ctr ( real(kind=kind_phys), dimension(:,:), intent(out)  lon,
real(kind=kind_phys), dimension(:,:), intent(out)  lat 
)

The subroutine 'atmosphere_grid_ctr' is an API that returns the longitude and latitude cell centers of the current MPI-rank.

Parameters
[out]latUnit: radian

Definition at line 828 of file atmosphere.F90.

◆ atmosphere_hgt()

subroutine, public atmosphere_mod::atmosphere_hgt ( real(kind=kind_phys), dimension(:,:,:), intent(inout), pointer  hgt,
character(len=5), intent(in)  position,
logical, intent(in)  relative,
logical, intent(in)  flip 
)

The subroutine 'atmosphere_hgt' is an API to return the height coordinate. By default, the vertical dimension assumes the standard FV3 convention of TOA (k=1) to Surface (k=npz). There are options to choose location [level (interface) or layer] and absolute vs. relative height (zero-based).

Parameters
[in]positionlevel (interface) vs layer
[in]relativecontrol absolute vs. relative height
[in]flipcontrol vertical index flipping

Definition at line 935 of file atmosphere.F90.

◆ atmosphere_init()

subroutine, public atmosphere_mod::atmosphere_init ( type (time_type), intent(in)  Time_init,
type (time_type), intent(in)  Time,
type (time_type), intent(in)  Time_step,
type(grid_box_type), intent(inout)  Grid_box,
real(kind=kind_phys), dimension(:,:), intent(inout), pointer  area 
)

The subroutine 'atmosphere_init' is an API to initialize the FV3 dynamical core, including the grid structures, memory, initial state (self-initialization or restart), and diagnostics.

Definition at line 271 of file atmosphere.F90.

◆ atmosphere_nggps_diag()

subroutine, public atmosphere_mod::atmosphere_nggps_diag ( type(time_type), intent(in)  Time,
logical, intent(in), optional  init,
logical, intent(in), optional  ltavg,
real, intent(in), optional  avg_max_length 
)

The subroutine 'atmosphere_nggps_diag' is an API to trigger output of diagnostics in NCEP/EMC format.

If register is present and set to .true., will make the initialization call. Can output 3D prognostic fields via either NCEP 'write_component' or GFDL/FMS 'diag_manager'.

Definition at line 1101 of file atmosphere.F90.

◆ atmosphere_pref()

subroutine, public atmosphere_mod::atmosphere_pref ( real, dimension(:,:), intent(inout)  p_ref)

The subroutine 'atmosphere_pref' is an API to return the reference pressure.

Definition at line 801 of file atmosphere.F90.

◆ atmosphere_resolution()

subroutine, public atmosphere_mod::atmosphere_resolution ( integer, intent(out)  i_size,
integer, intent(out)  j_size,
logical, intent(in), optional  global 
)

The subroutine 'atmospehre_resolution' is an API to return the local extents of the current MPI-rank or the global extents of the current cubed-sphere tile.

Definition at line 781 of file atmosphere.F90.

◆ atmosphere_restart()

subroutine, public atmosphere_mod::atmosphere_restart ( character(len=*), intent(in)  timestamp)

The subroutine 'atmosphere_restart' is an API to save restart information at a given timestamp. This API is used to provide intermediate restart capability to the atmospheric driver.

Definition at line 770 of file atmosphere.F90.

◆ atmosphere_scalar_field_halo()

subroutine, public atmosphere_mod::atmosphere_scalar_field_halo ( real(kind=kind_phys), dimension(1:isize,1:jsize,ksize), intent(inout)  data,
integer, intent(in)  halo,
integer, intent(in)  isize,
integer, intent(in)  jsize,
integer, intent(in)  ksize,
real(kind=kind_phys), dimension(:,:), intent(in), optional  data_p 
)

The subroutine 'atmosphere_scalar_field_halo' is an API to return halo information of the current MPI_rank for an input scalar field. Up to three point haloes can be returned by this API which includes special handling for the cubed-sphere tile corners. Output will be in (i,j,k) while input can be in (i,j,k) or horizontally-packed form (ix,k).

Parameters
[in,out]dataoutput array to return the field with halo (i,j,k) optionally input for field already in (i,j,k) form sized to include the halo of the field (+ 2*halo)
[in]halosize of the halo (must be less than 3)
[in]isizehorizontal resolution in i-dir with haloes
[in]jsizehorizontal resolution in j-dir with haloes
[in]ksizevertical resolution
[in]data_poptional input field in packed format (ix,k)

Definition at line 995 of file atmosphere.F90.

◆ atmosphere_state_update()

subroutine, public atmosphere_mod::atmosphere_state_update ( type(time_type), intent(in)  Time,
type(ipd_data_type), dimension(:), intent(in)  IPD_Data,
type(iau_external_data_type), intent(in)  IAU_Data,
type(block_control_type), intent(in)  Atm_block,
logical, intent(in)  flip_vc 
)

The subroutine 'atmosphere_state_update' is an API to apply tendencies and compute a consistent prognostic state.

Definition at line 1387 of file atmosphere.F90.

◆ get_bottom_mass()

subroutine atmosphere_mod::get_bottom_mass ( real, dimension(isc:iec,jsc:jec), intent(out)  t_bot,
real, dimension(isc:iec,jsc:jec,nq), intent(out)  tr_bot,
real, dimension(isc:iec,jsc:jec), intent(out)  p_bot,
real, dimension(isc:iec,jsc:jec), intent(out)  z_bot,
real, dimension(isc:iec,jsc:jec), intent(out)  p_surf,
real, dimension(isc:iec,jsc:jec), intent(out), optional  slp 
)
private

Definition at line 1163 of file atmosphere.F90.

◆ get_bottom_wind()

subroutine atmosphere_mod::get_bottom_wind ( real, dimension(isc:iec,jsc:jec), intent(out)  u_bot,
real, dimension(isc:iec,jsc:jec), intent(out)  v_bot 
)
private

Definition at line 1227 of file atmosphere.F90.

◆ get_stock_pe()

subroutine atmosphere_mod::get_stock_pe ( integer, intent(in)  index,
real, intent(out)  value 
)
private

Definition at line 1330 of file atmosphere.F90.

◆ p_adi()

subroutine atmosphere_mod::p_adi ( integer, intent(in)  km,
integer, intent(in)  ng,
integer, intent(in)  ifirst,
integer, intent(in)  ilast,
integer, intent(in)  jfirst,
integer, intent(in)  jlast,
real, intent(in)  ptop,
real, dimension(ifirst-ng:ilast+ng,jfirst-ng:jlast+ng, km), intent(in)  delp,
real, dimension(ifirst-ng:ilast+ng,jfirst-ng:jlast+ng, km), intent(in)  pt,
real, dimension(ifirst-ng:ilast+ng, jfirst-ng:jlast+ng), intent(out)  ps,
real, dimension(ifirst-1:ilast+1,km+1,jfirst-1:jlast+1), intent(out)  pe,
real, dimension(ifirst:ilast, km+1, jfirst:jlast), intent(out)  peln,
real, dimension(ifirst:ilast, jfirst:jlast, km+1), intent(out)  pk,
real, dimension(ifirst:ilast, jfirst:jlast, km), intent(out)  pkz,
logical, intent(in)  hydrostatic 
)
private

The subroutine 'p_adi' computes (ps, pk, pe, peln, pkz) given (ptop, delp).

Parameters
[in]ilastLongitude strip
[in]jlastLatitude strip
[out]peGhosted Edge pressure
[out]pelnEdge pressure

Definition at line 547 of file atmosphere.F90.

◆ set_atmosphere_pelist()

subroutine, public atmosphere_mod::set_atmosphere_pelist ( )

Definition at line 866 of file atmosphere.F90.

Variable Documentation

◆ atm

type(fv_atmos_type), dimension(:), allocatable, target, public atmosphere_mod::atm

Definition at line 252 of file atmosphere.F90.

◆ cold_start

logical atmosphere_mod::cold_start = .false.
private

Definition at line 240 of file atmosphere.F90.

◆ days

integer atmosphere_mod::days
private

Definition at line 238 of file atmosphere.F90.

◆ dt_atmos

real atmosphere_mod::dt_atmos
private

Definition at line 232 of file atmosphere.F90.

◆ dum1d

real, dimension(:), allocatable atmosphere_mod::dum1d
private

Definition at line 260 of file atmosphere.F90.

◆ first_diag

logical atmosphere_mod::first_diag = .true.
private

Definition at line 262 of file atmosphere.F90.

◆ graupel

integer atmosphere_mod::graupel
private

Definition at line 243 of file atmosphere.F90.

◆ grids_on_this_pe

logical, dimension(:), allocatable atmosphere_mod::grids_on_this_pe
private

Definition at line 251 of file atmosphere.F90.

◆ ice_wat

integer atmosphere_mod::ice_wat
private

Definition at line 243 of file atmosphere.F90.

◆ id_dynam

integer atmosphere_mod::id_dynam
private

Definition at line 239 of file atmosphere.F90.

◆ id_fv_diag

integer atmosphere_mod::id_fv_diag
private

Definition at line 239 of file atmosphere.F90.

◆ id_subgridz

integer atmosphere_mod::id_subgridz
private

Definition at line 239 of file atmosphere.F90.

◆ id_tracerdt_dyn

integer, dimension(:), allocatable atmosphere_mod::id_tracerdt_dyn
private

Definition at line 242 of file atmosphere.F90.

◆ id_udt_dyn

integer atmosphere_mod::id_udt_dyn
private

Definition at line 254 of file atmosphere.F90.

◆ id_vdt_dyn

integer atmosphere_mod::id_vdt_dyn
private

Definition at line 254 of file atmosphere.F90.

◆ iec

integer atmosphere_mod::iec
private

Definition at line 235 of file atmosphere.F90.

◆ ied

integer atmosphere_mod::ied
private

Definition at line 236 of file atmosphere.F90.

◆ isc

integer atmosphere_mod::isc
private

Definition at line 235 of file atmosphere.F90.

◆ isd

integer atmosphere_mod::isd
private

Definition at line 236 of file atmosphere.F90.

◆ jec

integer atmosphere_mod::jec
private

Definition at line 235 of file atmosphere.F90.

◆ jed

integer atmosphere_mod::jed
private

Definition at line 236 of file atmosphere.F90.

◆ jsc

integer atmosphere_mod::jsc
private

Definition at line 235 of file atmosphere.F90.

◆ jsd

integer atmosphere_mod::jsd
private

Definition at line 236 of file atmosphere.F90.

◆ liq_wat

integer atmosphere_mod::liq_wat
private

Definition at line 243 of file atmosphere.F90.

◆ mod_name

character(len=20) atmosphere_mod::mod_name = 'fvGFS/atmosphere_mod'
private

Definition at line 225 of file atmosphere.F90.

◆ mytile

integer, public atmosphere_mod::mytile = 1

Definition at line 248 of file atmosphere.F90.

◆ ncnst

integer atmosphere_mod::ncnst
private

Definition at line 234 of file atmosphere.F90.

◆ npx

integer atmosphere_mod::npx
private

Definition at line 234 of file atmosphere.F90.

◆ npy

integer atmosphere_mod::npy
private

Definition at line 234 of file atmosphere.F90.

◆ npz

integer atmosphere_mod::npz
private

Definition at line 234 of file atmosphere.F90.

◆ nq

integer atmosphere_mod::nq
private

Definition at line 237 of file atmosphere.F90.

◆ p_split

integer atmosphere_mod::p_split = 1
private

Definition at line 249 of file atmosphere.F90.

◆ pelist

integer, dimension(:), allocatable atmosphere_mod::pelist
private

Definition at line 250 of file atmosphere.F90.

◆ pnats

integer atmosphere_mod::pnats
private

Definition at line 234 of file atmosphere.F90.

◆ pref

real, dimension(:,:), allocatable atmosphere_mod::pref
private

Definition at line 260 of file atmosphere.F90.

◆ rainwat

integer atmosphere_mod::rainwat
private

Definition at line 243 of file atmosphere.F90.

◆ sec

integer atmosphere_mod::sec
private

Definition at line 238 of file atmosphere.F90.

◆ seconds

integer atmosphere_mod::seconds
private

Definition at line 238 of file atmosphere.F90.

◆ snowwat

integer atmosphere_mod::snowwat
private

Definition at line 243 of file atmosphere.F90.

◆ sphum

integer atmosphere_mod::sphum
private

Definition at line 243 of file atmosphere.F90.

◆ t_dt

real, dimension(:,:,:), allocatable atmosphere_mod::t_dt
private

Definition at line 259 of file atmosphere.F90.

◆ time_step_atmos

type (time_type) atmosphere_mod::time_step_atmos
private

Definition at line 228 of file atmosphere.F90.

◆ u_dt

real, dimension(:,:,:), allocatable atmosphere_mod::u_dt
private

Definition at line 259 of file atmosphere.F90.

◆ v_dt

real, dimension(:,:,:), allocatable atmosphere_mod::v_dt
private

Definition at line 259 of file atmosphere.F90.

◆ w0_big

real, parameter atmosphere_mod::w0_big = 60.
private

Definition at line 256 of file atmosphere.F90.

◆ zvir

real atmosphere_mod::zvir
private

Definition at line 233 of file atmosphere.F90.