/[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.11 - (show annotations) (download)
Tue Dec 7 22:43:05 2004 UTC (19 years, 6 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint57a_post, checkpoint57a_pre, checkpoint57
Changes since 1.10: +1 -1 lines
increased hflux range to 1100 W/m^2 in pkg/exf/exf_check_range.F

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

  ViewVC Help
Powered by ViewVC 1.1.22