user_surface_forcing module reference

Template for user to code up surface forcing.

Data Types

user_surface_forcing_CS

This control structure should be used to store any run-time variables associated with the user-specified forcing.

Functions/Subroutines

USER_wind_forcing

This subroutine sets the surface wind stresses, forces%taux and forces%tauy, in [R Z L T-2 ~> Pa]. These are the stresses in the direction of the model grid (i.e. the same direction as the u- and v- velocities).

USER_buoyancy_forcing

This subroutine specifies the current surface fluxes of buoyancy or temperature and fresh water. It may also be modified to add surface fluxes of user provided tracers.

USER_surface_forcing_init

This subroutine initializes the USER_surface_forcing module

Detailed Description

This file contains the subroutines that a user should modify to to set the surface wind stresses and fluxes of buoyancy or temperature and fresh water. They are called when the run-time parameters WIND_CONFIG or BUOY_CONFIG are set to "USER". The standard version has simple examples, along with run-time error messages that will cause the model to abort if this code has no been modified. This code is intended for use with relatively simple specifications of the forcing. For more complicated forms, it is probably a good idea to read the forcing from input files using "file" for WIND_CONFIG and BUOY_CONFIG.

USER_wind_forcing() should set the surface wind stresses (taux and tauy) perhaps along with the surface friction velocity (ustar).

USER_buoyancy() forcing is used to set the surface buoyancy forcing, which may include a number of fresh water flux fields (evap, lprec, fprec, lrunoff, frunoff, and vprec) and the surface heat fluxes (sw, lw, latent and sens) if temperature and salinity are state variables, or it may simply be the buoyancy flux if it is not. This routine also has coded a restoring to surface values of temperature and salinity.

Type Documentation

type, public :: user_surface_forcing_CS

This control structure should be used to store any run-time variables associated with the user-specified forcing.

It can be readily modified for a specific case, and because it is private there will be no changes needed in other code (although they will have to be recompiled).

Parameters
  • use_temperature

    If true, temperature and salinity are used as state variables.

  • restorebuoy

    If true, use restoring surface buoyancy forcing.

  • Rho0

    The density used in the Boussinesq approximation [R ~> kg m-3].

  • G_Earth

    The gravitational acceleration [L2 Z-1 T-2 ~> m s-2].

  • Flux_const

    The restoring rate at the surface [Z T-1 ~> m s-1].

  • rho_restore

    The density that is used to convert piston velocities into salt or heat fluxes with salinity or temperature restoring [R ~> kg m-3]

  • gust_const

    A constant unresolved background gustiness that contributes to ustar [R Z2 T-2 ~> Pa].

  • diag

    A structure that is used to regulate the timing of diagnostic output.

Functions/Subroutine Documentation

subroutine USER_wind_forcing(sfc_state, forces, day, G, US, CS)

This subroutine sets the surface wind stresses, forces%taux and forces%tauy, in [R Z L T-2 ~> Pa]. These are the stresses in the direction of the model grid (i.e. the same direction as the u- and v- velocities).

Parameters
  • sfc_state [inout]

    A structure containing fields that describe the surface state of the ocean.

  • forces [inout]

    A structure with the driving mechanical forces

  • day [in]

    The time of the fluxes

  • G [inout]

    The ocean's grid structure

  • US [in]

    A dimensional unit scaling type

  • CS

    A pointer to the control structure returned by a previous call to user_surface_forcing_init

Callees call graph
Callees of user_surface_forcing::user_wind_forcing calls cluster_mom_error_handler MOM_error_handler cluster_mom_forcing_type MOM_forcing_type cluster_user_surface_forcing user_surface_forcing mom_error_handler::mom_error MOM_error mom_forcing_type::interface::allocate_mech_forcing allocate_mech_forcing (interface) user_surface_forcing::user_wind_forcing USER_wind_forcing user_surface_forcing::user_wind_forcing->mom_error_handler::mom_error user_surface_forcing::user_wind_forcing->mom_forcing_type::interface::allocate_mech_forcing
Text view
Callers call graph
Callers of user_surface_forcing::user_wind_forcing calls cluster_mom_surface_forcing MOM_surface_forcing cluster_user_surface_forcing user_surface_forcing mom_surface_forcing::set_forcing set_forcing user_surface_forcing::user_wind_forcing USER_wind_forcing mom_surface_forcing::set_forcing->user_surface_forcing::user_wind_forcing
Text view
subroutine USER_buoyancy_forcing(sfc_state, fluxes, day, dt, G, US, CS)

This subroutine specifies the current surface fluxes of buoyancy or temperature and fresh water. It may also be modified to add surface fluxes of user provided tracers.

Parameters
  • sfc_state [inout]

    A structure containing fields that describe the surface state of the ocean.

  • fluxes [inout]

    A structure containing thermodynamic forcing fields

  • day [in]

    The time of the fluxes

  • dt [in]

    The amount of time over which the fluxes apply [T ~> s]

  • G [in]

    The ocean's grid structure

  • US [in]

    A dimensional unit scaling type

  • CS

    A pointer to the control structure returned by a previous call to user_surface_forcing_init

Callees call graph
Callees of user_surface_forcing::user_buoyancy_forcing calls cluster_mom_error_handler MOM_error_handler cluster_mom_safe_alloc MOM_safe_alloc cluster_user_surface_forcing user_surface_forcing mom_error_handler::mom_error MOM_error mom_safe_alloc::interface::safe_alloc_ptr safe_alloc_ptr (interface) user_surface_forcing::user_buoyancy_forcing USER_buoyancy_forcing user_surface_forcing::user_buoyancy_forcing->mom_error_handler::mom_error user_surface_forcing::user_buoyancy_forcing->mom_safe_alloc::interface::safe_alloc_ptr
Text view
Callers call graph
Callers of user_surface_forcing::user_buoyancy_forcing calls cluster_mom_surface_forcing MOM_surface_forcing cluster_user_surface_forcing user_surface_forcing mom_surface_forcing::set_forcing set_forcing user_surface_forcing::user_buoyancy_forcing USER_buoyancy_forcing mom_surface_forcing::set_forcing->user_surface_forcing::user_buoyancy_forcing
Text view
subroutine USER_surface_forcing_init(Time, G, US, param_file, diag, CS)

This subroutine initializes the USER_surface_forcing module

Parameters
  • Time [in]

    The current model time

  • G [in]

    The ocean's grid structure

  • US [in]

    A dimensional unit scaling type

  • param_file [in]

    A structure to parse for run-time parameters

  • diag [in]

    A structure that is used to regulate diagnostic output.

  • CS

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

Callees call graph
Callees of user_surface_forcing::user_surface_forcing_init calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_user_surface_forcing user_surface_forcing mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_version log_version (interface) user_surface_forcing::user_surface_forcing_init USER_surface_forcing_init user_surface_forcing::user_surface_forcing_init->mom_error_handler::mom_error user_surface_forcing::user_surface_forcing_init->mom_file_parser::interface::get_param user_surface_forcing::user_surface_forcing_init->mom_file_parser::interface::log_version
Text view
Callers call graph
Callers of user_surface_forcing::user_surface_forcing_init calls cluster_mom_surface_forcing MOM_surface_forcing cluster_user_surface_forcing user_surface_forcing mom_surface_forcing::surface_forcing_init surface_forcing_init user_surface_forcing::user_surface_forcing_init USER_surface_forcing_init mom_surface_forcing::surface_forcing_init->user_surface_forcing::user_surface_forcing_init
Text view
API generated with Flint · Rendered from reStructuredText