1 |
heimbach |
1.1 |
c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_mapfields.F,v 1.8 2003/11/06 22:11:03 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 |
|
|
integer mytime, myiter, mythid |
29 |
|
|
|
30 |
|
|
c == local variables == |
31 |
|
|
|
32 |
|
|
integer bi,bj |
33 |
|
|
integer i,j |
34 |
|
|
integer jtlo |
35 |
|
|
integer jthi |
36 |
|
|
integer itlo |
37 |
|
|
integer ithi |
38 |
|
|
integer jmin |
39 |
|
|
integer jmax |
40 |
|
|
integer imin |
41 |
|
|
integer imax |
42 |
|
|
|
43 |
|
|
c == end of interface == |
44 |
|
|
|
45 |
|
|
jtlo = mybylo(mythid) |
46 |
|
|
jthi = mybyhi(mythid) |
47 |
|
|
itlo = mybxlo(mythid) |
48 |
|
|
ithi = mybxhi(mythid) |
49 |
|
|
jmin = 1-oly |
50 |
|
|
jmax = sny+oly |
51 |
|
|
imin = 1-olx |
52 |
|
|
imax = snx+olx |
53 |
|
|
|
54 |
|
|
do bj = jtlo,jthi |
55 |
|
|
do bi = itlo,ithi |
56 |
|
|
|
57 |
|
|
do j = jmin,jmax |
58 |
|
|
do i = imin,imax |
59 |
|
|
c |
60 |
|
|
c Heat flux. |
61 |
|
|
if ( ABS(hflux(i,j,bi,bj)) .GT. 1000. ) |
62 |
|
|
& print *, 'EXF WARNING: hflux out of range for i,j= ', |
63 |
|
|
& hflux(i,j,bi,bj) |
64 |
|
|
c |
65 |
|
|
c Salt flux. |
66 |
|
|
if ( ABS(sflux(i,j,bi,bj)) .GT. 1.E-6 ) |
67 |
|
|
& print *, 'EXF WARNING: sflux out of range for i,j= ', |
68 |
|
|
& sflux(i,j,bi,bj) |
69 |
|
|
c |
70 |
|
|
c Zonal wind stress. |
71 |
|
|
if ( ABS(ustress(i,j,bi,bj)) .GT. 2. ) |
72 |
|
|
& print *, 'EXF WARNING: ustress out of range for i,j= ', |
73 |
|
|
& ustress(i,j,bi,bj) |
74 |
|
|
c |
75 |
|
|
c Meridional wind stress. |
76 |
|
|
if ( ABS(vstress(i,j,bi,bj)) .GT. 2. ) |
77 |
|
|
& print *, 'EXF WARNING: vstress out of range for i,j= ', |
78 |
|
|
& vstress(i,j,bi,bj) |
79 |
|
|
c |
80 |
|
|
#ifdef ALLOW_ATM_WIND |
81 |
|
|
c zonal wind speed |
82 |
|
|
if ( ABS(uwind(i,j,bi,bj)) .GT. 40. ) |
83 |
|
|
& print *, 'EXF WARNING: uwind out of range for i,j= ', |
84 |
|
|
& uwind(i,j,bi,bj) |
85 |
|
|
c |
86 |
|
|
c zonal wind speed |
87 |
|
|
if ( ABS(vwind(i,j,bi,bj)) .GT. 40. ) |
88 |
|
|
& print *, 'EXF WARNING: vwind out of range for i,j= ', |
89 |
|
|
& vwind(i,j,bi,bj) |
90 |
|
|
#endif |
91 |
|
|
|
92 |
|
|
#ifdef ALLOW_ATM_TEMP |
93 |
|
|
c 2-m air temperature |
94 |
|
|
if ( atemp(i,j,bi,bj) .LT. 223 .OR. |
95 |
|
|
& atemp(i,j,bi,bj) .GT. 323 ) |
96 |
|
|
& print *, 'EXF WARNING: atemp out of range for i,j= ', |
97 |
|
|
& atemp(i,j,bi,bj) |
98 |
|
|
c |
99 |
|
|
c 2-m specific humidity |
100 |
|
|
if ( aqh(i,j,bi,bj) .LT. 0. .OR. |
101 |
|
|
& aqh(i,j,bi,bj) .GT. 1.E-6 ) |
102 |
|
|
& print *, 'EXF WARNING: aqh out of range for i,j= ', |
103 |
|
|
& aqh(i,j,bi,bj) |
104 |
|
|
c |
105 |
|
|
c precipitation rate |
106 |
|
|
if ( precip(i,j,bi,bj) .LT. 0. .OR. |
107 |
|
|
& precip(i,j,bi,bj) .GT. 0.1 ) |
108 |
|
|
& print *, 'EXF WARNING: precip out of range for i,j= ', |
109 |
|
|
& precip(i,j,bi,bj) |
110 |
|
|
#endif |
111 |
|
|
|
112 |
|
|
#ifdef SHORTWAVE_HEATING |
113 |
|
|
c Short wave radiative flux. |
114 |
|
|
if ( swflux(i,j,bi,bj) .GT. 0. .OR. |
115 |
|
|
& swflux(i,j,bi,bj) .LT. -500. ) |
116 |
|
|
& print *, 'EXF WARNING: swflux out of range for i,j= ', |
117 |
|
|
& swflux(i,j,bi,bj) |
118 |
|
|
#endif |
119 |
|
|
|
120 |
|
|
enddo |
121 |
|
|
enddo |
122 |
|
|
c |
123 |
|
|
enddo |
124 |
|
|
enddo |
125 |
|
|
|
126 |
|
|
end |