MOM6
MOM_ALE_sponge.F90
Go to the documentation of this file.
1 !> This module contains the routines used to apply sponge layers when using
2 !! the ALE mode.
3 !! Applying sponges requires the following:
4 !! (1) initialize_ALE_sponge
5 !! (2) set_up_ALE_sponge_field (tracers) and set_up_ALE_sponge_vel_field (vel)
6 !! (3) apply_ALE_sponge
7 !! (4) init_ALE_sponge_diags (not being used for now)
8 !! (5) ALE_sponge_end (not being used for now)
9 
11 
12 ! This file is part of MOM6. See LICENSE.md for the license.
13 
14 use mom_coms, only : sum_across_pes
16 use mom_diag_mediator, only : diag_ctrl
17 use mom_error_handler, only : mom_error, fatal, note, warning, is_root_pe
19 use mom_grid, only : ocean_grid_type
21 use mom_time_manager, only : time_type
23 
24 ! GMM - Planned extension: Support for time varying sponge targets.
25 
26 implicit none ; private
27 
28 #include <MOM_memory.h>
29 
30 !< Publicly available functions
33 
34 type :: p3d
35  real, dimension(:,:,:), pointer :: p => null()
36 end type p3d
37 type :: p2d
38  real, dimension(:,:), pointer :: p => null()
39 end type p2d
40 
41 !> SPONGE control structure
42 type, public :: ale_sponge_cs ; private
43  integer :: nz !< The total number of layers.
44  integer :: nz_data !< The total number of arbritary layers.
45  integer :: isc, iec, jsc, jec !< The index ranges of the computational domain at h.
46  integer :: iscb, iecb, jscb, jecb !< The index ranges of the computational domain at u/v.
47  integer :: isd, ied, jsd, jed !< The index ranges of the data domain.
48 
49  integer :: num_col, num_col_u, num_col_v !< The number of sponge points within the
50  !! computational domain.
51  integer :: fldno = 0 !< The number of fields which have already been
52  !! registered by calls to set_up_sponge_field
53  logical :: sponge_uv !< Control whether u and v are included in sponge
54  integer, pointer :: col_i(:) => null() !< Arrays containing the i- and j- indicies
55  integer, pointer :: col_j(:) => null() !! of each of the columns being damped.
56  integer, pointer :: col_i_u(:) => null() !< Same as above for u points
57  integer, pointer :: col_j_u(:) => null()
58  integer, pointer :: col_i_v(:) => null() !< Same as above for v points
59  integer, pointer :: col_j_v(:) => null()
60 
61  real, pointer :: iresttime_col(:) => null() !< The inverse restoring time of
62  !! each column.
63  real, pointer :: iresttime_col_u(:) => null() !< Same as above for u points
64  real, pointer :: iresttime_col_v(:) => null() !< Same as above for v points
65 
66  type(p3d) :: var(max_fields_) !< Pointers to the fields that are being damped.
67  type(p2d) :: ref_val(max_fields_) !< The values to which the fields are damped.
68  real, dimension(:,:), pointer :: ref_val_u => null() !< Same as above for u points
69  real, dimension(:,:), pointer :: ref_val_v => null() !< Same as above for v points
70  real, dimension(:,:,:), pointer :: var_u => null() !< Pointers to the u vel. that are
71  !! being damped.
72  real, dimension(:,:,:), pointer :: var_v => null() !< Pointers to the v vel. that are
73  !! being damped.
74  real, pointer :: ref_h(:,:) => null() !< Grid on which reference data is provided
75  real, pointer :: ref_hu(:,:) => null() !< Same as above for u points
76  real, pointer :: ref_hv(:,:) => null() !< Same as above for v points
77 
78  type(diag_ctrl), pointer :: diag !< A structure that is used to regulate the
79  !! timing of diagnostic output.
80 
81  type(remapping_cs) :: remap_cs !< Remapping parameters and work arrays
82 
83 end type ale_sponge_cs
84 
85 contains
86 
87 !> This subroutine determines the number of points which are within
88 ! sponges in this computational domain. Only points that have
89 ! positive values of Iresttime and which mask2dT indicates are ocean
90 ! points are included in the sponges. It also stores the target interface
91 ! heights.
92 subroutine initialize_ale_sponge(Iresttime, data_h, nz_data, G, param_file, CS)
93 
94  integer, intent(in) :: nz_data !< The total number of arbritary layers (in).
95  type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure (in).
96  real, dimension(SZI_(G),SZJ_(G)), intent(in) :: Iresttime !< The inverse of the restoring time, in s-1 (in).
97  real, dimension(SZI_(G),SZJ_(G),nz_data), intent(in) :: data_h !< The thickness to be used in the sponge. It has arbritary layers (in).
98  type(param_file_type), intent(in) :: param_file !< A structure indicating the open file to parse for model parameter values (in).
99  type(ale_sponge_cs), pointer :: CS !< A pointer that is set to point to the control structure for this module (in/out).
100 
101 
102 ! This include declares and sets the variable "version".
103 #include "version_variable.h"
104  character(len=40) :: mdl = "MOM_sponge" ! This module's name.
105  logical :: use_sponge
106  real, dimension(SZIB_(G),SZJ_(G),nz_data) :: data_hu !< thickness at u points
107  real, dimension(SZI_(G),SZJB_(G),nz_data) :: data_hv !< thickness at v points
108  real, dimension(SZIB_(G),SZJ_(G)) :: Iresttime_u !< inverse of the restoring time at u points, s-1
109  real, dimension(SZI_(G),SZJB_(G)) :: Iresttime_v !< inverse of the restoring time at v points, s-1
110  logical :: bndExtrapolation = .true. ! If true, extrapolate boundaries
111  integer :: i, j, k, col, total_sponge_cols, total_sponge_cols_u, total_sponge_cols_v
112  character(len=10) :: remapScheme
113  if (associated(cs)) then
114  call mom_error(warning, "initialize_sponge called with an associated "// &
115  "control structure.")
116  return
117  endif
118 
119 ! Set default, read and log parameters
120  call log_version(param_file, mdl, version, "")
121  call get_param(param_file, mdl, "SPONGE", use_sponge, &
122  "If true, sponges may be applied anywhere in the domain. \n"//&
123  "The exact location and properties of those sponges are \n"//&
124  "specified from MOM_initialization.F90.", default=.false.)
125 
126  if (.not.use_sponge) return
127 
128  allocate(cs)
129 
130  call get_param(param_file, mdl, "SPONGE_UV", cs%sponge_uv, &
131  "Apply sponges in u and v, in addition to tracers.", &
132  default=.false.)
133 
134  call get_param(param_file, mdl, "REMAPPING_SCHEME", remapscheme, &
135  "This sets the reconstruction scheme used \n"//&
136  " for vertical remapping for all variables.", &
137  default="PLM", do_not_log=.true.)
138 
139  call get_param(param_file, mdl, "BOUNDARY_EXTRAPOLATION", bndextrapolation, &
140  "When defined, a proper high-order reconstruction \n"//&
141  "scheme is used within boundary cells rather \n"// &
142  "than PCM. E.g., if PPM is used for remapping, a \n" //&
143  "PPM reconstruction will also be used within boundary cells.", &
144  default=.false., do_not_log=.true.)
145 
146  cs%nz = g%ke
147  cs%isc = g%isc ; cs%iec = g%iec ; cs%jsc = g%jsc ; cs%jec = g%jec
148  cs%isd = g%isd ; cs%ied = g%ied ; cs%jsd = g%jsd ; cs%jed = g%jed
149  cs%iscB = g%iscB ; cs%iecB = g%iecB; cs%jscB = g%jscB ; cs%jecB = g%jecB
150 
151  ! number of columns to be restored
152  cs%num_col = 0 ; cs%fldno = 0
153  do j=g%jsc,g%jec ; do i=g%isc,g%iec
154  if ((iresttime(i,j)>0.0) .and. (g%mask2dT(i,j)>0)) &
155  cs%num_col = cs%num_col + 1
156  enddo ; enddo
157 
158 
159  if (cs%num_col > 0) then
160 
161  allocate(cs%Iresttime_col(cs%num_col)) ; cs%Iresttime_col = 0.0
162  allocate(cs%col_i(cs%num_col)) ; cs%col_i = 0
163  allocate(cs%col_j(cs%num_col)) ; cs%col_j = 0
164 
165  ! pass indices, restoring time to the CS structure
166  col = 1
167  do j=g%jsc,g%jec ; do i=g%isc,g%iec
168  if ((iresttime(i,j)>0.0) .and. (g%mask2dT(i,j)>0)) then
169  cs%col_i(col) = i ; cs%col_j(col) = j
170  cs%Iresttime_col(col) = iresttime(i,j)
171  col = col +1
172  endif
173  enddo ; enddo
174 
175  ! same for total number of arbritary layers and correspondent data
176  cs%nz_data = nz_data
177  allocate(cs%Ref_h(cs%nz_data,cs%num_col))
178  do col=1,cs%num_col ; do k=1,cs%nz_data
179  cs%Ref_h(k,col) = data_h(cs%col_i(col),cs%col_j(col),k)
180  enddo ; enddo
181 
182  endif
183 
184  total_sponge_cols = cs%num_col
185  call sum_across_pes(total_sponge_cols)
186 
187 ! Call the constructor for remapping control structure
188  call initialize_remapping(cs%remap_cs, remapscheme, boundary_extrapolation=bndextrapolation)
189 
190  call log_param(param_file, mdl, "!Total sponge columns at h points", total_sponge_cols, &
191  "The total number of columns where sponges are applied at h points.")
192 
193  if (cs%sponge_uv) then
194  ! u points
195  cs%num_col_u = 0 ; !CS%fldno_u = 0
196  do j=cs%jsc,cs%jec; do i=cs%iscB,cs%iecB
197  data_hu(i,j,:) = 0.5 * (data_h(i,j,:) + data_h(i+1,j,:))
198  iresttime_u(i,j) = 0.5 * (iresttime(i,j) + iresttime(i+1,j))
199  if ((iresttime_u(i,j)>0.0) .and. (g%mask2dCu(i,j)>0)) &
200  cs%num_col_u = cs%num_col_u + 1
201  enddo; enddo
202 
203  if (cs%num_col_u > 0) then
204 
205  allocate(cs%Iresttime_col_u(cs%num_col_u)) ; cs%Iresttime_col_u = 0.0
206  allocate(cs%col_i_u(cs%num_col_u)) ; cs%col_i_u = 0
207  allocate(cs%col_j_u(cs%num_col_u)) ; cs%col_j_u = 0
208 
209  ! pass indices, restoring time to the CS structure
210  col = 1
211  do j=cs%jsc,cs%jec ; do i=cs%iscB,cs%iecB
212  if ((iresttime_u(i,j)>0.0) .and. (g%mask2dCu(i,j)>0)) then
213  cs%col_i_u(col) = i ; cs%col_j_u(col) = j
214  cs%Iresttime_col_u(col) = iresttime_u(i,j)
215  col = col +1
216  endif
217  enddo ; enddo
218 
219  ! same for total number of arbritary layers and correspondent data
220  allocate(cs%Ref_hu(cs%nz_data,cs%num_col_u))
221  do col=1,cs%num_col_u ; do k=1,cs%nz_data
222  cs%Ref_hu(k,col) = data_hu(cs%col_i_u(col),cs%col_j_u(col),k)
223  enddo ; enddo
224 
225  endif
226  total_sponge_cols_u = cs%num_col_u
227  call sum_across_pes(total_sponge_cols_u)
228  call log_param(param_file, mdl, "!Total sponge columns at u points", total_sponge_cols_u, &
229  "The total number of columns where sponges are applied at u points.")
230 
231  ! v points
232  cs%num_col_v = 0 ; !CS%fldno_v = 0
233  do j=cs%jscB,cs%jecB; do i=cs%isc,cs%iec
234  data_hu(i,j,:) = 0.5 * (data_h(i,j,:) + data_h(i,j+1,:))
235  iresttime_v(i,j) = 0.5 * (iresttime(i,j) + iresttime(i,j+1))
236  if ((iresttime_v(i,j)>0.0) .and. (g%mask2dCv(i,j)>0)) &
237  cs%num_col_v = cs%num_col_v + 1
238  enddo; enddo
239 
240  if (cs%num_col_v > 0) then
241 
242  allocate(cs%Iresttime_col_v(cs%num_col_v)) ; cs%Iresttime_col_v = 0.0
243  allocate(cs%col_i_v(cs%num_col_v)) ; cs%col_i_v = 0
244  allocate(cs%col_j_v(cs%num_col_v)) ; cs%col_j_v = 0
245 
246  ! pass indices, restoring time to the CS structure
247  col = 1
248  do j=cs%jscB,cs%jecB ; do i=cs%isc,cs%iec
249  if ((iresttime_v(i,j)>0.0) .and. (g%mask2dCv(i,j)>0)) then
250  cs%col_i_v(col) = i ; cs%col_j_v(col) = j
251  cs%Iresttime_col_v(col) = iresttime_v(i,j)
252  col = col +1
253  endif
254  enddo ; enddo
255 
256  ! same for total number of arbritary layers and correspondent data
257  allocate(cs%Ref_hv(cs%nz_data,cs%num_col_v))
258  do col=1,cs%num_col_v ; do k=1,cs%nz_data
259  cs%Ref_hv(k,col) = data_hv(cs%col_i_v(col),cs%col_j_v(col),k)
260  enddo ; enddo
261 
262  endif
263  total_sponge_cols_v = cs%num_col_v
264  call sum_across_pes(total_sponge_cols_v)
265  call log_param(param_file, mdl, "!Total sponge columns at v points", total_sponge_cols_v, &
266  "The total number of columns where sponges are applied at v points.")
267  endif
268 
269 end subroutine initialize_ale_sponge
270 
271 !> Initialize diagnostics for the ALE_sponge module.
272 ! GMM: this routine is not being used for now.
273 subroutine init_ale_sponge_diags(Time, G, diag, CS)
274  type(time_type), target, intent(in) :: Time
275  type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure
276  type(diag_ctrl), target, intent(inout) :: diag
277  type(ale_sponge_cs), pointer :: CS
278 
279  if (.not.associated(cs)) return
280 
281  cs%diag => diag
282 
283 end subroutine init_ale_sponge_diags
284 
285 !> This subroutine stores the reference profile at h points for the variable
286 ! whose address is given by f_ptr.
287 subroutine set_up_ale_sponge_field(sp_val, G, f_ptr, CS)
288  type(ocean_grid_type), intent(in) :: G !< Grid structure (in).
289  type(ale_sponge_cs), pointer :: CS !< Sponge structure (in/out).
290  real, dimension(SZI_(G),SZJ_(G),CS%nz_data), intent(in) :: sp_val !< Field to be used in the sponge, it has arbritary number of layers (in).
291  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), target, intent(in) :: f_ptr !< Pointer to the field to be damped (in).
292 
293  integer :: j, k, col
294  character(len=256) :: mesg ! String for error messages
295 
296  if (.not.associated(cs)) return
297 
298  cs%fldno = cs%fldno + 1
299 
300  if (cs%fldno > max_fields_) then
301  write(mesg,'("Increase MAX_FIELDS_ to at least ",I3," in MOM_memory.h or decrease &
302  &the number of fields to be damped in the call to &
303  &initialize_sponge." )') cs%fldno
304  call mom_error(fatal,"set_up_ALE_sponge_field: "//mesg)
305  endif
306 
307  ! stores the reference profile
308  allocate(cs%Ref_val(cs%fldno)%p(cs%nz_data,cs%num_col))
309  cs%Ref_val(cs%fldno)%p(:,:) = 0.0
310  do col=1,cs%num_col
311  do k=1,cs%nz_data
312  cs%Ref_val(cs%fldno)%p(k,col) = sp_val(cs%col_i(col),cs%col_j(col),k)
313  enddo
314  enddo
315 
316  cs%var(cs%fldno)%p => f_ptr
317 
318 end subroutine set_up_ale_sponge_field
319 
320 !> This subroutine stores the reference profile at uand v points for the variable
321 ! whose address is given by u_ptr and v_ptr.
322 subroutine set_up_ale_sponge_vel_field(u_val, v_val, G, u_ptr, v_ptr, CS)
323  type(ocean_grid_type), intent(in) :: G !< Grid structure (in).
324  type(ale_sponge_cs), pointer :: CS !< Sponge structure (in/out).
325  real, dimension(SZIB_(G),SZJ_(G),CS%nz_data), intent(in) :: u_val !< u field to be used in the sponge, it has arbritary number of layers (in).
326  real, dimension(SZI_(G),SZJB_(G),CS%nz_data), intent(in) :: v_val !< u field to be used in the sponge, it has arbritary number of layers (in).
327  real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), target, intent(in) :: u_ptr !< u pointer to the field to be damped (in).
328  real, dimension(SZI_(G),SZJB_(G),SZK_(G)), target, intent(in) :: v_ptr !< v pointer to the field to be damped (in).
329 
330  integer :: j, k, col
331  character(len=256) :: mesg ! String for error messages
332 
333  if (.not.associated(cs)) return
334 
335  ! stores the reference profile
336  allocate(cs%Ref_val_u(cs%nz_data,cs%num_col_u))
337  cs%Ref_val_u(:,:) = 0.0
338  do col=1,cs%num_col_u
339  do k=1,cs%nz_data
340  cs%Ref_val_u(k,col) = u_val(cs%col_i_u(col),cs%col_j_u(col),k)
341  enddo
342  enddo
343 
344  cs%var_u => u_ptr
345 
346  allocate(cs%Ref_val_v(cs%nz_data,cs%num_col_v))
347  cs%Ref_val_v(:,:) = 0.0
348  do col=1,cs%num_col_v
349  do k=1,cs%nz_data
350  cs%Ref_val_v(k,col) = v_val(cs%col_i_v(col),cs%col_j_v(col),k)
351  enddo
352  enddo
353 
354  cs%var_v => v_ptr
355 
356 end subroutine set_up_ale_sponge_vel_field
357 
358 !> This subroutine applies damping to the layers thicknesses, temp, salt and a variety of tracers for every column where there is damping.
359 subroutine apply_ale_sponge(h, dt, G, CS)
360  type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure (in).
361  real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h !< Layer thickness, in m (in)
362  real, intent(in) :: dt !< The amount of time covered by this call, in s (in).
363  type(ale_sponge_cs), pointer :: CS !<A pointer to the control structure for this module that is set by a previous call to initialize_sponge (in).
364 
365  real :: damp !< The timestep times the local damping coefficient. ND.
366  real :: I1pdamp !< I1pdamp is 1/(1 + damp). Nondimensional.
367  real :: Idt !< 1.0/dt, in s-1.
368  real :: tmp_val1(cs%nz) !< data values remapped to model grid
369  real :: tmp_val2(cs%nz_data) ! data values remapped to model grid
370  real :: hu(szib_(g), szj_(g), szk_(g)) !> A temporary array for h at u pts
371  real :: hv(szi_(g), szjb_(g), szk_(g)) !> A temporary array for h at v pts
372  integer :: c, m, nkmb, i, j, k, is, ie, js, je, nz
373  is = g%isc ; ie = g%iec ; js = g%jsc ; je = g%jec ; nz = g%ke
374 
375  if (.not.associated(cs)) return
376 
377  do c=1,cs%num_col
378 ! c is an index for the next 3 lines but a multiplier for the rest of the loop
379 ! Therefore we use c as per C code and increment the index where necessary.
380  i = cs%col_i(c) ; j = cs%col_j(c)
381  damp = dt*cs%Iresttime_col(c)
382  i1pdamp = 1.0 / (1.0 + damp)
383  do m=1,cs%fldno
384  tmp_val2(1:cs%nz_data) = cs%Ref_val(m)%p(1:cs%nz_data,c)
385  call remapping_core_h(cs%remap_cs, &
386  cs%nz_data, cs%Ref_h(:,c), tmp_val2, &
387  cs%nz, h(i,j,:), tmp_val1)
388 
389  !Backward Euler method
390  cs%var(m)%p(i,j,:) = i1pdamp * &
391  (cs%var(m)%p(i,j,:) + tmp_val1 * damp)
392 
393 ! CS%var(m)%p(i,j,k) = I1pdamp * &
394 ! (CS%var(m)%p(i,j,k) + tmp_val1 * damp)
395  enddo
396 
397  enddo ! end of c loop
398  ! for debugging
399  !c=CS%num_col
400  !do m=1,CS%fldno
401  ! write(*,*)'APPLY SPONGE,m,CS%Ref_h(:,c),h(i,j,:),tmp_val2,tmp_val1',m,CS%Ref_h(:,c),h(i,j,:),tmp_val2,tmp_val1
402  !enddo
403 
404  if (cs%sponge_uv) then
405 
406  ! u points
407  do j=cs%jsc,cs%jec; do i=cs%iscB,cs%iecB; do k=1,nz
408  hu(i,j,k) = 0.5 * (h(i,j,k) + h(i+1,j,k))
409  enddo; enddo; enddo
410 
411  do c=1,cs%num_col_u
412  i = cs%col_i_u(c) ; j = cs%col_j_u(c)
413  damp = dt*cs%Iresttime_col_u(c)
414  i1pdamp = 1.0 / (1.0 + damp)
415  tmp_val2(1:cs%nz_data) = cs%Ref_val_u(1:cs%nz_data,c)
416  call remapping_core_h(cs%remap_cs, &
417  cs%nz_data, cs%Ref_hu(:,c), tmp_val2, &
418  cs%nz, hu(i,j,:), tmp_val1)
419 
420  !Backward Euler method
421  cs%var_u(i,j,:) = i1pdamp * (cs%var_u(i,j,:) + tmp_val1 * damp)
422  enddo
423 
424  ! v points
425  do j=cs%jscB,cs%jecB; do i=cs%isc,cs%iec; do k=1,nz
426  hv(i,j,k) = 0.5 * (h(i,j,k) + h(i,j+1,k))
427  enddo; enddo; enddo
428 
429  do c=1,cs%num_col_v
430  i = cs%col_i_v(c) ; j = cs%col_j_v(c)
431  damp = dt*cs%Iresttime_col_v(c)
432  i1pdamp = 1.0 / (1.0 + damp)
433  tmp_val2(1:cs%nz_data) = cs%Ref_val_v(1:cs%nz_data,c)
434  call remapping_core_h(cs%remap_cs, &
435  cs%nz_data, cs%Ref_hv(:,c), tmp_val2, &
436  cs%nz, hv(i,j,:), tmp_val1)
437  !Backward Euler method
438  cs%var_v(i,j,:) = i1pdamp * (cs%var_v(i,j,:) + tmp_val1 * damp)
439  enddo
440 
441  endif
442 end subroutine apply_ale_sponge
443 
444 !> GMM: I could not find where sponge_end is being called, but I am keeping
445 ! ALE_sponge_end here so we can add that if needed.
446 subroutine ale_sponge_end(CS)
447  type(ale_sponge_cs), pointer :: CS
448 ! (in) CS - A pointer to the control structure for this module that is
449 ! set by a previous call to initialize_sponge.
450  integer :: m
451 
452  if (.not.associated(cs)) return
453 
454  if (associated(cs%col_i)) deallocate(cs%col_i)
455  if (associated(cs%col_i_u)) deallocate(cs%col_i_u)
456  if (associated(cs%col_i_v)) deallocate(cs%col_i_v)
457  if (associated(cs%col_j)) deallocate(cs%col_j)
458  if (associated(cs%col_j_u)) deallocate(cs%col_j_u)
459  if (associated(cs%col_j_v)) deallocate(cs%col_j_v)
460 
461  if (associated(cs%Iresttime_col)) deallocate(cs%Iresttime_col)
462  if (associated(cs%Iresttime_col_u)) deallocate(cs%Iresttime_col_u)
463  if (associated(cs%Iresttime_col_v)) deallocate(cs%Iresttime_col_v)
464 
465  do m=1,cs%fldno
466  if (associated(cs%Ref_val(cs%fldno)%p)) deallocate(cs%Ref_val(cs%fldno)%p)
467  enddo
468 
469  deallocate(cs)
470 
471 end subroutine ale_sponge_end
472 end module mom_ale_sponge
subroutine, public ale_sponge_end(CS)
GMM: I could not find where sponge_end is being called, but I am keeping.
subroutine, public apply_ale_sponge(h, dt, G, CS)
This subroutine applies damping to the layers thicknesses, temp, salt and a variety of tracers for ev...
Ocean grid type. See mom_grid for details.
Definition: MOM_grid.F90:19
The following data type a list of diagnostic fields an their variants, as well as variables that cont...
Provides the ocean grid type.
Definition: MOM_grid.F90:2
Provides column-wise vertical remapping functions.
subroutine, public set_up_ale_sponge_field(sp_val, G, f_ptr, CS)
This subroutine stores the reference profile at h points for the variable.
This module contains the routines used to apply sponge layers when using the ALE mode. Applying sponges requires the following: (1) initialize_ALE_sponge (2) set_up_ALE_sponge_field (tracers) and set_up_ALE_sponge_vel_field (vel) (3) apply_ALE_sponge (4) init_ALE_sponge_diags (not being used for now) (5) ALE_sponge_end (not being used for now)
SPONGE control structure.
Container for remapping parameters.
logical function, public query_averaging_enabled(diag_cs, time_int, time_end)
subroutine, public global_i_mean(array, i_mean, G, mask)
logical function, public is_root_pe()
subroutine, public set_up_ale_sponge_vel_field(u_val, v_val, G, u_ptr, v_ptr, CS)
This subroutine stores the reference profile at uand v points for the variable.
subroutine, public initialize_ale_sponge(Iresttime, data_h, nz_data, G, param_file, CS)
This subroutine determines the number of points which are within.
subroutine, public init_ale_sponge_diags(Time, G, diag, CS)
Initialize diagnostics for the ALE_sponge module.
subroutine, public remapping_core_h(CS, n0, h0, u0, n1, h1, u1)
Remaps column of values u0 on grid h0 to grid h1 assuming the top edge is aligned.
subroutine, public initialize_remapping(CS, remapping_scheme, boundary_extrapolation, check_reconstruction, check_remapping, force_bounds_in_subcell)
Constructor for remapping control structure.
integer function, public register_diag_field(module_name, field_name, axes, init_time, long_name, units, missing_value, range, mask_variant, standard_name, verbose, do_not_log, err_msg, interp_method, tile_count, cmor_field_name, cmor_long_name, cmor_units, cmor_standard_name, cell_methods, x_cell_method, y_cell_method, v_cell_method, conversion, v_extensive)
Returns the "diag_mediator" handle for a group (native, CMOR, z-coord, ...) of diagnostics derived fr...
subroutine, public mom_error(level, message, all_print)