namespace coord_rho

Overview

Regrid columns for the continuous isopycnal (rho) coordinate. More…

namespace coord_rho {

// global variables

integer, parameter nb_regridding_iterations = 1;

// global functions

subroutine, public init_coord_rho(
    CS CS,
    nk nk,
    ref_pressure ref_pressure,
    target_density target_density,
    interp_CS interp_CS
    );

subroutine, public end_coord_rho(CS CS);

subroutine, public set_rho_params(
    CS CS,
    min_thickness min_thickness,
    integrate_downward_for_e integrate_downward_for_e,
    interp_CS interp_CS
    );

subroutine, public build_rho_column(
    CS CS,
    nz nz,
    depth depth,
    h h,
    T T,
    S S,
    eqn_of_state eqn_of_state,
    z_interface z_interface,
    h_neglect h_neglect,
    h_neglect_edge h_neglect_edge
    );

subroutine, public old_inflate_layers_1d(min_thickness min_thickness, nk nk, h h);

} // namespace coord_rho

Detailed Documentation

Regrid columns for the continuous isopycnal (rho) coordinate.

Global Variables

integer, parameter nb_regridding_iterations = 1

Maximum number of regridding iterations.

Global Functions

subroutine, public init_coord_rho(
    CS CS,
    nk nk,
    ref_pressure ref_pressure,
    target_density target_density,
    interp_CS interp_CS
    )

Initialise a rho_CS with pointers to parameters.

Parameters:

cs

Unassociated pointer to hold the control structure

nk

Number of layers in the grid

ref_pressure

Coordinate reference pressure [Pa]

target_density

Nominal density of interfaces [kg m-3]

interp_cs

Controls for interpolation

subroutine, public end_coord_rho(CS CS)

This subroutine deallocates memory in the control structure for the coord_rho module.

Parameters:

cs

Coordinate control structure

subroutine, public set_rho_params(
    CS CS,
    min_thickness min_thickness,
    integrate_downward_for_e integrate_downward_for_e,
    interp_CS interp_CS
    )

This subroutine can be used to set the parameters for the coord_rho module.

Parameters:

cs

Coordinate control structure

min_thickness

Minimum allowed thickness [H ~> m or kg m-2]

integrate_downward_for_e

If true, integrate for interface positions from the top downward. If false, integrate from the bottom upward, as does the rest of the model.

interp_cs

Controls for interpolation

subroutine, public build_rho_column(
    CS CS,
    nz nz,
    depth depth,
    h h,
    T T,
    S S,
    eqn_of_state eqn_of_state,
    z_interface z_interface,
    h_neglect h_neglect,
    h_neglect_edge h_neglect_edge
    )

Build a rho coordinate column.

  1. Density profiles are calculated on the source grid.

  2. Positions of target densities (for interfaces) are found by interpolation.

Parameters:

cs

coord_rho control structure

nz

Number of levels on source grid (i.e. length of h, T, S)

depth

Depth of ocean bottom (positive in m)

h

Layer thicknesses [H ~> m or kg m-2]

t

T for source column

s

S for source column

eqn_of_state

Equation of state structure

z_interface

Absolute positions of interfaces

h_neglect

A negligibly small width for the purpose of cell reconstructions in the same units as h0.

h_neglect_edge

A negligibly small width for the purpose of edge value calculations in the same units as h0.

subroutine, public old_inflate_layers_1d(
    min_thickness min_thickness,
    nk nk,
    h h
    )

Inflate vanished layers to finite (nonzero) width.

Parameters:

min_thickness

Minimum allowed thickness [H ~> m or kg m-2]

nk

Number of layers in the grid

h

Layer thicknesses [H ~> m or kg m-2]