SOCA
soca_fields_mod::soca_field Type Reference

Holds all data and metadata related to a single field variable. More...

Collaboration diagram for soca_fields_mod::soca_field:

Public Member Functions

procedure copy => soca_field_copy
 Copy a field from rhs to self. More...
 
procedure delete => soca_field_delete
 Delete the soca_field object. More...
 
procedure check_congruent => soca_field_check_congruent
 Make sure the two fields are the same in terms of name, size, shape. More...
 
procedure update_halo => soca_field_update_halo
 Update the data in the halo region of the field. More...
 
procedure stencil_interp => soca_field_stencil_interp
 Perform spatial interpolation between two grids. More...
 

Public Attributes

character(len=:), allocatable name
 The internally used name of the field. More...
 
integer nz
 The number of vertical levels. More...
 
real(kind=kind_real), dimension(:,:,:), allocatable val
 The actual field data. More...
 
real(kind=kind_real), dimension(:,:), pointer mask => null()
 Pointer to the relevant mask in soca_geom_mod::soca_geom. More...
 
real(kind=kind_real), dimension(:,:), pointer lon => null()
 Pointer to the relevant longitudes in soca_geom_mod::soca_geom. More...
 
real(kind=kind_real), dimension(:,:), pointer lat => null()
 Pointer to the relevant latitudes in soca_geom_mod::soca_geom. More...
 
type(soca_field_metadatametadata
 Parameters for the field as determined by the configuration yaml. More...
 

Related Functions

(Note that these are not member functions.)

subroutine soca_field_copy (self, rhs)
 Copy a field from rhs to self. More...
 
subroutine soca_field_update_halo (self, geom)
 Update the data in the halo region of the field. More...
 
subroutine soca_field_stencil_interp (self, geom, interp2d)
 Perform spatial interpolation between two grids. More...
 
subroutine soca_field_check_congruent (self, rhs)
 Make sure the two fields are the same in terms of name, size, shape. More...
 
subroutine soca_field_delete (self)
 Delete the soca_field object. More...
 

Detailed Description

Holds all data and metadata related to a single field variable.

Instances of these types are to be held by soca_fields. The members soca_field::mask can remain null, in which it is assumed that no mask is used.

Definition at line 54 of file soca_fields_mod.F90.

Member Function/Subroutine Documentation

◆ check_congruent()

procedure soca_fields_mod::soca_field::check_congruent

Make sure the two fields are the same in terms of name, size, shape.

See also
soca_field_check_congruent

Definition at line 94 of file soca_fields_mod.F90.

◆ copy()

procedure soca_fields_mod::soca_field::copy

Copy a field from rhs to self.

See also
soca_field_copy

Definition at line 88 of file soca_fields_mod.F90.

◆ delete()

procedure soca_fields_mod::soca_field::delete

Delete the soca_field object.

See also
soca_field_delete

Definition at line 91 of file soca_fields_mod.F90.

◆ stencil_interp()

procedure soca_fields_mod::soca_field::stencil_interp

Perform spatial interpolation between two grids.

See also
soca_field_stencil_interp

Definition at line 100 of file soca_fields_mod.F90.

◆ update_halo()

procedure soca_fields_mod::soca_field::update_halo

Update the data in the halo region of the field.

See also
soca_field_update_halo

Definition at line 97 of file soca_fields_mod.F90.

Friends And Related Function Documentation

◆ soca_field_check_congruent()

subroutine soca_field_check_congruent ( class(soca_field), intent(in)  self,
type(soca_field), intent(in)  rhs 
)
related

Make sure the two fields are the same in terms of name, size, shape.

Exceptions
abor1_ftnHalts program if fields are not congruent
Parameters
[in]rhsother field to check for congruency

Definition at line 298 of file soca_fields_mod.F90.

◆ soca_field_copy()

subroutine soca_field_copy ( class(soca_field), intent(inout)  self,
type(soca_field), intent(in)  rhs 
)
related

Copy a field from rhs to self.

If the fields are not congruent, this subroutine will throw an error. self must be allocated first.

Parameters
[in,out]selfThe field to copy to
[in]rhsThe field to copy from

Definition at line 237 of file soca_fields_mod.F90.

◆ soca_field_delete()

subroutine soca_field_delete ( class(soca_field), intent(inout)  self)
related

Delete the soca_field object.

Definition at line 318 of file soca_fields_mod.F90.

◆ soca_field_stencil_interp()

subroutine soca_field_stencil_interp ( class(soca_field), intent(inout)  self,
type(soca_geom), intent(in), pointer  geom,
type(horiz_interp_type), intent(in)  interp2d 
)
related

Perform spatial interpolation between two grids.

Interpolation used is inverse distance weidghted, taking into consideration the mask.

Parameters
[in]geomThe geometry to interpolate to
[in]interp2dinterpolation object created by calling horiz_interp_spherical_new() in FMS

Definition at line 274 of file soca_fields_mod.F90.

◆ soca_field_update_halo()

subroutine soca_field_update_halo ( class(soca_field), intent(inout)  self,
type(soca_geom), intent(in), pointer  geom 
)
related

Update the data in the halo region of the field.

Todo:
have field keep a pointer to its relevant sections of soca_geom?
Parameters
[in]geomsoca_geom from soca_fields

Definition at line 256 of file soca_fields_mod.F90.

Member Data Documentation

◆ lat

real(kind=kind_real), dimension(:,:), pointer soca_fields_mod::soca_field::lat => null()

Pointer to the relevant latitudes in soca_geom_mod::soca_geom.

Note
This should never remain null() after initialization of the class.

Definition at line 78 of file soca_fields_mod.F90.

◆ lon

real(kind=kind_real), dimension(:,:), pointer soca_fields_mod::soca_field::lon => null()

Pointer to the relevant longitudes in soca_geom_mod::soca_geom.

Note
This should never remain null() after initialization of the class.

Definition at line 73 of file soca_fields_mod.F90.

◆ mask

real(kind=kind_real), dimension(:,:), pointer soca_fields_mod::soca_field::mask => null()

Pointer to the relevant mask in soca_geom_mod::soca_geom.

If null, it is assumed that no mask is present

Definition at line 68 of file soca_fields_mod.F90.

◆ metadata

type(soca_field_metadata) soca_fields_mod::soca_field::metadata

Parameters for the field as determined by the configuration yaml.

see soca_fields_metadata_mod::soca_field_metadata

Definition at line 83 of file soca_fields_mod.F90.

◆ name

character(len=:), allocatable soca_fields_mod::soca_field::name

The internally used name of the field.

Definition at line 57 of file soca_fields_mod.F90.

◆ nz

integer soca_fields_mod::soca_field::nz

The number of vertical levels.

Definition at line 60 of file soca_fields_mod.F90.

◆ val

real(kind=kind_real), dimension(:,:,:), allocatable soca_fields_mod::soca_field::val

The actual field data.

Definition at line 63 of file soca_fields_mod.F90.


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