1 |
c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check_range.F,v 1.1 2004/02/26 19:34:34 heimbach Exp $ |
2 |
|
3 |
#include "EXF_OPTIONS.h" |
4 |
|
5 |
subroutine exf_check_range( mytime, myiter, mythid ) |
6 |
|
7 |
c ================================================================== |
8 |
c SUBROUTINE exf_check_range |
9 |
c ================================================================== |
10 |
c |
11 |
implicit none |
12 |
|
13 |
c == global variables == |
14 |
|
15 |
#include "EEPARAMS.h" |
16 |
#include "SIZE.h" |
17 |
#include "FFIELDS.h" |
18 |
#include "GRID.h" |
19 |
|
20 |
#include "exf_param.h" |
21 |
#include "exf_constants.h" |
22 |
#include "exf_fields.h" |
23 |
#include "exf_clim_fields.h" |
24 |
c == routine arguments == |
25 |
|
26 |
c mythid - thread number for this instance of the routine. |
27 |
|
28 |
integer mytime, myiter, mythid |
29 |
|
30 |
c == local variables == |
31 |
|
32 |
integer bi,bj |
33 |
integer i,j |
34 |
integer jtlo |
35 |
integer jthi |
36 |
integer itlo |
37 |
integer ithi |
38 |
integer jmin |
39 |
integer jmax |
40 |
integer imin |
41 |
integer imax |
42 |
|
43 |
c == end of interface == |
44 |
|
45 |
jtlo = mybylo(mythid) |
46 |
jthi = mybyhi(mythid) |
47 |
itlo = mybxlo(mythid) |
48 |
ithi = mybxhi(mythid) |
49 |
jmin = 1-oly |
50 |
jmax = sny+oly |
51 |
imin = 1-olx |
52 |
imax = snx+olx |
53 |
|
54 |
do bj = jtlo,jthi |
55 |
do bi = itlo,ithi |
56 |
|
57 |
do j = jmin,jmax |
58 |
do i = imin,imax |
59 |
c |
60 |
c Heat flux. |
61 |
if ( ABS(hflux(i,j,bi,bj)) .GT. 1000. .AND. |
62 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
63 |
& print *, 'EXF WARNING: hflux out of range for i,j= ', |
64 |
& i, j, hflux(i,j,bi,bj) |
65 |
c |
66 |
c Salt flux. |
67 |
if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND. |
68 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
69 |
& print *, 'EXF WARNING: sflux out of range for i,j= ', |
70 |
& i, j, sflux(i,j,bi,bj) |
71 |
c |
72 |
c Zonal wind stress. |
73 |
if ( ABS(ustress(i,j,bi,bj)) .GT. 2. .AND. |
74 |
& hFacW(i,j,1,bi,bj) .NE. 0. ) |
75 |
& print *, 'EXF WARNING: ustress out of range for i,j= ', |
76 |
& i, j, ustress(i,j,bi,bj) |
77 |
c |
78 |
c Meridional wind stress. |
79 |
if ( ABS(vstress(i,j,bi,bj)) .GT. 2. .AND. |
80 |
& hFacS(i,j,1,bi,bj) .NE. 0. ) |
81 |
& print *, 'EXF WARNING: vstress out of range for i,j= ', |
82 |
& i, j, vstress(i,j,bi,bj) |
83 |
c |
84 |
#ifdef ALLOW_ATM_WIND |
85 |
c zonal wind speed |
86 |
if ( ABS(uwind(i,j,bi,bj)) .GT. 40. .AND. |
87 |
& hFacW(i,j,1,bi,bj) .NE. 0. ) |
88 |
& print *, 'EXF WARNING: uwind out of range for i,j= ', |
89 |
& i, j, uwind(i,j,bi,bj) |
90 |
c |
91 |
c zonal wind speed |
92 |
if ( ABS(vwind(i,j,bi,bj)) .GT. 40. .AND. |
93 |
& hFacS(i,j,1,bi,bj) .NE. 0. ) |
94 |
& print *, 'EXF WARNING: vwind out of range for i,j= ', |
95 |
& i, j, vwind(i,j,bi,bj) |
96 |
#endif |
97 |
|
98 |
#ifdef ALLOW_ATM_TEMP |
99 |
c 2-m air temperature |
100 |
if ( (atemp(i,j,bi,bj) .LT. 223 .OR. |
101 |
& atemp(i,j,bi,bj) .GT. 323 ) .AND. |
102 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
103 |
& print *, 'EXF WARNING: atemp out of range for i,j= ', |
104 |
& i, j, atemp(i,j,bi,bj) |
105 |
c |
106 |
c 2-m specific humidity |
107 |
if ( (aqh(i,j,bi,bj) .LT. 0. .OR. |
108 |
& aqh(i,j,bi,bj) .GT. 1.E-6 ) .AND. |
109 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
110 |
& print *, 'EXF WARNING: aqh out of range for i,j= ', |
111 |
& i, j, aqh(i,j,bi,bj) |
112 |
c |
113 |
c precipitation rate |
114 |
if ( (precip(i,j,bi,bj) .LT. 0. .OR. |
115 |
& precip(i,j,bi,bj) .GT. 0.1 ) .AND. |
116 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
117 |
& print *, 'EXF WARNING: precip out of range for i,j= ', |
118 |
& i, j, precip(i,j,bi,bj) |
119 |
#endif |
120 |
|
121 |
#ifdef SHORTWAVE_HEATING |
122 |
c Short wave radiative flux. |
123 |
if ( (swflux(i,j,bi,bj) .GT. 0. .OR. |
124 |
& swflux(i,j,bi,bj) .LT. -500. ) .AND. |
125 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
126 |
& print *, 'EXF WARNING: swflux out of range for i,j= ', |
127 |
& i, j, swflux(i,j,bi,bj) |
128 |
#endif |
129 |
|
130 |
enddo |
131 |
enddo |
132 |
c |
133 |
enddo |
134 |
enddo |
135 |
|
136 |
end |