/[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.23 - (show annotations) (download)
Thu Jul 28 13:53:31 2005 UTC (18 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint57s_post, checkpoint57y_post, checkpoint57y_pre, checkpoint57r_post, checkpoint58, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint57q_post, checkpoint57z_post, checkpoint58b_post
Branch point for: release1_50yr
Changes since 1.22: +34 -34 lines
Adding precip control

1 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check_range.F,v 1.22 2005/06/14 23:21:05 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 _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 ( ( hflux(i,j,bi,bj) .GT. 1600. .OR.
66 & hflux(i,j,bi,bj) .LT. -500. ) .AND.
67 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
68 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
69 & 'EXF WARNING: hflux out of range for i,j,it= ',
70 & i, j, myiter, hflux(i,j,bi,bj)
71 exferr = 1
72 endif
73 c
74 c Salt flux.
75 if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND.
76 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
77 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
78 & 'EXF WARNING: sflux out of range for i,j,it= ',
79 & i, j, myiter, sflux(i,j,bi,bj)
80 exferr = 1
81 endif
82 c
83 c Zonal wind stress.
84 if ( ABS(ustress(i,j,bi,bj)) .GT. 2.7 .AND.
85 & hFacW(i,j,1,bi,bj) .NE. 0. ) then
86 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
87 & 'EXF WARNING: ustress out of range for i,j,it= ',
88 & i, j, myiter, ustress(i,j,bi,bj)
89 exferr = 1
90 endif
91 c
92 c Meridional wind stress.
93 if ( ABS(vstress(i,j,bi,bj)) .GT. 2.3 .AND.
94 & hFacS(i,j,1,bi,bj) .NE. 0. ) then
95 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
96 & 'EXF WARNING: vstress out of range for i,j,it= ',
97 & i, j, myiter, vstress(i,j,bi,bj)
98 exferr = 1
99 endif
100 c
101 #ifdef ALLOW_ATM_WIND
102 c zonal wind speed
103 if ( ABS(uwind(i,j,bi,bj)) .GT. 100. .AND.
104 & hFacW(i,j,1,bi,bj) .NE. 0. ) then
105 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
106 & 'EXF WARNING: uwind out of range for i,j,it= ',
107 & i, j, myiter, uwind(i,j,bi,bj)
108 exferr = 1
109 endif
110 c
111 c zonal wind speed
112 if ( ABS(vwind(i,j,bi,bj)) .GT. 100. .AND.
113 & hFacS(i,j,1,bi,bj) .NE. 0. ) then
114 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
115 & 'EXF WARNING: vwind out of range for i,j,it= ',
116 & i, j, myiter, vwind(i,j,bi,bj)
117 exferr = 1
118 endif
119 #endif
120
121 #ifdef ALLOW_ATM_TEMP
122 c 2-m air temperature
123 if ( (atemp(i,j,bi,bj) .LT. 183 .OR.
124 & atemp(i,j,bi,bj) .GT. 343 ) .AND.
125 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
126 write(standardmessageunit,'(2A,3(1X,I6),2X,D22.15)')
127 & 'EXF WARNING: atemp + exf_offset_atemp ',
128 & 'out of range for i,j,it= ',
129 & i, j, myiter, atemp(i,j,bi,bj)
130 exferr = 1
131 endif
132 c
133 c 2-m specific humidity
134 if ( (aqh(i,j,bi,bj) .LT. 0. .OR.
135 & aqh(i,j,bi,bj) .GT. 0.1 ) .AND.
136 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
137 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
138 & 'EXF WARNING: aqh out of range for i,j,it= ',
139 & i, j, myiter, aqh(i,j,bi,bj)
140 exferr = 1
141 endif
142 c
143 c precipitation rate
144 if ( (precip(i,j,bi,bj) .LT. 0. .OR.
145 & precip(i,j,bi,bj) .GT. 2.E-6 ) .AND.
146 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
147 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
148 & 'EXF WARNING: precip out of range for i,j,it= ',
149 & i, j, myiter, precip(i,j,bi,bj)
150 exferr = 1
151 endif
152 #endif
153
154 #ifdef SHORTWAVE_HEATING
155 c Short wave radiative flux.
156 if ( (swflux(i,j,bi,bj) .GT. 1. .OR.
157 & swflux(i,j,bi,bj) .LT. -1000. ) .AND.
158 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
159 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
160 & 'EXF WARNING: swflux out of range for i,j,it= ',
161 & i, j, myiter, swflux(i,j,bi,bj)
162 exferr = 1
163 endif
164 #endif
165
166 #ifdef ALLOW_RUNOFF
167 c Runoff.
168 if ( (runoff(i,j,bi,bj) .LT. 0. .OR.
169 & runoff(i,j,bi,bj) .GT. 1.E-6 ) .AND.
170 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
171 write(standardmessageunit,'(A,3(1X,I6),2X,D22.15)')
172 & 'EXF WARNING: runoff out of range for i,j,it= ',
173 & i, j, myiter, runoff(i,j,bi,bj)
174 write(standardmessageunit,'(A)')
175 & 'Please note that input units for runoff are'
176 write(standardmessageunit,'(A)')
177 & 'm/s not m/yr. If input file is in m/yr, set'
178 write(standardmessageunit,'(A)')
179 & 'exf_inscal_runoff=3.170979198E-8'
180 write(standardmessageunit,'(A)')
181 & 'in the data.exf input file.'
182 exferr = 1
183 endif
184 #endif
185
186 if ( exferr .NE. 0 ) then
187 write(standardmessageunit,'(A)')
188 & 'EXF WARNING: If you think these values are OK '
189 write(standardmessageunit,'(A)')
190 & 'EXF WARNING: then set useExfCheckRange=.FALSE.'
191 STOP 'in S/R exf_check_range'
192 endif
193
194 enddo
195 enddo
196 c
197 enddo
198 enddo
199
200 end

  ViewVC Help
Powered by ViewVC 1.1.22