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

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

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


Revision 1.23 - (hide 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 heimbach 1.23 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check_range.F,v 1.22 2005/06/14 23:21:05 heimbach Exp $
2 heimbach 1.1
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 jmc 1.9 _RL mytime
29     integer myiter, mythid
30 heimbach 1.1
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 heimbach 1.3 integer exferr
44 heimbach 1.1
45     c == end of interface ==
46    
47 heimbach 1.3 exferr = 0
48    
49 heimbach 1.1 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 dimitri 1.15 if ( ( hflux(i,j,bi,bj) .GT. 1600. .OR.
66 dimitri 1.12 & hflux(i,j,bi,bj) .LT. -500. ) .AND.
67 heimbach 1.3 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
68 heimbach 1.23 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 heimbach 1.3 exferr = 1
72     endif
73 heimbach 1.1 c
74     c Salt flux.
75 heimbach 1.2 if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND.
76 heimbach 1.3 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
77 heimbach 1.23 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 heimbach 1.3 exferr = 1
81     endif
82 heimbach 1.1 c
83     c Zonal wind stress.
84 dimitri 1.21 if ( ABS(ustress(i,j,bi,bj)) .GT. 2.7 .AND.
85 heimbach 1.3 & hFacW(i,j,1,bi,bj) .NE. 0. ) then
86 heimbach 1.23 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 heimbach 1.3 exferr = 1
90     endif
91 heimbach 1.1 c
92     c Meridional wind stress.
93 dimitri 1.19 if ( ABS(vstress(i,j,bi,bj)) .GT. 2.3 .AND.
94 heimbach 1.3 & hFacS(i,j,1,bi,bj) .NE. 0. ) then
95 heimbach 1.23 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 heimbach 1.3 exferr = 1
99     endif
100 heimbach 1.1 c
101     #ifdef ALLOW_ATM_WIND
102     c zonal wind speed
103 heimbach 1.3 if ( ABS(uwind(i,j,bi,bj)) .GT. 100. .AND.
104     & hFacW(i,j,1,bi,bj) .NE. 0. ) then
105 heimbach 1.23 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 heimbach 1.3 exferr = 1
109     endif
110 heimbach 1.1 c
111     c zonal wind speed
112 heimbach 1.3 if ( ABS(vwind(i,j,bi,bj)) .GT. 100. .AND.
113     & hFacS(i,j,1,bi,bj) .NE. 0. ) then
114 heimbach 1.23 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 heimbach 1.3 exferr = 1
118     endif
119 heimbach 1.1 #endif
120    
121     #ifdef ALLOW_ATM_TEMP
122     c 2-m air temperature
123 heimbach 1.3 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 heimbach 1.23 write(standardmessageunit,'(2A,3(1X,I6),2X,D22.15)')
127 heimbach 1.18 & 'EXF WARNING: atemp + exf_offset_atemp ',
128 heimbach 1.23 & 'out of range for i,j,it= ',
129     & i, j, myiter, atemp(i,j,bi,bj)
130 heimbach 1.3 exferr = 1
131     endif
132 heimbach 1.1 c
133     c 2-m specific humidity
134 heimbach 1.2 if ( (aqh(i,j,bi,bj) .LT. 0. .OR.
135 heimbach 1.3 & aqh(i,j,bi,bj) .GT. 0.1 ) .AND.
136     & hFacC(i,j,1,bi,bj) .NE. 0. ) then
137 heimbach 1.23 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 heimbach 1.3 exferr = 1
141     endif
142 heimbach 1.1 c
143     c precipitation rate
144 heimbach 1.2 if ( (precip(i,j,bi,bj) .LT. 0. .OR.
145 dimitri 1.14 & precip(i,j,bi,bj) .GT. 2.E-6 ) .AND.
146 heimbach 1.3 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
147 heimbach 1.23 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 heimbach 1.3 exferr = 1
151     endif
152 heimbach 1.1 #endif
153    
154     #ifdef SHORTWAVE_HEATING
155     c Short wave radiative flux.
156 dimitri 1.5 if ( (swflux(i,j,bi,bj) .GT. 1. .OR.
157 dimitri 1.16 & swflux(i,j,bi,bj) .LT. -1000. ) .AND.
158 heimbach 1.3 & hFacC(i,j,1,bi,bj) .NE. 0. ) then
159 heimbach 1.23 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 heimbach 1.3 exferr = 1
163     endif
164 heimbach 1.1 #endif
165    
166 heimbach 1.3 #ifdef ALLOW_RUNOFF
167 dimitri 1.4 c Runoff.
168 edhill 1.10 if ( (runoff(i,j,bi,bj) .LT. 0. .OR.
169 heimbach 1.3 & runoff(i,j,bi,bj) .GT. 1.E-6 ) .AND.
170     & hFacC(i,j,1,bi,bj) .NE. 0. ) then
171 heimbach 1.23 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 heimbach 1.18 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 heimbach 1.3 exferr = 1
183     endif
184     #endif
185    
186     if ( exferr .NE. 0 ) then
187 heimbach 1.18 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 heimbach 1.3 STOP 'in S/R exf_check_range'
192     endif
193    
194 heimbach 1.1 enddo
195     enddo
196     c
197     enddo
198     enddo
199    
200     end

  ViewVC Help
Powered by ViewVC 1.1.22