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. | |
| 6 | module user_revise_forcing | |
| 7 | ||
| 8 | use MOM_domains, only : pass_var, pass_vector, AGRID | |
| 9 | use MOM_error_handler, only : MOM_error, FATAL, WARNING, is_root_pe | |
| 10 | use MOM_file_parser, only : get_param, log_version, param_file_type | |
| 11 | use MOM_forcing_type, only : forcing | |
| 12 | use MOM_grid, only : ocean_grid_type | |
| 13 | use MOM_io, only : file_exists, MOM_read_data | |
| 14 | use MOM_restart, only : register_restart_field, MOM_restart_CS | |
| 15 | use MOM_time_manager, only : time_type, operator(+), operator(/) | |
| 16 | use MOM_tracer_flow_control, only : call_tracer_set_forcing | |
| 17 | use MOM_tracer_flow_control, only : tracer_flow_control_CS | |
| 18 | use MOM_variables, only : surface | |
| 19 | ||
| 20 | implicit none ; private | |
| 21 | ||
| 22 | public user_alter_forcing, user_revise_forcing_init | |
| 23 | ||
| 24 | !> Control structure for user_revise_forcing | |
| 25 | type, public :: user_revise_forcing_CS ; private | |
| 26 | real :: cdrag !< The quadratic bottom drag coefficient [nondim] | |
| 27 | end type user_revise_forcing_CS | |
| 28 | ||
| 29 | contains | |
| 30 | ||
| 31 | !> This subroutine sets the surface wind stresses. | |
| 32 | 12 | subroutine 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. | |
| 43 | 12 | return |
| 44 | ||
| 45 | end subroutine user_alter_forcing | |
| 46 | ||
| 47 | !> Initialize the user_revise_forcing control structure | |
| 48 | 1 | 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 | ! 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 | ||
| 59 | 1 | call log_version(param_file, mdl, version) |
| 60 | ||
| 61 | 1 | end subroutine user_revise_forcing_init |
| 62 | ||
| 63 | 0 | end module user_revise_forcing |