Checksums a pair of arrays (2d or 3d) staggered at tracer points.
Definition at line 24 of file MOM_checksums.F90.
|
| subroutine | chksum_pair_h_2d (mesg, arrayA, arrayB, HI, haloshift, omit_corners, scale, logunit, scalar_pair) |
| | Checksums on a pair of 2d arrays staggered at tracer points. More...
|
| |
| subroutine | chksum_pair_h_3d (mesg, arrayA, arrayB, HI, haloshift, omit_corners, scale, logunit, scalar_pair) |
| | Checksums on a pair of 3d arrays staggered at tracer points. More...
|
| |
Checksums a pair of arrays (2d or 3d) staggered at tracer points.
Definition at line 24 of file MOM_checksums.F90.
◆ chksum_pair_h_2d()
| subroutine mom_checksums::hchksum_pair::chksum_pair_h_2d |
( |
character(len=*), intent(in) |
mesg, |
|
|
real, dimension(hi%isd:,hi%jsd:), intent(in), target |
arrayA, |
|
|
real, dimension(hi%isd:,hi%jsd:), intent(in), target |
arrayB, |
|
|
type(hor_index_type), intent(in), target |
HI, |
|
|
integer, intent(in), optional |
haloshift, |
|
|
logical, intent(in), optional |
omit_corners, |
|
|
real, intent(in), optional |
scale, |
|
|
integer, intent(in), optional |
logunit, |
|
|
logical, intent(in), optional |
scalar_pair |
|
) |
| |
|
private |
Checksums on a pair of 2d arrays staggered at tracer points.
- Parameters
-
| [in] | mesg | Identifying messages |
| [in] | hi | A horizontal index type |
| [in] | arraya | The first array to be checksummed |
| [in] | arrayb | The second array to be checksummed |
| [in] | haloshift | The width of halos to check (default 0) |
| [in] | omit_corners | If true, avoid checking diagonal shifts |
| [in] | scale | A scaling factor for this array. |
| [in] | logunit | IO unit for checksum logging |
| [in] | scalar_pair | If true, then the arrays describe a scalar, rather than vector |
Definition at line 200 of file MOM_checksums.F90.
202 character(len=*),
intent(in) :: mesg
203 type(hor_index_type),
target,
intent(in) :: HI
204 real,
dimension(HI%isd:,HI%jsd:),
target,
intent(in) :: arrayA
205 real,
dimension(HI%isd:,HI%jsd:),
target,
intent(in) :: arrayB
206 integer,
optional,
intent(in) :: haloshift
207 logical,
optional,
intent(in) :: omit_corners
208 real,
optional,
intent(in) :: scale
209 integer,
optional,
intent(in) :: logunit
210 logical,
optional,
intent(in) :: scalar_pair
212 logical :: vector_pair
214 type(hor_index_type),
pointer :: HI_in
215 real,
dimension(:,:),
pointer :: arrayA_in, arrayB_in
218 if (
present(scalar_pair)) vector_pair = .not. scalar_pair
221 if (modulo(turns, 4) /= 0)
then
224 call rotate_hor_index(hi, -turns, hi_in)
225 allocate(arraya_in(hi_in%isd:hi_in%ied, hi_in%jsd:hi_in%jed))
226 allocate(arrayb_in(hi_in%isd:hi_in%ied, hi_in%jsd:hi_in%jed))
228 if (vector_pair)
then
229 call rotate_vector(arraya, arrayb, -turns, arraya_in, arrayb_in)
231 call rotate_array_pair(arraya, arrayb, -turns, arraya_in, arrayb_in)
239 if (
present(haloshift))
then
240 call chksum_h_2d(arraya_in,
'x '//mesg, hi_in, haloshift, omit_corners, &
241 scale=scale, logunit=logunit)
242 call chksum_h_2d(arrayb_in,
'y '//mesg, hi_in, haloshift, omit_corners, &
243 scale=scale, logunit=logunit)
245 call chksum_h_2d(arraya_in,
'x '//mesg, hi_in, scale=scale, logunit=logunit)
246 call chksum_h_2d(arrayb_in,
'y '//mesg, hi_in, scale=scale, logunit=logunit)
◆ chksum_pair_h_3d()
| subroutine mom_checksums::hchksum_pair::chksum_pair_h_3d |
( |
character(len=*), intent(in) |
mesg, |
|
|
real, dimension(hi%isd:,hi%jsd:, :), intent(in), target |
arrayA, |
|
|
real, dimension(hi%isd:,hi%jsd:, :), intent(in), target |
arrayB, |
|
|
type(hor_index_type), intent(in), target |
HI, |
|
|
integer, intent(in), optional |
haloshift, |
|
|
logical, intent(in), optional |
omit_corners, |
|
|
real, intent(in), optional |
scale, |
|
|
integer, intent(in), optional |
logunit, |
|
|
logical, intent(in), optional |
scalar_pair |
|
) |
| |
|
private |
Checksums on a pair of 3d arrays staggered at tracer points.
- Parameters
-
| [in] | mesg | Identifying messages |
| [in] | hi | A horizontal index type |
| [in] | arraya | The first array to be checksummed |
| [in] | arrayb | The second array to be checksummed |
| [in] | haloshift | The width of halos to check (default 0) |
| [in] | omit_corners | If true, avoid checking diagonal shifts |
| [in] | scale | A scaling factor for this array. |
| [in] | logunit | IO unit for checksum logging |
| [in] | scalar_pair | If true, then the arrays describe a scalar, rather than vector |
Definition at line 251 of file MOM_checksums.F90.
253 character(len=*),
intent(in) :: mesg
254 type(hor_index_type),
target,
intent(in) :: HI
255 real,
dimension(HI%isd:,HI%jsd:, :),
target,
intent(in) :: arrayA
256 real,
dimension(HI%isd:,HI%jsd:, :),
target,
intent(in) :: arrayB
257 integer,
optional,
intent(in) :: haloshift
258 logical,
optional,
intent(in) :: omit_corners
259 real,
optional,
intent(in) :: scale
260 integer,
optional,
intent(in) :: logunit
262 logical,
optional,
intent(in) :: scalar_pair
264 logical :: vector_pair
266 type(hor_index_type),
pointer :: HI_in
267 real,
dimension(:,:,:),
pointer :: arrayA_in, arrayB_in
270 if (
present(scalar_pair)) vector_pair = .not. scalar_pair
273 if (modulo(turns, 4) /= 0)
then
276 call rotate_hor_index(hi, -turns, hi_in)
277 allocate(arraya_in(hi_in%isd:hi_in%ied, hi_in%jsd:hi_in%jed,
size(arraya, 3)))
278 allocate(arrayb_in(hi_in%isd:hi_in%ied, hi_in%jsd:hi_in%jed,
size(arrayb, 3)))
280 if (vector_pair)
then
281 call rotate_vector(arraya, arrayb, -turns, arraya_in, arrayb_in)
283 call rotate_array_pair(arraya, arrayb, -turns, arraya_in, arrayb_in)
291 if (
present(haloshift))
then
292 call chksum_h_3d(arraya_in,
'x '//mesg, hi_in, haloshift, omit_corners, &
293 scale=scale, logunit=logunit)
294 call chksum_h_3d(arrayb_in,
'y '//mesg, hi_in, haloshift, omit_corners, &
295 scale=scale, logunit=logunit)
297 call chksum_h_3d(arraya_in,
'x '//mesg, hi_in, scale=scale, logunit=logunit)
298 call chksum_h_3d(arrayb_in,
'y '//mesg, hi_in, scale=scale, logunit=logunit)
The documentation for this interface was generated from the following file: