namespace mom_opacity

Overview

Routines used to calculate the opacity of the ocean. More…

namespace mom_opacity {

// global variables

integer, parameter no_scheme = 0;

// global functions

subroutine, public set_opacity(
    optics optics,
    sw_total sw_total,
    sw_vis_dir sw_vis_dir,
    sw_vis_dif sw_vis_dif,
    sw_nir_dir sw_nir_dir,
    sw_nir_dif sw_nir_dif,
    G G,
    GV GV,
    CS CS,
    chl_2d chl_2d,
    chl_3d chl_3d
    );

real function, public opacity_morel(chl_data chl_data);
real function, public opacity_manizza(chl_data chl_data);

subroutine, public extract_optics_slice(
    optics optics,
    j j,
    G G,
    GV GV,
    opacity opacity,
    opacity_scale opacity_scale,
    penSW_top penSW_top,
    penSW_scale penSW_scale
    );

subroutine, public extract_optics_fields(optics optics, nbands nbands);
integer function, public optics_nbands(optics optics);

subroutine, public absorbremainingsw(
    G G,
    GV GV,
    US US,
    h h,
    opacity_band opacity_band,
    nsw nsw,
    optics optics,
    j j,
    dt dt,
    H_limit_fluxes H_limit_fluxes,
    adjustAbsorptionProfile adjustAbsorptionProfile,
    absorbAllSW absorbAllSW,
    T T,
    Pen_SW_bnd Pen_SW_bnd,
    eps eps,
    ksort ksort,
    htot htot,
    Ttot Ttot,
    TKE TKE,
    dSV_dT dSV_dT
    );

subroutine, public sumswoverbands(
    G G,
    GV GV,
    US US,
    h h,
    nsw nsw,
    optics optics,
    j j,
    dt dt,
    H_limit_fluxes H_limit_fluxes,
    absorbAllSW absorbAllSW,
    iPen_SW_bnd iPen_SW_bnd,
    netPen netPen
    );

subroutine, public opacity_init(
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    CS CS,
    optics optics
    );

subroutine, public opacity_end(CS CS, optics optics);

} // namespace mom_opacity

Detailed Documentation

Routines used to calculate the opacity of the ocean.

opacity_from_chl: In this routine, the Morel (modified) or Manizza (modified) schemes use the “blue” band in the paramterizations to determine the e-folding depth of the incoming shortwave attenuation. The red portion is lumped into the net heating at the surface.

Morel, A., 1988: Optical modeling of the upper ocean in relation to its biogenous matter content (case-i waters)., J. Geo. Res., 93, 10,749-10,768.

Manizza, M., C. LeQuere, A. J. Watson, and E. T. Buitenhuis, 2005: Bio-optical feedbacks among phytoplankton, upper ocean physics and sea-ice in a global model, Geophys. Res. Let., 32, L05603, doi:10.1029/2004GL020778.

Global Variables

integer, parameter no_scheme = 0

Coded integers to specify the opacity scheme.

Global Functions

subroutine, public set_opacity(
    optics optics,
    sw_total sw_total,
    sw_vis_dir sw_vis_dir,
    sw_vis_dif sw_vis_dif,
    sw_nir_dir sw_nir_dir,
    sw_nir_dif sw_nir_dif,
    G G,
    GV GV,
    CS CS,
    chl_2d chl_2d,
    chl_3d chl_3d
    )

This sets the opacity of sea water based based on one of several different schemes.

Parameters:

optics

An optics structure that has values set based on the opacities.

sw_total

Total shortwave flux into the ocean [W m-2]

sw_vis_dir

Visible, direct shortwave into the ocean [W m-2]

sw_vis_dif

Visible, diffuse shortwave into the ocean [W m-2]

sw_nir_dir

Near-IR, direct shortwave into the ocean [W m-2]

sw_nir_dif

Near-IR, diffuse shortwave into the ocean [W m-2]

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

cs

The control structure earlier set up by opacity_init.

chl_2d

Vertically uniform chlorophyll-A concentractions[mg m-3]

chl_3d

The chlorophyll-A concentractions of each layer [mg m-3]

real function, public opacity_morel(chl_data chl_data)

This sets the blue-wavelength opacity according to the scheme proposed by Morel and Antoine (1994).

Parameters:

chl_data

The chlorophyll-A concentration in mg m-3.

Returns:

The returned opacity [m-1]

real function, public opacity_manizza(chl_data chl_data)

This sets the blue-wavelength opacity according to the scheme proposed by Manizza, M. et al, 2005.

Parameters:

chl_data

The chlorophyll-A concentration in mg m-3.

Returns:

The returned opacity [m-1]

subroutine, public extract_optics_slice(
    optics optics,
    j j,
    G G,
    GV GV,
    opacity opacity,
    opacity_scale opacity_scale,
    penSW_top penSW_top,
    penSW_scale penSW_scale
    )

This subroutine returns a 2-d slice at constant j of fields from an optics_type, with the potential for rescaling these fields.

Parameters:

optics

An optics structure that has values of opacities and shortwave fluxes.

j

j-index to extract

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

opacity

The opacity in each band, i-point, and layer

opacity_scale

A factor by which to rescale the opacity.

pensw_top

The shortwave radiation [W m-2] at the surface

pensw_scale

