SOCA
soca_geom_mod::soca_geom Type Reference

Geometry data structure. More...

Collaboration diagram for soca_geom_mod::soca_geom:

Public Member Functions

procedure init => soca_geom_init
 Setup geometry object. More...
 
procedure end => soca_geom_end
 Geometry destructor. More...
 
procedure set_atlas_lonlat => soca_geom_set_atlas_lonlat
 Set ATLAS lonlat fieldset. More...
 
procedure fill_atlas_fieldset => soca_geom_fill_atlas_fieldset
 Fill ATLAS fieldset. More...
 
procedure clone => soca_geom_clone
 Clone, self = other. More...
 
procedure gridgen => soca_geom_gridgen
 Generate the grid with the help of mom6, and save it to a file for use later. More...
 
procedure thickness2depth => soca_geom_thickness2depth
 Get layer depth from layer thicknesses. More...
 
procedure struct2atlas => soca_geom_struct2atlas
 Copy a structured field into an ATLAS fieldset. More...
 
procedure atlas2struct => soca_geom_atlas2struct
 Copy a structured field from an ATLAS fieldset. \ see soca_geom_atlas2struct More...
 
procedure write => soca_geom_write
 Write geometry to file. More...
 

Public Attributes

type(mom_domain_type), pointer domain
 Ocean model domain. More...
 
integer nzo
 
integer nzo_zstar
 
