MOM6
coupler_types.F90
Go to the documentation of this file.
2 !********+*********+*********+*********+*********+*********+*********+**
3 !* *
4 !* This file is a part of MOM. See MOM.F90 for licensing. *
5 !* *
6 !********+*********+*********+*********+*********+*********+*********+**
7 !
8 ! This file was modified for use in MOM6 from MOM4/5.
9 !
10 ! This module contains simplified type declarations for the coupler
11 ! of an ocean-only model. With mom4/5, this is used with ocean_solo_mod
12 ! as the driver, and with MOM6 it is used with MOM_driver.
13 !
14 
15 implicit none ; private
16 
17 type, public :: coupler_2d_bc_type
18  integer :: num_bcs = 0
19 end type coupler_2d_bc_type
20 
21 integer, public :: ind_flux=-1, ind_alpha=-2, ind_csurf=-3
22 
23 end module coupler_types_mod
24 
25 
26 !============= DUMMY VERSION OF coupler_util ===================================
27 
29 
30 use mom_error_handler, only : mom_error, fatal, warning
32 
33 implicit none ; private
34 
36 public :: ind_flux, ind_alpha, ind_csurf
37 
38 contains
39 
40 subroutine extract_coupler_values(BC_struc, BC_index, BC_element, array_out, &
41  is, ie, js, je, conversion)
42  type(coupler_2d_bc_type), intent(in) :: BC_struc
43  integer, intent(in) :: BC_index, BC_element
44  real, dimension(:,:), intent(inout) :: array_out
45  integer, optional, intent(in) :: is, ie, js, je
46  real, optional, intent(in) :: conversion
47 
48 ! Arguments: BC_struc - The type from which the data is being extracted.
49 ! (in) BC_index - The boundary condition number being extracted.
50 ! (in) BC_element - The element of the boundary condition being extracted.
51 ! This could be ind_csurf, ind_alpha, ind_flux or ind_deposition.
52 ! (out) array_out - The array being filled with the input values.
53 ! (in, opt) is, ie, js, je - The i- and j- limits of array_out to be filled.
54 ! These must match the size of the corresponding value array or an
55 ! error message is issued.
56 ! (in, opt) conversion - A number that every element is multiplied by, to
57 ! permit sign convention or unit conversion.
58 
59  call mom_error(fatal,"The called version of extract_coupler_values does" // &
60  " nothing but issue this fatal error message.")
61 
62 end subroutine extract_coupler_values
63 
64 subroutine set_coupler_values(array_in, BC_struc, BC_index, BC_element, &
65  is, ie, js, je, conversion)
66  real, dimension(:,:), intent(in) :: array_in
67  type(coupler_2d_bc_type), intent(inout) :: BC_struc
68  integer, intent(in) :: BC_index, BC_element
69  integer, optional, intent(in) :: is, ie, js, je
70  real, optional, intent(in) :: conversion
71 
72 ! Arguments: array_in - The array containing the values to load into the BC.
73 ! (out) BC_struc - The type into which the data is being loaded.
74 ! (in) BC_index - The boundary condition number being extracted.
75 ! (in) BC_element - The element of the boundary condition being extracted.
76 ! This could be ind_csurf, ind_alpha, ind_flux or ind_deposition.
77 ! (in, opt) is, ie, js, je - The i- and j- limits of array_out to be filled.
78 ! These must match the size of the corresponding value array or an
79 ! error message is issued.
80 ! (in, opt) conversion - A number that every element is multiplied by, to
81 ! permit sign convention or unit conversion.
82 
83  call mom_error(fatal,"The called version of set_coupler_values does" // &
84  " nothing but issue this fatal error message.")
85 
86 end subroutine set_coupler_values
87 
88 end module coupler_util
integer, public ind_csurf
subroutine, public extract_coupler_values(BC_struc, BC_index, BC_element, array_out, is, ie, js, je, conversion)
integer, public ind_alpha
subroutine, public set_coupler_values(array_in, BC_struc, BC_index, BC_element, is, ie, js, je, conversion)
subroutine, public mom_error(level, message, all_print)
integer, public ind_flux