A factor by which to rescale the shortwave flux.

subroutine, public extract_optics_fields(optics optics, nbands nbands)

Set arguments to fields from the optics type.

Parameters:

optics

An optics structure that has values of opacities and shortwave fluxes.

nbands

The number of penetrating bands of SW radiation

integer function, public optics_nbands(optics optics)

Return the number of bands of penetrating shortwave radiation.

Parameters:

optics

An optics structure that has values of opacities and shortwave fluxes.

Returns:

The number of penetrating bands of SW radiation

subroutine, public absorbremainingsw(
    G G,
    GV GV,
    US US,
    h h,
    opacity_band opacity_band,
    nsw nsw,
    optics optics,
    j j,
    dt dt,
    H_limit_fluxes H_limit_fluxes,
    adjustAbsorptionProfile adjustAbsorptionProfile,
    absorbAllSW absorbAllSW,
    T T,
    Pen_SW_bnd Pen_SW_bnd,
    eps eps,
    ksort ksort,
    htot htot,
    Ttot Ttot,
    TKE TKE,
    dSV_dT dSV_dT
    )

Apply shortwave heating below the boundary layer (when running with the bulk mixed layer inhereted from GOLD) or throughout the water column.

In addition, it causes all of the remaining SW radiation to be absorbed, provided that the total water column thickness is greater than H_limit_fluxes. For thinner water columns, the heating is scaled down proportionately, the assumption being that the remaining heating (which is left in Pen_SW) should go into an (absent for now) ocean bottom sediment layer.

Parameters:

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

us

A dimensional unit scaling type

nsw

Number of bands of penetrating shortwave radiation.

h

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

opacity_band

Opacity in each band of penetrating shortwave radiation [H-1 ~> m-1 or m2 kg-1]. The indicies are band, i, k.

optics

An optics structure that has values of opacities and shortwave fluxes.

j

j-index to work on.

dt

Time step [T ~> s].

h_limit_fluxes

If the total ocean depth is less than this, they are scaled away to avoid numerical instabilities [H ~> m or kg m-2]. This would not be necessary if a finite heat capacity mud-layer were added.

adjustabsorptionprofile

If true, apply heating above the layers in which it should have occurred to get the correct mean depth (and potential energy change) of the shortwave that should be absorbed by each layer.

absorballsw

If true, apply heating above the layers in which it should have occurred to get the correct mean depth (and potential energy change) of the shortwave that should be absorbed by each layer.

t

Layer potential/conservative temperatures [degC]

pen_sw_bnd

Penetrating shortwave heating in each band that hits the bottom and will will be redistributed through the water column [degC H ~> degC m or degC kg m-2], size nsw x G isd: G ied.

eps

Small thickness that must remain in each layer, and which will not be subject to heating [H ~> m or kg m-2]

ksort

Density-sorted k-indicies.

htot

Total mixed layer thickness [H ~> m or kg m-2].

ttot

Depth integrated mixed layer temperature [degC H ~> degC m or degC kg m-2]

dsv_dt

The partial derivative of specific volume with temperature [m3 kg-1 degC-1].

tke

The TKE sink from mixing the heating throughout a layer [kg m-3 Z3 T-2 ~> J m-2].

subroutine, public sumswoverbands(
    G G,
    GV GV,
    US US,
    h h,
    nsw nsw,
    optics optics,
    j j,
    dt dt,
    H_limit_fluxes H_limit_fluxes,
    absorbAllSW absorbAllSW,
    iPen_SW_bnd iPen_SW_bnd,
    netPen netPen
    )

This subroutine calculates the total shortwave heat flux integrated over bands as a function of depth. This routine is only called for computing buoyancy fluxes for use in KPP. This routine does not updat e the state.

Parameters:

g

The ocean’s grid structure.

gv

The ocean’s vertical grid structure.

us

A dimensional unit scaling type

h

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

nsw

The number of bands of penetrating shortwave radiation, perhaps from optics_nbands(optics),

optics

An optics structure that has values set based on the opacities.

j

j-index to work on.

dt

Time step [T ~> s].

h_limit_fluxes

the total depth at which the surface fluxes start to be limited to avoid excessive heating of a thin ocean [H ~> m or kg m-2]

absorballsw

If true, ensure that all shortwave radiation is absorbed in the ocean water column.

ipen_sw_bnd

The incident penetrating shortwave heating in each band that hits the bottom and will be redistributed through the water column [degC H ~> degC m or degC kg m-2]; size nsw x G isd: G ied.

netpen

Net penetrating shortwave heat flux at each

subroutine, public opacity_init(
    Time Time,
    G G,
    GV GV,
    US US,
    param_file param_file,
    diag diag,
    CS CS,
    optics optics
    )

This routine initalizes the opacity module, including an optics_type.

Parameters:

time

The current model time.

g

The ocean’s grid structure.

gv

model vertical grid structure

us

A dimensional unit scaling type

param_file

A structure to parse for run-time parameters.

diag

A structure that is used to regulate diagnostic output.

cs

A pointer that is set to point to the control structure for this module.

optics

An optics structure that has parameters set and arrays allocated here.

subroutine, public opacity_end(CS CS, optics optics)

Parameters:

cs

An opacity control structure that should be deallocated.

optics

An optics type structure that should be deallocated.