39 |
integer jmax |
integer jmax |
40 |
integer imin |
integer imin |
41 |
integer imax |
integer imax |
42 |
|
integer exferr |
43 |
|
|
44 |
c == end of interface == |
c == end of interface == |
45 |
|
|
46 |
|
exferr = 0 |
47 |
|
|
48 |
jtlo = mybylo(mythid) |
jtlo = mybylo(mythid) |
49 |
jthi = mybyhi(mythid) |
jthi = mybyhi(mythid) |
50 |
itlo = mybxlo(mythid) |
itlo = mybxlo(mythid) |
62 |
c |
c |
63 |
c Heat flux. |
c Heat flux. |
64 |
if ( ABS(hflux(i,j,bi,bj)) .GT. 1000. .AND. |
if ( ABS(hflux(i,j,bi,bj)) .GT. 1000. .AND. |
65 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
& hFacC(i,j,1,bi,bj) .NE. 0. ) then |
66 |
& print *, 'EXF WARNING: hflux out of range for i,j= ', |
print *, 'EXF WARNING: hflux out of range for i,j= ', |
67 |
& i, j, hflux(i,j,bi,bj) |
& i, j, hflux(i,j,bi,bj) |
68 |
|
exferr = 1 |
69 |
|
endif |
70 |
c |
c |
71 |
c Salt flux. |
c Salt flux. |
72 |
if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND. |
if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND. |
73 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
& hFacC(i,j,1,bi,bj) .NE. 0. ) then |
74 |
& print *, 'EXF WARNING: sflux out of range for i,j= ', |
print *, 'EXF WARNING: sflux out of range for i,j= ', |
75 |
& i, j, sflux(i,j,bi,bj) |
& i, j, sflux(i,j,bi,bj) |
76 |
|
exferr = 1 |
77 |
|
endif |
78 |
c |
c |
79 |
c Zonal wind stress. |
c Zonal wind stress. |
80 |
if ( ABS(ustress(i,j,bi,bj)) .GT. 2. .AND. |
if ( ABS(ustress(i,j,bi,bj)) .GT. 2. .AND. |
81 |
& hFacW(i,j,1,bi,bj) .NE. 0. ) |
& hFacW(i,j,1,bi,bj) .NE. 0. ) then |
82 |
& print *, 'EXF WARNING: ustress out of range for i,j= ', |
print *, 'EXF WARNING: ustress out of range for i,j= ', |
83 |
& i, j, ustress(i,j,bi,bj) |
& i, j, ustress(i,j,bi,bj) |
84 |
|
exferr = 1 |
85 |
|
endif |
86 |
c |
c |
87 |
c Meridional wind stress. |
c Meridional wind stress. |
88 |
if ( ABS(vstress(i,j,bi,bj)) .GT. 2. .AND. |
if ( ABS(vstress(i,j,bi,bj)) .GT. 2. .AND. |
89 |
& hFacS(i,j,1,bi,bj) .NE. 0. ) |
& hFacS(i,j,1,bi,bj) .NE. 0. ) then |
90 |
& print *, 'EXF WARNING: vstress out of range for i,j= ', |
print *, 'EXF WARNING: vstress out of range for i,j= ', |
91 |
& i, j, vstress(i,j,bi,bj) |
& i, j, vstress(i,j,bi,bj) |
92 |
|
exferr = 1 |
93 |
|
endif |
94 |
c |
c |
95 |
#ifdef ALLOW_ATM_WIND |
#ifdef ALLOW_ATM_WIND |
96 |
c zonal wind speed |
c zonal wind speed |
97 |
if ( ABS(uwind(i,j,bi,bj)) .GT. 40. .AND. |
if ( ABS(uwind(i,j,bi,bj)) .GT. 100. .AND. |
98 |
& hFacW(i,j,1,bi,bj) .NE. 0. ) |
& hFacW(i,j,1,bi,bj) .NE. 0. ) then |
99 |
& print *, 'EXF WARNING: uwind out of range for i,j= ', |
print *, 'EXF WARNING: uwind out of range for i,j= ', |
100 |
& i, j, uwind(i,j,bi,bj) |
& i, j, uwind(i,j,bi,bj) |
101 |
|
exferr = 1 |
102 |
|
endif |
103 |
c |
c |
104 |
c zonal wind speed |
c zonal wind speed |
105 |
if ( ABS(vwind(i,j,bi,bj)) .GT. 40. .AND. |
if ( ABS(vwind(i,j,bi,bj)) .GT. 100. .AND. |
106 |
& hFacS(i,j,1,bi,bj) .NE. 0. ) |
& hFacS(i,j,1,bi,bj) .NE. 0. ) then |
107 |
& print *, 'EXF WARNING: vwind out of range for i,j= ', |
print *, 'EXF WARNING: vwind out of range for i,j= ', |
108 |
& i, j, vwind(i,j,bi,bj) |
& i, j, vwind(i,j,bi,bj) |
109 |
|
exferr = 1 |
110 |
|
endif |
111 |
#endif |
#endif |
112 |
|
|
113 |
#ifdef ALLOW_ATM_TEMP |
#ifdef ALLOW_ATM_TEMP |
114 |
c 2-m air temperature |
c 2-m air temperature |
115 |
if ( (atemp(i,j,bi,bj) .LT. 223 .OR. |
if ( (atemp(i,j,bi,bj) .LT. 183 .OR. |
116 |
& atemp(i,j,bi,bj) .GT. 323 ) .AND. |
& atemp(i,j,bi,bj) .GT. 343 ) .AND. |
117 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
& hFacC(i,j,1,bi,bj) .NE. 0. ) then |
118 |
& print *, 'EXF WARNING: atemp out of range for i,j= ', |
print *, 'EXF WARNING: atemp + exf_offset_atemp ', |
119 |
& i, j, atemp(i,j,bi,bj) |
& 'out of range for i,j= ', |
120 |
|
& i, j, atemp(i,j,bi,bj) |
121 |
|
exferr = 1 |
122 |
|
endif |
123 |
c |
c |
124 |
c 2-m specific humidity |
c 2-m specific humidity |
125 |
if ( (aqh(i,j,bi,bj) .LT. 0. .OR. |
if ( (aqh(i,j,bi,bj) .LT. 0. .OR. |
126 |
& aqh(i,j,bi,bj) .GT. 1.E-6 ) .AND. |
& aqh(i,j,bi,bj) .GT. 0.1 ) .AND. |
127 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
& hFacC(i,j,1,bi,bj) .NE. 0. ) then |
128 |
& print *, 'EXF WARNING: aqh out of range for i,j= ', |
print *, 'EXF WARNING: aqh out of range for i,j= ', |
129 |
& i, j, aqh(i,j,bi,bj) |
& i, j, aqh(i,j,bi,bj) |
130 |
|
exferr = 1 |
131 |
|
endif |
132 |
c |
c |
133 |
c precipitation rate |
c precipitation rate |
134 |
if ( (precip(i,j,bi,bj) .LT. 0. .OR. |
if ( (precip(i,j,bi,bj) .LT. 0. .OR. |
135 |
& precip(i,j,bi,bj) .GT. 0.1 ) .AND. |
& precip(i,j,bi,bj) .GT. 0.1 ) .AND. |
136 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
& hFacC(i,j,1,bi,bj) .NE. 0. ) then |
137 |
& print *, 'EXF WARNING: precip out of range for i,j= ', |
print *, 'EXF WARNING: precip out of range for i,j= ', |
138 |
& i, j, precip(i,j,bi,bj) |
& i, j, precip(i,j,bi,bj) |
139 |
|
exferr = 1 |
140 |
|
endif |
141 |
#endif |
#endif |
142 |
|
|
143 |
#ifdef SHORTWAVE_HEATING |
#ifdef SHORTWAVE_HEATING |
144 |
c Short wave radiative flux. |
c Short wave radiative flux. |
145 |
if ( (swflux(i,j,bi,bj) .GT. 0. .OR. |
if ( (swflux(i,j,bi,bj) .GT. 0. .OR. |
146 |
& swflux(i,j,bi,bj) .LT. -500. ) .AND. |
& swflux(i,j,bi,bj) .LT. -500. ) .AND. |
147 |
& hFacC(i,j,1,bi,bj) .NE. 0. ) |
& hFacC(i,j,1,bi,bj) .NE. 0. ) then |
148 |
& print *, 'EXF WARNING: swflux out of range for i,j= ', |
print *, 'EXF WARNING: swflux out of range for i,j= ', |
149 |
& i, j, swflux(i,j,bi,bj) |
& i, j, swflux(i,j,bi,bj) |
150 |
|
exferr = 1 |
151 |
|
endif |
152 |
#endif |
#endif |
153 |
|
|
154 |
|
#ifdef ALLOW_RUNOFF |
155 |
|
c Short wave radiative flux. |
156 |
|
if ( (runoff(i,j,bi,bj) .LT. 0. .OR. |
157 |
|
& runoff(i,j,bi,bj) .GT. 1.E-6 ) .AND. |
158 |
|
& hFacC(i,j,1,bi,bj) .NE. 0. ) then |
159 |
|
print *, 'EXF WARNING: runoff out of range for i,j= ', |
160 |
|
& i, j, runoff(i,j,bi,bj) |
161 |
|
exferr = 1 |
162 |
|
endif |
163 |
|
#endif |
164 |
|
|
165 |
|
if ( exferr .NE. 0 ) then |
166 |
|
print *, 'EXF WARNING: If you think these values are OK ' |
167 |
|
print *, 'EXF WARNING: then set useExfCheckRange=.FALSE.' |
168 |
|
STOP 'in S/R exf_check_range' |
169 |
|
endif |
170 |
|
|
171 |
enddo |
enddo |
172 |
enddo |
enddo |
173 |
c |
c |