FV3DYCORE  Version 2.0.0
fv_surf_map_mod Module Reference

Functions/Subroutines

subroutine, public surfdrv (npx, npy, grid, agrid, area, dx, dy, dxa, dya, dxc, dyc, sin_sg, phis, stretch_fac, nested, bounded_domain, npx_global, domain, grid_number, bd)
 
subroutine, public fv3_zs_filter (bd, isd, ied, jsd, jed, npx, npy, npx_global, stretch_fac, bounded_domain, domain, area, dxa, dya, dx, dy, dxc, dyc, grid, agrid, sin_sg, phis, oro)
 
subroutine two_delta_filter (npx, npy, q, area, dx, dy, dxa, dya, dxc, dyc, sin_sg, cd, zero_ocean, check_slope, filter_type, oro, bounded_domain, domain, bd, ntmax)
 
subroutine, public del2_cubed_sphere (npx, npy, q, area, dx, dy, dxc, dyc, sin_sg, nmax, cd, zero_ocean, oro, bounded_domain, domain, bd)
 
subroutine, public del4_cubed_sphere (npx, npy, q, area, dx, dy, dxc, dyc, sin_sg, nmax, zero_ocean, oro, bounded_domain, domain, bd)
 
subroutine map_to_cubed_raw (igh, im, jt, lat1, lon1, zs, ft, grid, agrid, q2, f2, h2, npx, npy, jstart, jend, stretch_fac, bounded_domain, npx_global, bd)
 
logical function inside_p4 (p1, p2, p3, p4, pp, th0)
 
subroutine handle_err (status)
 The subroutine 'handle_err' returns an error when it cannot find or correctly read in an external file. More...
 
subroutine remove_ice_sheets (lon, lat, lfrac, bd)
 
subroutine read_namelist
 The subroutine 'read_namelis' reads the namelist file, writes the namelist to log file, and initializes constants. More...
 
subroutine zonal_mean (im, p, zmean)
 The sugroutine 'zonal_mean' replaces 'p' with its zonal mean. More...
 

Variables

logical zs_filter = .true.
 
logical zero_ocean = .true.
 
integer nlon = 21600
 
integer nlat = 10800
 
real cd4 = 0.15
 Dimensionless coeff for del-4 diffusion (with FCT) More...
 
real cd2 = -1.
 Dimensionless coeff for del-2 diffusion (-1 gives resolution-determined value) More...
 
real peak_fac = 1.05
 overshoot factor for the mountain peak More...
 
real max_slope = 0.15
 max allowable terrain slope: 1 –> 45 deg 0.15 for C768 or lower; 0.25 C1536; 0.3 for C3072 More...
 
integer n_del2_weak = 12
 
integer n_del2_strong = -1
 
integer n_del4 = -1
 
character(len=128) surf_file = "INPUT/topo1min.nc"
 
character(len=6) surf_format = 'netcdf'
 
logical namelist_read = .false.
 
real(kind=r_grid) da_min
 
real cos_grid
 
character(len=3) grid_string = ''
 
real, dimension(:,:), allocatable, public zs_g
 
real, dimension(:,:), allocatable, public sgh_g
 
real, dimension(:,:), allocatable, public oro_g
 

Function/Subroutine Documentation

◆ del2_cubed_sphere()

subroutine, public fv_surf_map_mod::del2_cubed_sphere ( integer, intent(in)  npx,
integer, intent(in)  npy,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(inout)  q,
real(kind=r_grid), dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  area,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dx,
real, dimension(bd%isd:bd%ied+1,bd%jsd:bd%jed), intent(in)  dy,
real, dimension(bd%isd:bd%ied+1,bd%jsd:bd%jed), intent(in)  dxc,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dyc,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed,9), intent(in)  sin_sg,
integer, intent(in)  nmax,
real(kind=r_grid), intent(in)  cd,
logical, intent(in)  zero_ocean,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  oro,
logical, intent(in)  bounded_domain,
type(domain2d), intent(inout)  domain,
type(fv_grid_bounds_type), intent(in)  bd 
)
Parameters
[in]oro0==water, 1==land

Definition at line 860 of file fv_surf_map.F90.

◆ del4_cubed_sphere()

subroutine, public fv_surf_map_mod::del4_cubed_sphere ( integer, intent(in)  npx,
integer, intent(in)  npy,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(inout)  q,
real(kind=r_grid), dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  area,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dx,
real, dimension(bd%isd:bd%ied+1,bd%jsd:bd%jed), intent(in)  dy,
real, dimension(bd%isd:bd%ied+1,bd%jsd:bd%jed), intent(in)  dxc,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dyc,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed,9), intent(in)  sin_sg,
integer, intent(in)  nmax,
logical, intent(in)  zero_ocean,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  oro,
logical, intent(in)  bounded_domain,
type(domain2d), intent(inout)  domain,
type(fv_grid_bounds_type), intent(in)  bd 
)
Parameters
[in]oro0==water, 1==land

Definition at line 963 of file fv_surf_map.F90.

◆ fv3_zs_filter()

subroutine, public fv_surf_map_mod::fv3_zs_filter ( type(fv_grid_bounds_type), intent(in)  bd,
integer, intent(in)  isd,
integer, intent(in)  ied,
integer, intent(in)  jsd,
integer, intent(in)  jed,
integer, intent(in)  npx,
integer, intent(in)  npy,
integer, intent(in)  npx_global,
real(kind=r_grid), intent(in)  stretch_fac,
logical, intent(in)  bounded_domain,
type(domain2d), intent(inout)  domain,
real(kind=r_grid), dimension(isd:ied,jsd:jed), intent(in)  area,
real, dimension(isd:ied,jsd:jed), intent(in)  dxa,
real, dimension(isd:ied,jsd:jed), intent(in)  dya,
real, dimension(isd:ied, jsd:jed+1), intent(in)  dx,
real, dimension(isd:ied+1,jsd:jed), intent(in)  dy,
real, dimension(isd:ied+1,jsd:jed), intent(in)  dxc,
real, dimension(isd:ied, jsd:jed+1), intent(in)  dyc,
real(kind=r_grid), dimension(isd:ied+1, jsd:jed+1,2), intent(in)  grid,
real(kind=r_grid), dimension(isd:ied, jsd:jed, 2), intent(in)  agrid,
real, dimension(isd:ied,jsd:jed,9), intent(in)  sin_sg,
real, dimension(isd:ied,jsd,jed), intent(inout)  phis,
real, dimension(isd:ied,jsd,jed), intent(inout)  oro 
)

Definition at line 514 of file fv_surf_map.F90.

◆ handle_err()

subroutine fv_surf_map_mod::handle_err ( integer  status)
private

The subroutine 'handle_err' returns an error when it cannot find or correctly read in an external file.

Definition at line 1535 of file fv_surf_map.F90.

◆ inside_p4()

logical function fv_surf_map_mod::inside_p4 ( real, dimension(3), intent(in)  p1,
real, dimension(3), intent(in)  p2,
real, dimension(3), intent(in)  p3,
real, dimension(3), intent(in)  p4,
real, dimension(3), intent(in)  pp,
real, intent(in)  th0 
)
private

Definition at line 1491 of file fv_surf_map.F90.

◆ map_to_cubed_raw()

subroutine fv_surf_map_mod::map_to_cubed_raw ( integer, intent(in)  igh,
integer, intent(in)  im,
integer, intent(in)  jt,
real, dimension(jt+1), intent(in)  lat1,
real, dimension(im+1), intent(in)  lon1,
real(kind=4), dimension(-igh:im+igh,jt), intent(in)  zs,
real(kind=4), dimension(-igh:im+igh,jt), intent(in)  ft,
real(kind=r_grid), dimension(bd%isd:bd%ied+1, bd%jsd:bd%jed+1,2), intent(in)  grid,
real(kind=r_grid), dimension(bd%isd:bd%ied, bd%jsd:bd%jed, 2), intent(in)  agrid,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed), intent(out)  q2,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed), intent(out)  f2,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed), intent(out)  h2,
integer, intent(in)  npx,
integer, intent(in)  npy,
integer, intent(in)  jstart,
integer, intent(in)  jend,
real(kind=r_grid), intent(in)  stretch_fac,
logical, intent(in)  bounded_domain,
integer, intent(in)  npx_global,
type(fv_grid_bounds_type), intent(in)  bd 
)
private
Parameters
[in]lat1original southern edge of the cell [-pi/2:pi/2]
[in]lon1original western edge of the cell [0:2*pi]
[out]q2Mapped data at the target resolution
[out]f2oro
[out]h2variances of terrain

Definition at line 1199 of file fv_surf_map.F90.

◆ read_namelist()

subroutine fv_surf_map_mod::read_namelist ( )
private

The subroutine 'read_namelis' reads the namelist file, writes the namelist to log file, and initializes constants.

Definition at line 1598 of file fv_surf_map.F90.

◆ remove_ice_sheets()

subroutine fv_surf_map_mod::remove_ice_sheets ( real(kind=r_grid), dimension(bd%isd:bd%ied,bd%jsd:bd%jed), intent(in)  lon,
real(kind=r_grid), dimension(bd%isd:bd%ied,bd%jsd:bd%jed), intent(in)  lat,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed), intent(inout)  lfrac,
type(fv_grid_bounds_type), intent(in)  bd 
)
private

Definition at line 1546 of file fv_surf_map.F90.

◆ surfdrv()

subroutine, public fv_surf_map_mod::surfdrv ( integer, intent(in)  npx,
integer, intent(in)  npy,
real(kind=r_grid), dimension(bd%isd:bd%ied+1, bd%jsd:bd%jed+1,2), intent(in)  grid,
real(kind=r_grid), dimension(bd%isd:bd%ied, bd%jsd:bd%jed,2), intent(in)  agrid,
real(kind=r_grid), dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  area,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dx,
real, dimension(bd%isd:bd%ied+1, bd%jsd:bd%jed), intent(in)  dy,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  dxa,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  dya,
real, dimension(bd%isd:bd%ied+1, bd%jsd:bd%jed), intent(in)  dxc,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dyc,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed,9), intent(in)  sin_sg,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(out)  phis,
real(kind=r_grid), intent(in)  stretch_fac,
logical, intent(in)  nested,
logical, intent(in)  bounded_domain,
integer, intent(in)  npx_global,
type(domain2d), intent(inout)  domain,
integer, intent(in)  grid_number,
type(fv_grid_bounds_type), intent(in)  bd 
)

Definition at line 134 of file fv_surf_map.F90.

◆ two_delta_filter()

subroutine fv_surf_map_mod::two_delta_filter ( integer, intent(in)  npx,
integer, intent(in)  npy,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(inout)  q,
real(kind=r_grid), dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  area,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dx,
real, dimension(bd%isd:bd%ied+1,bd%jsd:bd%jed), intent(in)  dy,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  dxa,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  dya,
real, dimension(bd%isd:bd%ied+1,bd%jsd:bd%jed), intent(in)  dxc,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed+1), intent(in)  dyc,
real, dimension(bd%isd:bd%ied,bd%jsd:bd%jed,9), intent(in)  sin_sg,
real, intent(in)  cd,
logical, intent(in)  zero_ocean,
logical, intent(in)  check_slope,
integer, intent(in)  filter_type,
real, dimension(bd%isd:bd%ied, bd%jsd:bd%jed), intent(in)  oro,
logical, intent(in)  bounded_domain,
type(domain2d), intent(inout)  domain,
type(fv_grid_bounds_type), intent(in)  bd,
integer, intent(in)  ntmax 
)
private
Parameters
[in]filter_type0: strong, 1: weak
[in]oro0==water, 1==land

Definition at line 578 of file fv_surf_map.F90.

◆ zonal_mean()

subroutine fv_surf_map_mod::zonal_mean ( integer, intent(in)  im,
real(kind=4), dimension(im), intent(inout)  p,
real, intent(out)  zmean 
)
private

The sugroutine 'zonal_mean' replaces 'p' with its zonal mean.

Definition at line 1632 of file fv_surf_map.F90.

Variable Documentation

◆ cd2

real fv_surf_map_mod::cd2 = -1.
private

Dimensionless coeff for del-2 diffusion (-1 gives resolution-determined value)

Definition at line 104 of file fv_surf_map.F90.

◆ cd4

real fv_surf_map_mod::cd4 = 0.15
private

Dimensionless coeff for del-4 diffusion (with FCT)

Definition at line 103 of file fv_surf_map.F90.

◆ cos_grid

real fv_surf_map_mod::cos_grid
private

Definition at line 118 of file fv_surf_map.F90.

◆ da_min

real(kind=r_grid) fv_surf_map_mod::da_min
private

Definition at line 117 of file fv_surf_map.F90.

◆ grid_string

character(len=3) fv_surf_map_mod::grid_string = ''
private

Definition at line 119 of file fv_surf_map.F90.

◆ max_slope

real fv_surf_map_mod::max_slope = 0.15
private

max allowable terrain slope: 1 –> 45 deg 0.15 for C768 or lower; 0.25 C1536; 0.3 for C3072

Definition at line 106 of file fv_surf_map.F90.

◆ n_del2_strong

integer fv_surf_map_mod::n_del2_strong = -1
private

Definition at line 109 of file fv_surf_map.F90.

◆ n_del2_weak

integer fv_surf_map_mod::n_del2_weak = 12
private

Definition at line 108 of file fv_surf_map.F90.

◆ n_del4

integer fv_surf_map_mod::n_del4 = -1
private

Definition at line 110 of file fv_surf_map.F90.

◆ namelist_read

logical fv_surf_map_mod::namelist_read = .false.
private

Definition at line 115 of file fv_surf_map.F90.

◆ nlat

integer fv_surf_map_mod::nlat = 10800
private

Definition at line 102 of file fv_surf_map.F90.

◆ nlon

integer fv_surf_map_mod::nlon = 21600
private

Definition at line 101 of file fv_surf_map.F90.

◆ oro_g

real, dimension(:,:), allocatable, public fv_surf_map_mod::oro_g

Definition at line 124 of file fv_surf_map.F90.

◆ peak_fac

real fv_surf_map_mod::peak_fac = 1.05
private

overshoot factor for the mountain peak

Definition at line 105 of file fv_surf_map.F90.

◆ sgh_g

real, dimension(:,:), allocatable, public fv_surf_map_mod::sgh_g

Definition at line 124 of file fv_surf_map.F90.

◆ surf_file

character(len=128) fv_surf_map_mod::surf_file = "INPUT/topo1min.nc"
private

Definition at line 113 of file fv_surf_map.F90.

◆ surf_format

character(len=6) fv_surf_map_mod::surf_format = 'netcdf'
private

Definition at line 114 of file fv_surf_map.F90.

◆ zero_ocean

logical fv_surf_map_mod::zero_ocean = .true.
private

Definition at line 100 of file fv_surf_map.F90.

◆ zs_filter

logical fv_surf_map_mod::zs_filter = .true.
private

Definition at line 99 of file fv_surf_map.F90.

◆ zs_g

real, dimension(:,:), allocatable, public fv_surf_map_mod::zs_g

Definition at line 124 of file fv_surf_map.F90.