/[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.9 - (hide annotations) (download)
Thu Dec 2 23:39:09 2004 UTC (19 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint56c_post
Changes since 1.8: +3 -2 lines
declare myTime as _RL instead of integer

1 jmc 1.9 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check_range.F,v 1.8 2004/12/02 20:50:58 dimitri 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 heimbach 1.2 if ( ABS(hflux(i,j,bi,bj)) .GT. 1000. .AND.
66 heimbach 1.3 & 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 heimbach 1.1 c
72     c Salt flux.
73 heimbach 1.2 if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND.
74 heimbach 1.3 & 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 heimbach 1.1 c
80     c Zonal wind stress.
81 dimitri 1.8 if ( ABS(ustress(i,j,bi,bj)) .GT. 2.5 .AND.
82 heimbach 1.3 & 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 heimbach 1.1 c
88     c Meridional wind stress.
89 heimbach 1.2 if ( ABS(vstress(i,j,bi,bj)) .GT. 2. .AND.
90 heimbach 1.3 & 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 heimbach 1.1 c
96     #ifdef ALLOW_ATM_WIND
97     c zonal wind speed
98 heimbach 1.3 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 heimbach 1.1 c
105     c zonal wind speed
106 heimbach 1.3 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 heimbach 1.1 #endif
113    
114     #ifdef ALLOW_ATM_TEMP
115     c 2-m air temperature
116 heimbach 1.3 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 heimbach 1.1 c
125     c 2-m specific humidity
126 heimbach 1.2 if ( (aqh(i,j,bi,bj) .LT. 0. .OR.
127 heimbach 1.3 & 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 heimbach 1.1 c
134     c precipitation rate
135 heimbach 1.2 if ( (precip(i,j,bi,bj) .LT. 0. .OR.
136 heimbach 1.3 & 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 heimbach 1.1 #endif
143    
144     #ifdef SHORTWAVE_HEATING
145     c Short wave radiative flux.
146 dimitri 1.5 if ( (swflux(i,j,bi,bj) .GT. 1. .OR.
147 heimbach 1.3 & 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 heimbach 1.1 #endif
154    
155 heimbach 1.3 #ifdef ALLOW_RUNOFF
156 dimitri 1.4 c Runoff.
157 dimitri 1.8 if ( (runoff(i,j,bi,bj) .LT. -5.E-8 .OR.
158 heimbach 1.3 & 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 dimitri 1.4 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 dimitri 1.7 print *, 'exf_inscal_runoff=3.171e-8'
165 dimitri 1.4 print *, 'in the data.exf input file.'
166 heimbach 1.3 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 heimbach 1.1 enddo
177     enddo
178     c
179     enddo
180     enddo
181    
182     end

  ViewVC Help
Powered by ViewVC 1.1.22