user_surface_forcing module reference
Template for user to code up surface forcing.
Data Types
This control structure should be used to store any run-time variables associated with the user-specified forcing. |
Functions/Subroutines
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). |
|
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. |
|
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
Callers call graph
- 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
Callers call graph
- 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