type(soca_fields_metadatafields_metadata
 instance of the metadata that is read in from a config file upon initialization More...
 
character(len=:), allocatable geom_grid_file
 filename of geometry More...
 
type(fckit_mpi_comm) f_comm
 MPI communicator. More...
 
type(atlas_functionspace_pointcloud) afunctionspace
 atlas stuff More...
 
local domain indices
integer isc
 
integer iec
 
integer jsc
 
integer jec
 
data domain indices
integer isd
 
integer ied
 
integer jsd
 
integer jed
 
global domain indices
integer isg
 
integer ieg
 
integer jsg
 
integer jeg
 
local compute domain indices
integer iscl
 
integer iecl
 
integer jscl
 
integer jecl
 
local data domain indices
integer isdl
 
integer iedl
 
integer jsdl
 
integer jedl
 
grid latitude/longitude
real(kind=kind_real), dimension(:), allocatable lonh
 cell center nominal longitude More...
 
real(kind=kind_real), dimension(:), allocatable lath
 cell center nominal latitude More...
 
real(kind=kind_real), dimension(:), allocatable lonq
 cell corner nominal longitude More...
 
real(kind=kind_real), dimension(:), allocatable latq
 cell corner nominal latitude More...
 
real(kind=kind_real), dimension(:,:), allocatable lon
 Tracer grid longitude. More...
 
real(kind=kind_real), dimension(:,:), allocatable lat
 Tracer grid latitude. More...
 
real(kind=kind_real), dimension(:,:), allocatable lonu
 U grid longitude. More...
 
real(kind=kind_real), dimension(:,:), allocatable latu
 U grid latitude. More...
 
real(kind=kind_real), dimension(:,:), allocatable lonv
 V grid longitude. More...
 
real(kind=kind_real), dimension(:,:), allocatable latv
 V grid latitude. More...
 
ocean/land masks
real(kind=kind_real), dimension(:,:), allocatable mask2d
 mask for tracer grid. 0 = land 1 = ocean More...
 
real(kind=kind_real), dimension(:,:), allocatable mask2du
 mask for U grid. 0 = land 1 = ocean More...
 
real(kind=kind_real), dimension(:,:), allocatable mask2dv
 mask for V grid. 0 = land 1 = ocean More...
 
other grid properties
real(kind=kind_real), dimension(:,:), allocatable sin_rot
 sine of rotation between logical grid north More...
 
real(kind=kind_real), dimension(:,:), allocatable cos_rot
 cosine of rotation between logical grid north More...
 
real(kind=kind_real), dimension(:,:), allocatable cell_area
 cell area (m^2) More...
 
real(kind=kind_real), dimension(:,:), allocatable rossby_radius
 rossby radius (m) at the gridpoint More...
 
real(kind=kind_real), dimension(:,:), allocatable distance_from_coast
 distance to closest land grid point (m) More...
 
real(kind=kind_real), dimension(:,:,:), allocatable h
 layer thickness (m) More...
 
real(kind=kind_real), dimension(:,:,:), allocatable h_zstar
 

Private Attributes

logical, private save_local_domain = .false.
 If true, save the local geometry for each pe. More...
 

Related Functions

(Note that these are not member functions.)

subroutine soca_geom_init (self, f_conf, f_comm)
 Setup geometry object. More...
 
subroutine soca_geom_end (self)
 Geometry destructor. More...
 
subroutine soca_geom_set_atlas_lonlat (self, afieldset)
 Set ATLAS lonlat fieldset. More...
 
subroutine soca_geom_fill_atlas_fieldset (self, afieldset)
 Fill ATLAS fieldset. More...
 
subroutine soca_geom_clone (self, other)
 Clone, self = other. More...
 
subroutine soca_geom_gridgen (self)
 Generate the grid with the help of mom6, and save it to a file for use later. More...
 
subroutine soca_geom_allocate (self)
 Allocate memory and point to mom6 data structure. More...
 
subroutine soca_geom_distance_from_coast (self)
 Calcuate distance from coast for the ocean points. More...
 
subroutine soca_geom_rossby_radius (self)
 Read and store Rossby Radius of deformation. More...
 
subroutine soca_geom_write (self)
 Write geometry to file. More...
 
subroutine soca_geom_read (self)
 Read geometry from file. More...
 
subroutine soca_geom_get_domain_indices (self, domain_type, is, ie, js, je, local)
 Get indices for compute or data domain. More...
 
subroutine soca_geom_thickness2depth (self, h, z)
 Get layer depth from layer thicknesses. More...
 
subroutine soca_geom_struct2atlas (self, dx_struct, dx_atlas)
 Copy a structured field into an ATLAS fieldset. More...
 
subroutine soca_geom_atlas2struct (self, dx_struct, dx_atlas)
 Copy a structured field from an ATLAS fieldset. More...
 

Detailed Description

Geometry data structure.

Definition at line 43 of file soca_geom_mod.F90.

Member Function/Subroutine Documentation

◆ atlas2struct()

procedure soca_geom_mod::soca_geom::atlas2struct

Copy a structured field from an ATLAS fieldset. \ see soca_geom_atlas2struct

Definition at line 145 of file soca_geom_mod.F90.

◆ clone()

procedure soca_geom_mod::soca_geom::clone

Clone, self = other.

See also
soca_geom_clone

Definition at line 133 of file soca_geom_mod.F90.

◆ end()

procedure soca_geom_mod::soca_geom::end

Geometry destructor.

See also
soca_geom_end

Definition at line 124 of file soca_geom_mod.F90.

◆ fill_atlas_fieldset()

procedure soca_geom_mod::soca_geom::fill_atlas_fieldset

Fill ATLAS fieldset.

See also
soca_geom_fill_atlas_fieldset

Definition at line 130 of file soca_geom_mod.F90.

◆ gridgen()

procedure soca_geom_mod::soca_geom::gridgen

Generate the grid with the help of mom6, and save it to a file for use later.

See also
soca_geom_gridgen

Definition at line 136 of file soca_geom_mod.F90.

◆ init()

procedure soca_geom_mod::soca_geom::init

Setup geometry object.

See also
soca_geom_init

Definition at line 121 of file soca_geom_mod.F90.

◆ set_atlas_lonlat()

procedure soca_geom_mod::soca_geom::set_atlas_lonlat

Set ATLAS lonlat fieldset.

See also
soca_geom_set_atlas_lonlat

Definition at line 127 of file soca_geom_mod.F90.

◆ struct2atlas()

procedure soca_geom_mod::soca_geom::struct2atlas

Copy a structured field into an ATLAS fieldset.

See also
soca_geom_struct2atlas

Definition at line 142 of file soca_geom_mod.F90.

◆ thickness2depth()

procedure soca_geom_mod::soca_geom::thickness2depth

Get layer depth from layer thicknesses.

See also
soca_geom_thickness2depth

Definition at line 139 of file soca_geom_mod.F90.

◆ write()

procedure soca_geom_mod::soca_geom::write

Write geometry to file.

See also
soca_geom_write

Definition at line 148 of file soca_geom_mod.F90.

Friends And Related Function Documentation

◆ soca_geom_allocate()

subroutine soca_geom_allocate ( class(soca_geom), intent(inout)  self)
related

Allocate memory and point to mom6 data structure.

Definition at line 423 of file soca_geom_mod.F90.

◆ soca_geom_atlas2struct()

subroutine soca_geom_atlas2struct ( class(soca_geom), intent(in)  self,
real(kind=kind_real), dimension(:,:), intent(inout)  dx_struct,
type(atlas_fieldset), intent(inout)  dx_atlas 
)
related

Copy a structured field from an ATLAS fieldset.

Definition at line 927 of file soca_geom_mod.F90.

◆ soca_geom_clone()

subroutine soca_geom_clone ( class(soca_geom), intent(inout)  self,
class(soca_geom), intent(in)  other 
)
related

Clone, self = other.

Definition at line 315 of file soca_geom_mod.F90.

◆ soca_geom_distance_from_coast()

subroutine soca_geom_distance_from_coast ( class(soca_geom), intent(inout)  self)
related

Calcuate distance from coast for the ocean points.

Definition at line 469 of file soca_geom_mod.F90.

◆ soca_geom_end()

subroutine soca_geom_end ( class(soca_geom), intent(out)  self)
related

Geometry destructor.

Definition at line 219 of file soca_geom_mod.F90.

◆ soca_geom_fill_atlas_fieldset()

subroutine soca_geom_fill_atlas_fieldset ( class(soca_geom), intent(inout)  self,
type(atlas_fieldset), intent(inout)  afieldset 
)
related

Fill ATLAS fieldset.

Definition at line 273 of file soca_geom_mod.F90.

◆ soca_geom_get_domain_indices()

subroutine soca_geom_get_domain_indices ( class(soca_geom), intent(in)  self,
character(len=*), intent(in)  domain_type,
integer, intent(out)  is,
integer, intent(out)  ie,
integer, intent(out)  js,
integer, intent(out)  je,
logical, intent(in), optional  local 
)
related

Get indices for compute or data domain.

Parameters
[in]domain_type"compute", "data", or "global"

Definition at line 838 of file soca_geom_mod.F90.

◆ soca_geom_gridgen()

subroutine soca_geom_gridgen ( class(soca_geom), intent(inout)  self)
related

Generate the grid with the help of mom6, and save it to a file for use later.

Definition at line 358 of file soca_geom_mod.F90.

Here is the call graph for this function:

◆ soca_geom_init()

subroutine soca_geom_init ( class(soca_geom), intent(out)  self,
type(fckit_configuration), intent(in)  f_conf,
type(fckit_mpi_comm), intent(in)  f_comm 
)
related

Setup geometry object.

Parameters
[in]f_commMPI communicator for this geometry

Definition at line 160 of file soca_geom_mod.F90.

Here is the call graph for this function:

◆ soca_geom_read()

subroutine soca_geom_read ( class(soca_geom), intent(inout)  self)
related

Read geometry from file.

Definition at line 725 of file soca_geom_mod.F90.

◆ soca_geom_rossby_radius()

subroutine soca_geom_rossby_radius ( class(soca_geom), intent(inout)  self)
related

Read and store Rossby Radius of deformation.

Input data is interpolated to the current grid.

Definition at line 542 of file soca_geom_mod.F90.

Here is the call graph for this function:

◆ soca_geom_set_atlas_lonlat()

subroutine soca_geom_set_atlas_lonlat ( class(soca_geom), intent(inout)  self,
type(atlas_fieldset), intent(inout)  afieldset 
)
related

Set ATLAS lonlat fieldset.

Definition at line 252 of file soca_geom_mod.F90.

◆ soca_geom_struct2atlas()

subroutine soca_geom_struct2atlas ( class(soca_geom), intent(in)  self,
real(kind=kind_real), dimension(:,:), intent(in)  dx_struct,
type(atlas_fieldset), intent(out)  dx_atlas 
)
related

Copy a structured field into an ATLAS fieldset.

Definition at line 905 of file soca_geom_mod.F90.

◆ soca_geom_thickness2depth()

subroutine soca_geom_thickness2depth ( class(soca_geom), intent(in)  self,
real(kind=kind_real), dimension(:,:,:), intent(in)  h,
real(kind=kind_real), dimension(:,:,:), intent(inout)  z 
)
related

Get layer depth from layer thicknesses.

Parameters
[in]hLayer thickness
[in,out]zMid-layer depth

Definition at line 872 of file soca_geom_mod.F90.

◆ soca_geom_write()

subroutine soca_geom_write ( class(soca_geom), intent(in)  self)
related

Write geometry to file.

Definition at line 582 of file soca_geom_mod.F90.

Here is the call graph for this function:

Member Data Documentation

◆ afunctionspace

type(atlas_functionspace_pointcloud) soca_geom_mod::soca_geom::afunctionspace

atlas stuff

Definition at line 114 of file soca_geom_mod.F90.

◆ cell_area

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::cell_area

cell area (m^2)

Definition at line 101 of file soca_geom_mod.F90.

◆ cos_rot

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::cos_rot

cosine of rotation between logical grid north

Definition at line 100 of file soca_geom_mod.F90.

◆ distance_from_coast

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::distance_from_coast

distance to closest land grid point (m)

Definition at line 103 of file soca_geom_mod.F90.

◆ domain

type(mom_domain_type), pointer soca_geom_mod::soca_geom::domain

Ocean model domain.

Definition at line 44 of file soca_geom_mod.F90.

◆ f_comm

type(fckit_mpi_comm) soca_geom_mod::soca_geom::f_comm

MPI communicator.

Definition at line 113 of file soca_geom_mod.F90.

◆ fields_metadata

type(soca_fields_metadata) soca_geom_mod::soca_geom::fields_metadata

instance of the metadata that is read in from a config file upon initialization

Definition at line 109 of file soca_geom_mod.F90.

◆ geom_grid_file

character(len=:), allocatable soca_geom_mod::soca_geom::geom_grid_file

filename of geometry

Definition at line 112 of file soca_geom_mod.F90.

◆ h

real(kind=kind_real), dimension(:,:,:), allocatable soca_geom_mod::soca_geom::h

layer thickness (m)

Definition at line 104 of file soca_geom_mod.F90.

◆ h_zstar

real(kind=kind_real), dimension(:,:,:), allocatable soca_geom_mod::soca_geom::h_zstar

Definition at line 105 of file soca_geom_mod.F90.

◆ iec

integer soca_geom_mod::soca_geom::iec

Definition at line 49 of file soca_geom_mod.F90.

◆ iecl

integer soca_geom_mod::soca_geom::iecl

Definition at line 64 of file soca_geom_mod.F90.

◆ ied

integer soca_geom_mod::soca_geom::ied

Definition at line 54 of file soca_geom_mod.F90.

◆ iedl

integer soca_geom_mod::soca_geom::iedl

Definition at line 69 of file soca_geom_mod.F90.

◆ ieg

integer soca_geom_mod::soca_geom::ieg

Definition at line 59 of file soca_geom_mod.F90.

◆ isc

integer soca_geom_mod::soca_geom::isc

Definition at line 49 of file soca_geom_mod.F90.

◆ iscl

integer soca_geom_mod::soca_geom::iscl

Definition at line 64 of file soca_geom_mod.F90.

◆ isd

integer soca_geom_mod::soca_geom::isd

Definition at line 54 of file soca_geom_mod.F90.

◆ isdl

integer soca_geom_mod::soca_geom::isdl

Definition at line 69 of file soca_geom_mod.F90.

◆ isg

integer soca_geom_mod::soca_geom::isg

Definition at line 59 of file soca_geom_mod.F90.

◆ jec

integer soca_geom_mod::soca_geom::jec

Definition at line 49 of file soca_geom_mod.F90.

◆ jecl

integer soca_geom_mod::soca_geom::jecl

Definition at line 64 of file soca_geom_mod.F90.

◆ jed

integer soca_geom_mod::soca_geom::jed

Definition at line 54 of file soca_geom_mod.F90.

◆ jedl

integer soca_geom_mod::soca_geom::jedl

Definition at line 69 of file soca_geom_mod.F90.

◆ jeg

integer soca_geom_mod::soca_geom::jeg

Definition at line 59 of file soca_geom_mod.F90.

◆ jsc

integer soca_geom_mod::soca_geom::jsc

Definition at line 49 of file soca_geom_mod.F90.

◆ jscl

integer soca_geom_mod::soca_geom::jscl

Definition at line 64 of file soca_geom_mod.F90.

◆ jsd

integer soca_geom_mod::soca_geom::jsd

Definition at line 54 of file soca_geom_mod.F90.

◆ jsdl

integer soca_geom_mod::soca_geom::jsdl

Definition at line 69 of file soca_geom_mod.F90.

◆ jsg

integer soca_geom_mod::soca_geom::jsg

Definition at line 59 of file soca_geom_mod.F90.

◆ lat

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::lat

Tracer grid latitude.

Definition at line 79 of file soca_geom_mod.F90.

◆ lath

real(kind=kind_real), dimension(:), allocatable soca_geom_mod::soca_geom::lath

cell center nominal latitude

Definition at line 75 of file soca_geom_mod.F90.

◆ latq

real(kind=kind_real), dimension(:), allocatable soca_geom_mod::soca_geom::latq

cell corner nominal latitude

Definition at line 77 of file soca_geom_mod.F90.

◆ latu

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::latu

U grid latitude.

Definition at line 81 of file soca_geom_mod.F90.

◆ latv

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::latv

V grid latitude.

Definition at line 83 of file soca_geom_mod.F90.

◆ lon

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::lon

Tracer grid longitude.

Definition at line 78 of file soca_geom_mod.F90.

◆ lonh

real(kind=kind_real), dimension(:), allocatable soca_geom_mod::soca_geom::lonh

cell center nominal longitude

Definition at line 74 of file soca_geom_mod.F90.

◆ lonq

real(kind=kind_real), dimension(:), allocatable soca_geom_mod::soca_geom::lonq

cell corner nominal longitude

Definition at line 76 of file soca_geom_mod.F90.

◆ lonu

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::lonu

U grid longitude.

Definition at line 80 of file soca_geom_mod.F90.

◆ lonv

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::lonv

V grid longitude.

Definition at line 82 of file soca_geom_mod.F90.

◆ mask2d

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::mask2d

mask for tracer grid. 0 = land 1 = ocean

Definition at line 90 of file soca_geom_mod.F90.

◆ mask2du

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::mask2du

mask for U grid. 0 = land 1 = ocean

Definition at line 92 of file soca_geom_mod.F90.

◆ mask2dv

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::mask2dv

mask for V grid. 0 = land 1 = ocean

Definition at line 94 of file soca_geom_mod.F90.

◆ nzo

integer soca_geom_mod::soca_geom::nzo

Definition at line 45 of file soca_geom_mod.F90.

◆ nzo_zstar

integer soca_geom_mod::soca_geom::nzo_zstar

Definition at line 45 of file soca_geom_mod.F90.

◆ rossby_radius

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::rossby_radius

rossby radius (m) at the gridpoint

Definition at line 102 of file soca_geom_mod.F90.

◆ save_local_domain

logical, private soca_geom_mod::soca_geom::save_local_domain = .false.
private

If true, save the local geometry for each pe.

Definition at line 111 of file soca_geom_mod.F90.

◆ sin_rot

real(kind=kind_real), dimension(:,:), allocatable soca_geom_mod::soca_geom::sin_rot

sine of rotation between logical grid north

Definition at line 99 of file soca_geom_mod.F90.


The documentation for this type was generated from the following file: