/[MITgcm]/MITgcm/pkg/exf/exf_check_range.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_check_range.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Sat Nov 27 15:41:50 2004 UTC (19 years, 6 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint56a_post
Changes since 1.3: +6 -2 lines
Added warning and instructions for converting runoff from m/yr to m/s.

1 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check_range.F,v 1.3 2004/11/22 20:47: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 integer exferr
43
44 c == end of interface ==
45
46 exferr = 0
47
48 jtlo = mybylo(mythid)
49 jthi = mybyhi(mythid)
50 itlo = mybxlo(mythid)
51 ithi = mybxhi(mythid)
52 jmin = 1-oly
53 jmax = sny+oly
54 imin = 1-olx
55 imax = snx+olx
56
57 do bj = jtlo,jthi
58 do bi = itlo,ithi
59
60 do j = jmin,jmax
61 do i = imin,imax
62 c
63 c Heat flux.
64 if ( ABS(hflux(i,j,bi,bj)) .GT. 1000. .AND.
65 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
66 print *, 'EXF WARNING: hflux out of range for i,j= ',
67 & i, j, hflux(i,j,bi,bj)
68 exferr = 1
69 endif
70 c
71 c Salt flux.
72 if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND.
73 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
74 print *, 'EXF WARNING: sflux out of range for i,j= ',
75 & i, j, sflux(i,j,bi,bj)
76 exferr = 1
77 endif
78 c
79 c Zonal wind stress.
80 if ( ABS(ustress(i,j,bi,bj)) .GT. 2. .AND.
81 & hFacW(i,j,1,bi,bj) .NE. 0. ) then
82 print *, 'EXF WARNING: ustress out of range for i,j= ',
83 & i, j, ustress(i,j,bi,bj)
84 exferr = 1
85 endif
86 c
87 c Meridional wind stress.
88 if ( ABS(vstress(i,j,bi,bj)) .GT. 2. .AND.
89 & hFacS(i,j,1,bi,bj) .NE. 0. ) then
90 print *, 'EXF WARNING: vstress out of range for i,j= ',
91 & i, j, vstress(i,j,bi,bj)
92 exferr = 1
93 endif
94 c
95 #ifdef ALLOW_ATM_WIND
96 c zonal wind speed
97 if ( ABS(uwind(i,j,bi,bj)) .GT. 100. .AND.
98 & hFacW(i,j,1,bi,bj) .NE. 0. ) then
99 print *, 'EXF WARNING: uwind out of range for i,j= ',
100 & i, j, uwind(i,j,bi,bj)
101 exferr = 1
102 endif
103 c
104 c zonal wind speed
105 if ( ABS(vwind(i,j,bi,bj)) .GT. 100. .AND.
106 & hFacS(i,j,1,bi,bj) .NE. 0. ) then
107 print *, 'EXF WARNING: vwind out of range for i,j= ',
108 & i, j, vwind(i,j,bi,bj)
109 exferr = 1
110 endif
111 #endif
112
113 #ifdef ALLOW_ATM_TEMP
114 c 2-m air temperature
115 if ( (atemp(i,j,bi,bj) .LT. 183 .OR.
116 & atemp(i,j,bi,bj) .GT. 343 ) .AND.
117 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
118 print *, 'EXF WARNING: atemp + exf_offset_atemp ',
119 & 'out of range for i,j= ',
120 & i, j, atemp(i,j,bi,bj)
121 exferr = 1
122 endif
123 c
124 c 2-m specific humidity
125 if ( (aqh(i,j,bi,bj) .LT. 0. .OR.
126 & aqh(i,j,bi,bj) .GT. 0.1 ) .AND.
127 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
128 print *, 'EXF WARNING: aqh out of range for i,j= ',
129 & i, j, aqh(i,j,bi,bj)
130 exferr = 1
131 endif
132 c
133 c precipitation rate
134 if ( (precip(i,j,bi,bj) .LT. 0. .OR.
135 & precip(i,j,bi,bj) .GT. 0.1 ) .AND.
136 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
137 print *, 'EXF WARNING: precip out of range for i,j= ',
138 & i, j, precip(i,j,bi,bj)
139 exferr = 1
140 endif
141 #endif
142
143 #ifdef SHORTWAVE_HEATING
144 c Short wave radiative flux.
145 if ( (swflux(i,j,bi,bj) .GT. 0. .OR.
146 & swflux(i,j,bi,bj) .LT. -500. ) .AND.
147 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
148 print *, 'EXF WARNING: swflux out of range for i,j= ',
149 & i, j, swflux(i,j,bi,bj)
150 exferr = 1
151 endif
152 #endif
153
154 #ifdef ALLOW_RUNOFF
155 c Runoff.
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 print *, 'Please note that input units for runoff are'
162 print *, 'm/s not m/yr. If input file is in m/yr, set'
163 print *, 'exf_inscalrunoff=1.0/(86400.*365.0)'
164 print *, 'in the data.exf input file.'
165 exferr = 1
166 endif
167 #endif
168
169 if ( exferr .NE. 0 ) then
170 print *, 'EXF WARNING: If you think these values are OK '
171 print *, 'EXF WARNING: then set useExfCheckRange=.FALSE.'
172 STOP 'in S/R exf_check_range'
173 endif
174
175 enddo
176 enddo
177 c
178 enddo
179 enddo
180
181 end

  ViewVC Help
Powered by ViewVC 1.1.22