SOCA
soca_state_mod::soca_state Type Reference

State fields. More...

Inheritance diagram for soca_state_mod::soca_state:
Collaboration diagram for soca_state_mod::soca_state:

Public Member Functions

interactions with increment
procedure diff_incr => soca_state_diff_incr
 subtract two sets of fields, saving the results in inc More...
 
procedure add_incr => soca_state_add_incr
 add a set of increments to the set of fields More...
 
misc
procedure rotate => soca_state_rotate
 Rotate horizontal vector. More...
 
procedure convert => soca_state_convert
 Change resolution of rhs to self. More...
 
procedure logexpon => soca_state_logexpon
 Apply logarithmic and exponential transformations. More...
 
- Public Member Functions inherited from soca_fields_mod::soca_fields
procedure create => soca_fields_create
 Create a new set of fields, allocate space for them, and initialize to zero. More...
 
procedure copy => soca_fields_copy
 Copy the contents of rhs to self. More...
 
procedure delete => soca_fields_delete
 delete all the fields More...
 
procedure get => soca_fields_get
 Get a pointer to the soca_field with the given name. More...
 
procedure has => soca_fields_has
 Returns whether a field with the given name exists. More...
 
procedure check_congruent => soca_fields_check_congruent
 Make sure two sets of fields are the same shape (same variables, same resolution) More...
 
procedure check_subset => soca_fields_check_subset
 make sure two sets of fields are the same shape for fields they have in common More...
 
procedure add => soca_fields_add
 Add two sets of fields together. More...
 
procedure axpy => soca_fields_axpy
 Add two fields (multiplying the rhs first) More...
 
procedure dot_prod => soca_fields_dotprod
 Calculate the global dot product of two sets of fields. More...
 
procedure gpnorm => soca_fields_gpnorm
 calculate global statistics for each field (min, max, average) More...
 
procedure mul => soca_fields_mul
 Multiply a set of fields by a constant. More...
 
procedure sub => soca_fields_sub
 subtract two sets of fields More...
 
procedure ones => soca_fields_ones
 Set the value of all fields to one. More...
 
procedure zeros => soca_fields_zeros
 Reset the value of all fields to zero. More...
 
procedure read => soca_fields_read
 read a set of fields from a file More...
 
procedure write_file => soca_fields_write_file
 Save soca fields to file using fms write_data. More...
 
procedure write_rst => soca_fields_write_rst
 Save soca fields in a restart format. More...
 
procedure update_halos => soca_fields_update_halos
 Update the halo region of all fields. More...
 
procedure colocate => soca_fields_colocate
 Colocate by interpolating from one c-grid location to another. More...
 
procedure serial_size => soca_fields_serial_size
 Number of elements to return in the serialized array. More...
 
procedure serialize => soca_fields_serialize
 Return the fields as a serialized array. More...
 
procedure deserialize => soca_fields_deserialize
 Deserialize, creating fields from a single serialized array. More...
 

Related Functions

(Note that these are not member functions.)

subroutine soca_state_rotate (self, coordinate, uvars, vvars)
 Rotate horizontal vector. More...
 
subroutine soca_state_add_incr (self, rhs)
 add a set of increments to the set of fields More...
 
subroutine soca_state_diff_incr (x1, x2, inc)
 subtract two sets of fields, saving the results in inc More...
 
subroutine soca_state_convert (self, rhs)
 Change resolution of rhs to self. More...
 
subroutine soca_state_logexpon (self, transfunc, trvars)
 Apply logarithmic and exponential transformations. More...
 

Additional Inherited Members

- Public Attributes inherited from soca_fields_mod::soca_fields
type(soca_geom), pointer geom => null()
 Pointer to the relevant soca_geom_mod::soca_geom. More...
 
type(soca_field), dimension(:), pointer fields => null()
 The soca_field instances that make up the fields. More...
 

Detailed Description

State fields.

Any procedures that are shared with soca_increment are implemented in the soca_fields base class

Definition at line 28 of file soca_state_mod.F90.

Member Function/Subroutine Documentation

◆ add_incr()

procedure soca_state_mod::soca_state::add_incr

add a set of increments to the set of fields

See also
soca_state_add_incr

Definition at line 39 of file soca_state_mod.F90.

◆ convert()

procedure soca_state_mod::soca_state::convert

Change resolution of rhs to self.

See also
soca_state_convert

Definition at line 51 of file soca_state_mod.F90.

◆ diff_incr()

procedure soca_state_mod::soca_state::diff_incr

subtract two sets of fields, saving the results in inc

See also
soca_state_diff_incr

Definition at line 36 of file soca_state_mod.F90.

◆ logexpon()

procedure soca_state_mod::soca_state::logexpon

Apply logarithmic and exponential transformations.

See also
soca_state_logexpon

Definition at line 54 of file soca_state_mod.F90.

◆ rotate()

procedure soca_state_mod::soca_state::rotate

Rotate horizontal vector.

See also
soca_state_rotate

Definition at line 48 of file soca_state_mod.F90.

Friends And Related Function Documentation

◆ soca_state_add_incr()

subroutine soca_state_add_incr ( class(soca_state), intent(inout)  self,
class(soca_increment), intent(in)  rhs 
)
related

add a set of increments to the set of fields

Exceptions
abor1_ftnaborts if rhs is not a subset of self
Parameters
[in]rhsincrement to add to self

Definition at line 132 of file soca_state_mod.F90.

◆ soca_state_convert()

subroutine soca_state_convert ( class(soca_state), intent(inout)  self,
class(soca_state), intent(in)  rhs 
)
related

Change resolution of rhs to self.

self must have valid "layer_depth" and "hocn" fields. The other fields are interpolated from rhs to self. Any variables that are marked as "positive definite" in the metadata configuration file are forced to be >= 0.0 after interpolation.

Parameters
[in]rhssource

Definition at line 198 of file soca_state_mod.F90.

◆ soca_state_diff_incr()

subroutine soca_state_diff_incr ( class(soca_state), intent(in)  x1,
class(soca_state), intent(in)  x2,
class(soca_increment), intent(inout)  inc 
)
related

subtract two sets of fields, saving the results in inc

\( inc = x1 - x2 \)

Exceptions
abor1_ftnaborts if inc and x2 are not subsets of x1

Definition at line 168 of file soca_state_mod.F90.

◆ soca_state_logexpon()

subroutine soca_state_logexpon ( class(soca_state), intent(inout)  self,
character(len=*), intent(in)  transfunc,
type(oops_variables), intent(in)  trvars 
)
related

Apply logarithmic and exponential transformations.

Parameters
[in]transfunc"log" or "expon"
[in]trvarslist of variables to transform

Definition at line 234 of file soca_state_mod.F90.

◆ soca_state_rotate()

subroutine soca_state_rotate ( class(soca_state), intent(inout)  self,
character(len=*), intent(in)  coordinate,
type(oops_variables), intent(in)  uvars,
type(oops_variables), intent(in)  vvars 
)
related

Rotate horizontal vector.

One or more sets of vectors, represented by corresponding u and v variables in the uvars and vvars lists are rotated to north (if coordinate == "north") or rotated back to the grid (if coordinate == "grid")

Parameters
[in]coordinate"north" or "grid"
[in]uvarslist of one or more U variables
[in]vvarslist of one or more V variables

Definition at line 73 of file soca_state_mod.F90.


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