MOM6
MOM_forcing_type.F90 File Reference
#include <MOM_memory.h>
Include dependency graph for MOM_forcing_type.F90:

Go to the source code of this file.

Data Types

type  mom_forcing_type::forcing
 Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by MOM. Data in this type is allocated in the module MOM_surface_forcing.F90, of which there are three: solo, coupled, and ice-shelf. Alternatively, they are allocated in MESO_surface_forcing.F90, which is a special case of solo_driver/MOM_surface_forcing.F90. More...
 
type  mom_forcing_type::forcing_diags
 Structure that defines the id handles for the forcing type. More...
 

Modules

module  mom_forcing_type
 This module implements boundary forcing for MOM6.
 

Functions/Subroutines

subroutine, public mom_forcing_type::extractfluxes1d (G, GV, fluxes, optics, nsw, j, dt, DepthBeforeScalingFluxes, useRiverHeatContent, useCalvingHeatContent, h, T, netMassInOut, netMassOut, net_heat, net_salt, pen_SW_bnd, tv, aggregate_FW_forcing, nonpenSW, netmassInOut_rate, net_Heat_Rate, net_salt_rate, pen_sw_bnd_Rate, skip_diags)
 This subroutine extracts fluxes from the surface fluxes type. It works on a j-row for optimization purposes. The 2d (i,j) wrapper is the next subroutine below. This routine multiplies fluxes by dt, so that the result is an accumulation of fluxes over a time step. More...
 
subroutine, public mom_forcing_type::extractfluxes2d (G, GV, fluxes, optics, nsw, dt, DepthBeforeScalingFluxes, useRiverHeatContent, useCalvingHeatContent, h, T, netMassInOut, netMassOut, net_heat, Net_salt, Pen_SW_bnd, tv, aggregate_FW_forcing)
 2d wrapper for 1d extract fluxes from surface fluxes type. This subroutine extracts fluxes from the surface fluxes type. It multiplies the fluxes by dt, so that the result is an accumulation of the fluxes over a time step. More...
 
subroutine, public mom_forcing_type::calculatebuoyancyflux1d (G, GV, fluxes, optics, h, Temp, Salt, tv, j, buoyancyFlux, netHeatMinusSW, netSalt, skip_diags)
 This routine calculates surface buoyancy flux by adding up the heat, FW & salt fluxes. These are actual fluxes, with units of stuff per time. Setting dt=1 in the call to extractFluxes routine allows us to get "stuf per time" rather than the time integrated fluxes needed in other routines that call extractFluxes. More...
 
subroutine, public mom_forcing_type::calculatebuoyancyflux2d (G, GV, fluxes, optics, h, Temp, Salt, tv, buoyancyFlux, netHeatMinusSW, netSalt, skip_diags)
 Calculates surface buoyancy flux by adding up the heat, FW and salt fluxes, for 2d arrays. This is a wrapper for calculateBuoyancyFlux1d. More...
 
subroutine, public mom_forcing_type::mom_forcing_chksum (mesg, fluxes, G, haloshift)
 Write out chksums for basic state variables. More...
 
subroutine, public mom_forcing_type::forcing_singlepointprint (fluxes, G, i, j, mesg)
 Write out values of the fluxes arrays at the i,j location. This is a debugging tool. More...
 
subroutine locmsg (array, aname)
 Format and write a message depending on associated state of array. More...
 
subroutine, public mom_forcing_type::register_forcing_type_diags (Time, diag, use_temperature, handles, use_berg_fluxes)
 Register members of the forcing type for diagnostics. More...
 
subroutine, public mom_forcing_type::forcing_accumulate (flux_tmp, fluxes, dt, G, wt2)
 Accumulate the forcing over time steps. More...
 
subroutine, public mom_forcing_type::mech_forcing_diags (fluxes, dt, G, diag, handles)
 Offer mechanical forcing fields for diagnostics for those fields registered as part of register_forcing_type_diags. More...
 
subroutine, public mom_forcing_type::forcing_diagnostics (fluxes, state, dt, G, diag, handles)
 Offer buoyancy forcing fields for diagnostics for those fields registered as part of register_forcing_type_diags. More...
 
subroutine, public mom_forcing_type::allocate_forcing_type (G, fluxes, stress, ustar, water, heat, shelf, press, iceberg)
 Conditionally allocate fields within the forcing type. More...
 
subroutine myalloc (array, is, ie, js, je, flag)
 Allocates and zeroes-out array. More...
 
subroutine, public mom_forcing_type::deallocate_forcing_type (fluxes)
 Deallocate the forcing type. More...
 

Function/Subroutine Documentation

◆ locmsg()

subroutine forcing_singlepointprint::locmsg ( real, dimension(:,:), pointer  array,
character(len=*)  aname 
)
private

Format and write a message depending on associated state of array.

Parameters
arrayArray to write element from
anameName of array

Definition at line 1025 of file MOM_forcing_type.F90.

Referenced by mom_forcing_type::forcing_singlepointprint().

1025  real, dimension(:,:), pointer :: array !< Array to write element from
1026  character(len=*) :: aname !< Name of array
1027 
1028  if (associated(array)) then
1029  write(0,'(3a,es15.3)') 'MOM_forcing_type, forcing_SinglePointPrint: ',trim(aname),' = ',array(i,j)
1030  else
1031  write(0,'(4a)') 'MOM_forcing_type, forcing_SinglePointPrint: ',trim(aname),' is not associated.'
1032  endif
1033 
Here is the caller graph for this function:

◆ myalloc()

subroutine allocate_forcing_type::myalloc ( real, dimension(:,:), pointer  array,
integer, intent(in)  is,
integer, intent(in)  ie,
integer, intent(in)  js,
integer, intent(in)  je,
logical, intent(in), optional  flag 
)
private

Allocates and zeroes-out array.

Parameters
arrayArray to be allocated
[in]isStart i-index
[in]ieEnd i-index
[in]jsStart j-index
[in]jeEnd j-index
[in]flagFlag to indicate to allocate

Definition at line 2403 of file MOM_forcing_type.F90.

Referenced by mom_forcing_type::allocate_forcing_type().

2403  real, dimension(:,:), pointer :: array !< Array to be allocated
2404  integer, intent(in) :: is !< Start i-index
2405  integer, intent(in) :: ie !< End i-index
2406  integer, intent(in) :: js !< Start j-index
2407  integer, intent(in) :: je !< End j-index
2408  logical, optional, intent(in) :: flag !< Flag to indicate to allocate
2409 
2410  if (present(flag)) then
2411  if (flag) then
2412  if (.not.associated(array)) then
2413  ALLOCATE(array(is:ie,js:je))
2414  array(is:ie,js:je) = 0.0
2415  endif
2416  endif
2417  endif
Here is the caller graph for this function: