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

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

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

revision 1.18 by heimbach, Fri Feb 11 17:24:41 2005 UTC revision 1.25 by mlosch, Thu Jun 29 15:41:58 2006 UTC
# Line 56  c     == end of interface == Line 56  c     == end of interface ==
56        imax = snx+olx        imax = snx+olx
57    
58        do bj = jtlo,jthi        do bj = jtlo,jthi
59          do bi = itlo,ithi         do bi = itlo,ithi
60    
61            do j = jmin,jmax          do j = jmin,jmax
62              do i = imin,imax           do i = imin,imax
63  c  c
64  c             Heat flux.  c     Heat flux.
65                if ( ( hflux(i,j,bi,bj) .GT. 1600. .OR.            if ( ( hflux(i,j,bi,bj) .GT. 1600. .OR.
66       &               hflux(i,j,bi,bj) .LT. -500. ) .AND.       &         hflux(i,j,bi,bj) .LT. -500. ) .AND.
67       &              hFacC(i,j,1,bi,bj) .NE. 0. ) then       &         maskC(i,j,1,bi,bj) .NE. 0. ) then
68                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
69       &                'EXF WARNING: hflux out of range for i,j= ',       &          'EXF WARNING: hflux out of range for bi,bj,i,j,it= ',
70       &                i, j, hflux(i,j,bi,bj)       &          bi, bj, i, j, myiter, hflux(i,j,bi,bj)
71                   exferr = 1             exferr = 1
72                endif            endif
73  c  c
74  c             Salt flux.  c     Salt flux.
75                if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND.            if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 .AND.
76       &             hFacC(i,j,1,bi,bj) .NE. 0. ) then       &         maskC(i,j,1,bi,bj) .NE. 0. ) then
77                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
78       &                'EXF WARNING: sflux out of range for i,j= ',       &          'EXF WARNING: sflux out of range for bi,bj,i,j,it= ',
79       &                i, j, sflux(i,j,bi,bj)       &          bi, bj, i, j, myiter, sflux(i,j,bi,bj)
80                   exferr = 1             exferr = 1
81                endif            endif
82  c  c
83  c             Zonal wind stress.  c     Zonal wind stress.
84                if ( ABS(ustress(i,j,bi,bj)) .GT. 2.5 .AND.            if ( ABS(ustress(i,j,bi,bj)) .GT. 2.7 .AND.
85       &             hFacW(i,j,1,bi,bj) .NE. 0. ) then       &         maskW(i,j,1,bi,bj) .NE. 0. ) then
86                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
87       &                'EXF WARNING: ustress out of range for i,j= ',       &          'EXF WARNING: ustress out of range for bi,bj,i,j,it= ',
88       &                i, j, ustress(i,j,bi,bj)       &          bi, bj, i, j, myiter, ustress(i,j,bi,bj)
89                   exferr = 1             exferr = 1
90                endif            endif
91  c  c
92  c             Meridional wind stress.  c     Meridional wind stress.
93                if ( ABS(vstress(i,j,bi,bj)) .GT. 2.2 .AND.            if ( ABS(vstress(i,j,bi,bj)) .GT. 2.3 .AND.
94       &             hFacS(i,j,1,bi,bj) .NE. 0. ) then       &         maskS(i,j,1,bi,bj) .NE. 0. ) then
95                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
96       &                'EXF WARNING: vstress out of range for i,j= ',       &          'EXF WARNING: vstress out of range for bi,bj,i,j,it= ',
97       &                i, j, vstress(i,j,bi,bj)       &          bi, bj, i, j, myiter, vstress(i,j,bi,bj)
98                   exferr = 1             exferr = 1
99                endif            endif
100  c  c
101  #ifdef ALLOW_ATM_WIND  #ifdef ALLOW_ATM_WIND
102  c             zonal wind speed  c     zonal wind speed
103                if ( ABS(uwind(i,j,bi,bj)) .GT. 100. .AND.            if ( ABS(uwind(i,j,bi,bj)) .GT. 100. .AND.
104       &             hFacW(i,j,1,bi,bj) .NE. 0. ) then       &         maskW(i,j,1,bi,bj) .NE. 0. ) then
105                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
106       &                'EXF WARNING: uwind out of range for i,j= ',       &          'EXF WARNING: uwind out of range for bi,bj,i,j,it= ',
107       &                i, j, uwind(i,j,bi,bj)       &          bi, bj, i, j, myiter, uwind(i,j,bi,bj)
108                   exferr = 1             exferr = 1
109                endif            endif
110  c  c
111  c             zonal wind speed  c     zonal wind speed
112                if ( ABS(vwind(i,j,bi,bj)) .GT. 100. .AND.            if ( ABS(vwind(i,j,bi,bj)) .GT. 100. .AND.
113       &             hFacS(i,j,1,bi,bj) .NE. 0. ) then       &         maskS(i,j,1,bi,bj) .NE. 0. ) then
114                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
115       &                'EXF WARNING: vwind out of range for i,j= ',       &          'EXF WARNING: vwind out of range for bi,bj,i,j,it= ',
116       &                i, j, vwind(i,j,bi,bj)       &          bi, bj, i, j, myiter, vwind(i,j,bi,bj)
117                   exferr = 1             exferr = 1
118                endif            endif
119  #endif  #endif
120    c
121    c     wind speed modulus
122              if ( ( wspeed(i,j,bi,bj) .LT. 0. .OR.
123         &         wspeed(i,j,bi,bj) .GT. 100. ) .AND.
124         &         maskS(i,j,1,bi,bj) .NE. 0. ) then
125               write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
126         &          'EXF WARNING: wspeed out of range for bi,bj,i,j,it= ',
127         &          bi, bj, i, j, myiter, wspeed(i,j,bi,bj)
128               exferr = 1
129              endif
130              
131  #ifdef ALLOW_ATM_TEMP  #ifdef ALLOW_ATM_TEMP
132  c             2-m air temperature  c     2-m air temperature
133                if ( (atemp(i,j,bi,bj) .LT. 183 .OR.            if ( (atemp(i,j,bi,bj) .LT. 183 .OR.
134       &             atemp(i,j,bi,bj) .GT. 343 ) .AND.       &         atemp(i,j,bi,bj) .GT. 343 ) .AND.
135       &             hFacC(i,j,1,bi,bj) .NE. 0. ) then       &         maskC(i,j,1,bi,bj) .NE. 0. ) then
136                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(2A,5(1X,I6),2X,D22.15)')
137       &                'EXF WARNING: atemp + exf_offset_atemp ',       &          'EXF WARNING: atemp + exf_offset_atemp ',
138       &                'out of range for i,j= ',       &          'out of range for bi,bj,i,j,it= ',
139       &                i, j, atemp(i,j,bi,bj)       &          bi, bj, i, j, myiter, atemp(i,j,bi,bj)
140                   exferr = 1             exferr = 1
141                endif            endif
142  c  c
143  c             2-m specific humidity  c     2-m specific humidity
144                if ( (aqh(i,j,bi,bj) .LT. 0. .OR.            if ( (aqh(i,j,bi,bj) .LT. 0. .OR.
145       &             aqh(i,j,bi,bj) .GT. 0.1 ) .AND.       &         aqh(i,j,bi,bj) .GT. 0.1 ) .AND.
146       &             hFacC(i,j,1,bi,bj) .NE. 0. ) then       &         maskC(i,j,1,bi,bj) .NE. 0. ) then
147                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
148       &                'EXF WARNING: aqh out of range for i,j= ',       &          'EXF WARNING: aqh out of range for bi,bj,i,j,it= ',
149       &                i, j, aqh(i,j,bi,bj)       &          bi, bj, i, j, myiter, aqh(i,j,bi,bj)
150                   exferr = 1             exferr = 1
151                endif            endif
152  c  c    
153  c             precipitation rate  c     precipitation rate
154                if ( (precip(i,j,bi,bj) .LT. 0. .OR.            if ( (precip(i,j,bi,bj) .LT. 0. .OR.
155       &             precip(i,j,bi,bj) .GT. 2.E-6 ) .AND.       &         precip(i,j,bi,bj) .GT. 2.E-6 ) .AND.
156       &             hFacC(i,j,1,bi,bj) .NE. 0. ) then       &         maskC(i,j,1,bi,bj) .NE. 0. ) then
157                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
158       &                'EXF WARNING: precip out of range for i,j= ',       &          'EXF WARNING: precip out of range for bi,bj,i,j,it= ',
159       &                i, j, precip(i,j,bi,bj)       &          bi, bj, i, j, myiter, precip(i,j,bi,bj)
160                   exferr = 1             exferr = 1
161                endif            endif
162    c    
163    c     snow
164              if ( (snowprecip(i,j,bi,bj) .LT. 0. .OR.
165         &         snowprecip(i,j,bi,bj) .GT. 2.E-6 ) .AND.
166         &         maskC(i,j,1,bi,bj) .NE. 0. ) then
167               write(standardmessageunit,'(2A,5(1X,I6),2X,D22.15)')
168         &          'EXF WARNING: snowprecip out of range ',
169         &          'for bi,bj,i,j,it= ',
170         &          bi, bj, i, j, myiter, snowprecip(i,j,bi,bj)
171               exferr = 1
172              endif
173  #endif  #endif
174    
175  #ifdef SHORTWAVE_HEATING  #ifdef SHORTWAVE_HEATING
176  c             Short wave radiative flux.  c     Short wave radiative flux.
177                if ( (swflux(i,j,bi,bj) .GT. 1. .OR.            if ( (swflux(i,j,bi,bj) .GT. 1. .OR.
178       &             swflux(i,j,bi,bj) .LT. -1000. ) .AND.       &         swflux(i,j,bi,bj) .LT. -1000. ) .AND.
179       &             hFacC(i,j,1,bi,bj) .NE. 0. ) then       &         maskC(i,j,1,bi,bj) .NE. 0. ) then
180                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
181       &                'EXF WARNING: swflux out of range for i,j= ',       &          'EXF WARNING: swflux out of range for bi,bj,i,j,it= ',
182       &                i, j, swflux(i,j,bi,bj)       &          bi, bj, i, j, myiter, swflux(i,j,bi,bj)
183                   exferr = 1             exferr = 1
184                endif            endif
185  #endif  #endif
186    
187  #ifdef ALLOW_RUNOFF  #ifdef ALLOW_RUNOFF
188  c             Runoff.  c     Runoff.
189                if ( (runoff(i,j,bi,bj) .LT. 0. .OR.            if ( (runoff(i,j,bi,bj) .LT. 0. .OR.
190       &             runoff(i,j,bi,bj) .GT. 1.E-6 ) .AND.       &         runoff(i,j,bi,bj) .GT. 1.E-6 ) .AND.
191       &             hFacC(i,j,1,bi,bj) .NE. 0. ) then       &         maskC(i,j,1,bi,bj) .NE. 0. ) then
192                   write(standardmessageunit,'(A,2(2X,I5),2X,D22.15)')             write(standardmessageunit,'(A,5(1X,I6),2X,D22.15)')
193       &                'EXF WARNING: runoff out of range for i,j= ',       &          'EXF WARNING: runoff out of range for bi,bj,i,j,it= ',
194       &                i, j, runoff(i,j,bi,bj)       &          bi, bj, i, j, myiter, runoff(i,j,bi,bj)
195                   write(standardmessageunit,'(A)')             write(standardmessageunit,'(A)')
196       &                'Please note that input units for runoff are'       &          'Please note that input units for runoff are'
197                   write(standardmessageunit,'(A)')             write(standardmessageunit,'(A)')
198       &                'm/s not m/yr.  If input file is in m/yr, set'       &          'm/s not m/yr.  If input file is in m/yr, set'
199                   write(standardmessageunit,'(A)')             write(standardmessageunit,'(A)')
200       &                'exf_inscal_runoff=3.170979198E-8'       &          'exf_inscal_runoff=3.170979198E-8'
201                   write(standardmessageunit,'(A)')             write(standardmessageunit,'(A)')
202       &                'in the data.exf input file.'       &          'in the data.exf input file.'
203                   exferr = 1             exferr = 1
204                endif            endif
205  #endif  #endif
206             enddo
               if ( exferr .NE. 0 ) then  
                write(standardmessageunit,'(A)')  
      &                'EXF WARNING: If you think these values are OK '  
                write(standardmessageunit,'(A)')  
      &                'EXF WARNING: then set useExfCheckRange=.FALSE.'  
                STOP 'in S/R exf_check_range'  
               endif  
   
             enddo  
           enddo  
 c  
207          enddo          enddo
208    c    
209           enddo
210        enddo        enddo
211    
212          if ( exferr .NE. 0 ) then
213           write(standardmessageunit,'(A)')
214         &      'EXF WARNING: If you think these values are OK '
215           write(standardmessageunit,'(A)')
216         &      'EXF WARNING: then set useExfCheckRange=.FALSE.'
217           STOP 'in S/R exf_check_range'
218          endif
219    
220        end        end

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.22