MOM_opacity module reference
Routines used to calculate the opacity of the ocean.
Data Types
This type is used to store information about ocean optical properties |
|
The control structure with parameters for the MOM_opacity module |
Functions/Subroutines
This sets the opacity of sea water based based on one of several different schemes. |
|
This sets the "blue" band opacity based on chlorophyll A concentrations The red portion is lumped into the net heating at the surface. |
|
This sets the blue-wavelength opacity according to the scheme proposed by Morel and Antoine (1994). |
|
This sets the penetrating shortwave fraction according to the scheme proposed by Morel and Antoine (1994). |
|
This subroutine returns a 2-d slice at constant j of fields from an optics_type, with the potential for rescaling these fields. |
|
Set arguments to fields from the optics type. |
|
Return the number of bands of penetrating shortwave radiation. |
|
Apply shortwave heating below the boundary layer (when running with the bulk mixed layer inherited from GOLD) or throughout the water column. |
|
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 update the state. |
|
This routine initializes the opacity module, including an optics_type. |
|
Initialize the lookup table for Ohlmann solar penetration scheme. Step size in Chl is a constant in log-space to make lookups easy. Step size is fine enough that nearest neighbor lookup is sufficiently accurate. |
|
Get the partion of total solar into bands from Ohlmann lookup table |
|
Get the opacity (decay scale) from Ohlmann lookup table |
|
Detailed Description
opacity_from_chl: In this routine, the Morel (modified) or Manizza (modified) schemes use the "blue" band in the parameterizations 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.
Ohlmann, J.C., 2003: Ocean radiant heating in climate models. J. Climate, 16, 1337-1351, 2003.
Type Documentation
- type, public :: optics_type
This type is used to store information about ocean optical properties
- Parameters
nbands
The number of penetrating bands of SW radiation
opacity_band
SW optical depth per unit thickness [Z-1 ~> m-1] The number of radiation bands is most rapidly varying (first) index.
sw_pen_band
shortwave radiation [Q R Z T-1 ~> W m-2] at the surface in each of the nbands bands that penetrates beyond the surface. The most rapidly varying dimension is the band.
min_wavelength_band
The minimum wavelength in each band of penetrating shortwave radiation [nm]
max_wavelength_band
The maximum wavelength in each band of penetrating shortwave radiation [nm]
PenSW_flux_absorb
A heat flux that is small enough to be completely absorbed in the next sufficiently thick layer [C H T-1 ~> degC m s-1 or degC kg m-2 s-1].
PenSW_absorb_Invlen
The inverse of the thickness that is used to absorb the remaining shortwave heat flux when it drops below PEN_SW_FLUX_ABSORB [H ~> m or kg m-2].
Lookup tables for Ohlmann solar penetration scheme These would naturally exist as private module variables but that is prohibited in MOM6
dlog10chl
Chl increment within lookup table [log10 of Chl in mg m-3]
chl_min
Lower bound of Chl in lookup table [mg m-3]
log10chl_min
Lower bound of Chl in lookup table [log10 of Chl in mg m-3]
log10chl_max
Upper bound of Chl in lookup table [log10 of Chl in mg m-3]
a1_lut
Coefficient for band 1 [nondim]
a2_lut
Coefficient for band 2 [nondim]
b1_lut
Exponential decay scale for band 1 [Z-1 ~> m-1]
b2_lut
Exponential decay scale for band 2 [Z-1 ~> m-1]
answer_date
The vintage of the order of arithmetic and expressions in the optics calculations. Values below 20190101 recover the answers from the end of 2018, while higher values use updated and more robust forms of the same expressions.
- type, public :: opacity_CS
The control structure with parameters for the MOM_opacity module
- Parameters
var_pen_sw
If true, use one of the CHL_A schemes (specified by OPACITY_SCHEME) to determine the e-folding depth of incoming shortwave radiation.
opacity_scheme
An integer indicating which scheme should be used to translate water properties into the opacity (i.e., the e-folding depth) and (perhaps) the number of bands of penetrating shortwave radiation to use.
pen_sw_scale
The vertical absorption e-folding depth of the penetrating shortwave radiation [Z ~> m].
pen_sw_scale_2nd
The vertical absorption e-folding depth of the (2nd) penetrating shortwave radiation [Z ~> m].
SW_1ST_EXP_RATIO
Ratio for 1st exp decay in Two Exp decay opacity [nondim]
pen_sw_frac
The fraction of shortwave radiation that is penetrating with a constant e-folding approach [nondim]
blue_frac
The fraction of the penetrating shortwave radiation that is in the blue band [nondim].
opacity_land_value
The value to use for opacity over land [Z-1 ~> m-1]. The default is 10 m-1 - a value for muddy water.
opacity_coef
Groups of coefficients, in [Z-1 ~> m-1] or [Z ~> m] depending on the scheme, in expressions for opacity, with the second index being the wavelength band. For example, when OPACITY_SCHEME = MANIZZA_05, these are coef_1 and coef_2 in the expression opacity = coef_1 + coef_2 * chl**pow.
sw_pen_frac_coef
Coefficients in the expression for the penetrating shortwave fracetion [nondim]
chl_power
Powers of chlorophyll [nondim] for each band for expressions for opacity of the form opacity = coef_1 + coef_2 * chl**pow.
diag
A structure that is used to regulate the timing of diagnostic output.
chl_dep_bands
The number of bands that depend on the Chlorophyll concentrations.
id_sw_pen
Diagnostic IDs
id_sw_vis_pen
Diagnostic IDs
id_opacity
Diagnostic IDs
Functions/Subroutine Documentation
- subroutine set_opacity(optics, sw_total, sw_vis_dir, sw_vis_dif, sw_nir_dir, sw_nir_dif, G, GV, US, CS, chl_2d, chl_3d)
This sets the opacity of sea water based based on one of several different schemes.
- Parameters
optics [inout]
An optics structure that has values set based on the opacities.
sw_total
Total shortwave flux into the ocean [Q R Z T-1 ~> W m-2]
sw_vis_dir
Visible, direct shortwave into the ocean [Q R Z T-1 ~> W m-2]
sw_vis_dif
Visible, diffuse shortwave into the ocean [Q R Z T-1 ~> W m-2]
sw_nir_dir
Near-IR, direct shortwave into the ocean [Q R Z T-1 ~> W m-2]
sw_nir_dif
Near-IR, diffuse shortwave into the ocean [Q R Z T-1 ~> W m-2]
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
CS
The control structure earlier set up by opacity_init.
chl_2d [in]
Vertically uniform chlorophyll-A concentrations [mg m-3]
chl_3d [in]
The chlorophyll-A concentrations of each layer [mg m-3]
Callees call graph
- subroutine opacity_from_chl(optics, sw_total, sw_vis_dir, sw_vis_dif, sw_nir_dir, sw_nir_dif, G, GV, US, CS, chl_2d, chl_3d)
This sets the "blue" band opacity based on chlorophyll A concentrations The red portion is lumped into the net heating at the surface.
- Parameters
optics [inout]
An optics structure that has values set based on the opacities.
sw_total
Total shortwave flux into the ocean [Q R Z T-1 ~> W m-2]
sw_vis_dir
Visible, direct shortwave into the ocean [Q R Z T-1 ~> W m-2]
sw_vis_dif
Visible, diffuse shortwave into the ocean [Q R Z T-1 ~> W m-2]
sw_nir_dir
Near-IR, direct shortwave into the ocean [Q R Z T-1 ~> W m-2]
sw_nir_dif
Near-IR, diffuse shortwave into the ocean [Q R Z T-1 ~> W m-2]
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
CS
The control structure.
chl_2d [in]
Vertically uniform chlorophyll-A concentrations [mg m-3]
chl_3d [in]
A 3-d field of chlorophyll-A concentrations [mg m-3]
- function opacity_morel(chl_data, CS)
This sets the blue-wavelength opacity according to the scheme proposed by Morel and Antoine (1994).
- Parameters
chl_data [in]
The chlorophyll-A concentration in [mg m-3]
CS
Opacity control structure
opacity_morel
The returned opacity [Z-1 ~> m-1]
- function SW_pen_frac_morel(chl_data, CS)
This sets the penetrating shortwave fraction according to the scheme proposed by Morel and Antoine (1994).
- Parameters
chl_data [in]
The chlorophyll-A concentration [mg m-3]
CS
Opacity control structure
SW_pen_frac_morel
The returned penetrating shortwave fraction [nondim]
- subroutine extract_optics_slice(optics, j, G, GV, opacity, opacity_scale, penSW_top, penSW_scale, SpV_avg)
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 [in]
An optics structure that has values of opacities and shortwave fluxes.
j [in]
j-index to extract
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
opacity [out]
The opacity in each band, i-point, and layer [Z-1 ~> m-1], but with units that can be altered by opacity_scale and the presence of SpV_avg to change this to other units like [H-1 ~> m-1 or m2 kg-1]
opacity_scale [in]
A factor by which to rescale the opacity [nondim] or [Z H-1 ~> 1 or m3 kg-1]
penSW_top [out]
The shortwave radiation [Q R Z T-1 ~> W m-2] at the surface in each of the nbands bands that penetrates beyond the surface skin layer.
penSW_scale [in]
A factor by which to rescale the shortwave flux [nondim] or other units.
SpV_avg [in]
The layer-averaged specific volume [R-1 ~> m3 kg-1] that is used along with opacity_scale in non-Boussinesq cases to change the opacity from distance based units to mass-based units
- subroutine extract_optics_fields(optics, nbands)
Set arguments to fields from the optics type.
- Parameters
optics [in]
An optics structure that has values of opacities and shortwave fluxes.
nbands [out]
The number of penetrating bands of SW radiation
- function optics_nbands(optics)
Return the number of bands of penetrating shortwave radiation.
- Parameters
optics
An optics structure that has values of opacities and shortwave fluxes.
optics_nbands
The number of penetrating bands of SW radiation
Callers call graph
Text view
mom_diabatic_driver::diabatic_ale → mom_opacity::optics_nbands
mom_diabatic_driver::diabatic_ale_legacy → mom_opacity::optics_nbands
mom_forcing_type::calculatebuoyancyflux1d → mom_opacity::optics_nbands
mom_forcing_type::calculatebuoyancyflux2d → mom_opacity::optics_nbands
mom_forcing_type::extractfluxes1d → mom_opacity::optics_nbands
- subroutine absorbRemainingSW(G, GV, US, h, opacity_band, nsw, optics, j, dt, H_limit_fluxes, adjustAbsorptionProfile, absorbAllSW, T, Pen_SW_bnd, eps, ksort, htot, Ttot, TKE, dSV_dT)
Apply shortwave heating below the boundary layer (when running with the bulk mixed layer inherited 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 [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
nsw [in]
Number of bands of penetrating shortwave radiation.
h [in]
Layer thicknesses [H ~> m or kg m-2].
opacity_band [in]
Opacity in each band of penetrating shortwave radiation [H-1 ~> m-1 or m2 kg-1]. The indices are band, i, k.
optics [in]
An optics structure that has values of opacities and shortwave fluxes.
j [in]
j-index to work on.
dt [in]
Time step [T ~> s].
H_limit_fluxes [in]
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 [in]
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 [in]
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 [inout]
Layer potential/conservative temperatures [C ~> degC]
Pen_SW_bnd [inout]
Penetrating shortwave heating in each band that hits the bottom and will will be redistributed through the water column [C H ~> degC m or degC kg m-2], size nsw x SZI_(G).
eps [in]
Small thickness that must remain in each layer, and which will not be subject to heating [H ~> m or kg m-2]
ksort [in]
Density-sorted k-indices.
htot [in]
Total mixed layer thickness [H ~> m or kg m-2].
Ttot [inout]
Depth integrated mixed layer temperature [C H ~> degC m or degC kg m-2]
dSV_dT [in]
The partial derivative of specific volume with temperature [R-1 C-1 ~> m3 kg-1 degC-1]
TKE [inout]
The TKE sink from mixing the heating throughout a layer [R Z3 T-2 ~> J m-2].
Callers call graph
- subroutine sumSWoverBands(G, GV, US, h, dz, nsw, optics, j, dt, H_limit_fluxes, absorbAllSW, iPen_SW_bnd, 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 update the state.
- Parameters
G [in]
The ocean's grid structure.
GV [in]
The ocean's vertical grid structure.
US [in]
A dimensional unit scaling type
h [in]
Layer thicknesses [H ~> m or kg m-2].
dz [in]
Layer vertical extent [Z ~> m].
nsw [in]
The number of bands of penetrating shortwave radiation, perhaps from optics_nbands(optics),
optics [in]
An optics structure that has values set based on the opacities.
j [in]
j-index to work on.
dt [in]
Time step [T ~> s].
H_limit_fluxes [in]
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 [in]
If true, ensure that all shortwave radiation is absorbed in the ocean water column.
iPen_SW_bnd [in]
The incident penetrating shortwave in each band at the sea surface; size nsw x SZI_(G) [C H ~> degC m or degC kg m-2].
netPen [inout]
Net penetrating shortwave heat flux at each interface, summed across all bands [C H ~> degC m or degC kg m-2].
Callers call graph
- subroutine opacity_init(Time, G, GV, US, param_file, diag, CS, optics)
This routine initializes the opacity module, including an optics_type.
- Parameters
Time [in]
The current model time.
G [in]
The ocean's grid structure.
GV [in]
model vertical grid structure
US [in]
A dimensional unit scaling type
param_file [in]
A structure to parse for run-time parameters.
diag [inout]
A structure that is used to regulate diagnostic output.
CS
Opacity control structure
optics
An optics structure that has parameters set and arrays allocated here.
- subroutine init_ohlmann_table(optics)
Initialize the lookup table for Ohlmann solar penetration scheme. Step size in Chl is a constant in log-space to make lookups easy. Step size is fine enough that nearest neighbor lookup is sufficiently accurate.
- Parameters
optics [inout]
These are the data from Ohlmann (2003) Table 1a with additional values provided by C. Ohlmann and implemented in CESM-POP by B. Briegleb
b2_tab1a
Make the table big enough so step size is smaller in log-space that any increment in Table 1a
- function lookup_ohlmann_swpen(chl, optics) result(A)
Get the partion of total solar into bands from Ohlmann lookup table
- function lookup_ohlmann_opacity(chl, optics) result(B)
Get the opacity (decay scale) from Ohlmann lookup table
subroutine opacity_end(CS, optics)
- Parameters
CS
Opacity control structure
optics
An optics type structure that should be deallocated.