← back to index

src/user/user_revise_forcing.F90

portedportable, not yet portedexecuted, not portableexecutable, not hit by this run

1! This file is part of MOM6, the Modular Ocean Model version 6.
2! See the LICENSE file for licensing information.
3! SPDX-License-Identifier: Apache-2.0
4
5!> Provides a template for users to code updating the forcing fluxes.
6module user_revise_forcing
7
8use MOM_domains, only : pass_var, pass_vector, AGRID
9use MOM_error_handler, only : MOM_error, FATAL, WARNING, is_root_pe
10use MOM_file_parser, only : get_param, log_version, param_file_type
11use MOM_forcing_type, only : forcing
12use MOM_grid, only : ocean_grid_type
13use MOM_io, only : file_exists, MOM_read_data
14use MOM_restart, only : register_restart_field, MOM_restart_CS
15use MOM_time_manager, only : time_type, operator(+), operator(/)
16use MOM_tracer_flow_control, only : call_tracer_set_forcing
17use MOM_tracer_flow_control, only : tracer_flow_control_CS
18use MOM_variables, only : surface
19
20implicit none ; private
21
22public user_alter_forcing, user_revise_forcing_init
23
24!> Control structure for user_revise_forcing
25type, public :: user_revise_forcing_CS ; private
26 real :: cdrag !< The quadratic bottom drag coefficient [nondim]
27end type user_revise_forcing_CS
28
29contains
30
31!> This subroutine sets the surface wind stresses.
3212subroutine user_alter_forcing(sfc_state, fluxes, day, G, CS)
33 type(surface), intent(in) :: sfc_state !< A structure containing fields that
34 !! describe the surface state of the ocean.
35 type(forcing), intent(inout) :: fluxes !< A structure containing pointers to any
36 !! possible forcing fields. Unused fields
37 !! have NULL ptrs.
38 type(time_type), intent(in) :: day !< Time of the fluxes.
39 type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure.
40 type(user_revise_forcing_CS), pointer :: CS !< A pointer to the control structure
41 !! returned by a previous call to
42 !! surface_forcing_init.
4312 return
44
45end subroutine user_alter_forcing
46
47!> Initialize the user_revise_forcing control structure
481subroutine 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 ! This include declares and sets the variable "version".
56# include "version_variable.h"
57 character(len=40) :: mdl = "user_revise_forcing" !< This module's name.
58
591 call log_version(param_file, mdl, version)
60
611end subroutine user_revise_forcing_init
62
630end module user_revise_forcing