MOM6
user_revise_forcing.F90
1 !> Provides a template for users to code updating the forcing fluxes.
3 
4 ! This file is part of MOM6. See LICENSE.md for the license.
5 
6 use mom_domains, only : pass_var, pass_vector, agrid
7 use mom_error_handler, only : mom_error, fatal, warning, is_root_pe
9 use mom_forcing_type, only : forcing
10 use mom_grid, only : ocean_grid_type
11 use mom_io, only : file_exists, read_data
13 use mom_time_manager, only : time_type, operator(+), operator(/)
14 use mom_tracer_flow_control, only : call_tracer_set_forcing
16 use mom_variables, only : surface
17 
18 implicit none ; private
19 
20 public user_alter_forcing, user_revise_forcing_init
21 
22 !> Control structure for user_revise_forcing
23 type, public :: user_revise_forcing_cs ; private
24  real :: cdrag !< The quadratic bottom drag coefficient.
26 
27 ! This include declares and sets the variable "version".
28 #include "version_variable.h"
29  character(len=40) :: mdl = "user_revise_forcing" !< This module's name.
30 contains
31 
32 !> This subroutine sets the surface wind stresses.
33 subroutine user_alter_forcing(sfc_state, fluxes, day, G, CS)
34  type(surface), intent(in) :: sfc_state !< A structure containing fields that
35  !! describe the surface state of the ocean.
36  type(forcing), intent(inout) :: fluxes !< A structure containing pointers to any
37  !! possible forcing fields. Unused fields
38  !! have NULL ptrs.
39  type(time_type), intent(in) :: day !< Time of the fluxes.
40  type(ocean_grid_type), intent(in) :: g !< The ocean's grid structure.
41  type(user_revise_forcing_cs), pointer :: cs !< A pointer to the control structure
42  !! returned by a previous call to
43  !! surface_forcing_init.
44 
45 end subroutine user_alter_forcing
46 
47 !> Initialize the user_revise_forcing control structure
48 subroutine user_revise_forcing_init(param_file,CS)
49  type(param_file_type), intent(in) :: param_file !< A structure indicating the open file to
50  !! parse for model parameter values.
51  type(user_revise_forcing_cs), pointer :: cs !< A pointer to the control structure
52  !! returned by a previous call to
53  !! surface_forcing_init.
54 
55  call log_version(param_file, mdl, version)
56 
57 end subroutine user_revise_forcing_init
58 
59 end module user_revise_forcing
Pointers to various fields which may be used describe the surface state of MOM, and which will be ret...
Wraps the FMS time manager functions.
This module implements boundary forcing for MOM6.
Control structure for user_revise_forcing.
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:26
A structure that can be parsed to read and document run-time parameters.
Provides the ocean grid type.
Definition: MOM_grid.F90:2
Register fields for restarts.
This module contains I/O framework code.
Definition: MOM_io.F90:2
The MOM6 facility to parse input files for runtime parameters.
Do a halo update on a pair of arrays representing the two components of a vector.
Definition: MOM_domains.F90:59
Orchestrates the registration and calling of tracer packages.
A restart registry and the control structure for restarts.
Definition: MOM_restart.F90:75
Describes the decomposed MOM domain and has routines for communications across PEs.
Definition: MOM_domains.F90:2
Provides a template for users to code updating the forcing fluxes.
Routines for error handling and I/O management.
The MOM6 facility for reading and writing restart files, and querying what has been read.
Definition: MOM_restart.F90:2
The control structure for orchestrating the calling of tracer packages.
Structure that contains pointers to the boundary forcing used to drive the liquid ocean simulated by ...
An overloaded interface to log version information about modules.
Indicate whether a file exists, perhaps with domain decomposition.
Definition: MOM_io.F90:68
Provides transparent structures with groups of MOM6 variables and supporting routines.
Do a halo update on an array.
Definition: MOM_domains.F90:54
An overloaded interface to read and log the values of various types of parameters.