1 |
C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check.F,v 1.11 2008/06/11 18:55:10 gforget Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "EXF_OPTIONS.h" |
5 |
|
6 |
subroutine exf_check( mythid ) |
7 |
|
8 |
c ================================================================== |
9 |
c SUBROUTINE exf_check |
10 |
c ================================================================== |
11 |
c |
12 |
implicit none |
13 |
|
14 |
c == global variables == |
15 |
|
16 |
#include "EEPARAMS.h" |
17 |
#include "SIZE.h" |
18 |
#include "PARAMS.h" |
19 |
c#include "FFIELDS.h" |
20 |
c#include "GRID.h" |
21 |
|
22 |
#include "EXF_PARAM.h" |
23 |
#include "EXF_CONSTANTS.h" |
24 |
c#include "EXF_FIELDS.h" |
25 |
c == routine arguments == |
26 |
|
27 |
c mythid - thread number for this instance of the routine. |
28 |
|
29 |
integer mythid |
30 |
|
31 |
c == local variables == |
32 |
|
33 |
c == end of interface == |
34 |
|
35 |
c check for consistency |
36 |
if (.NOT. |
37 |
& (exf_iprec.EQ.precFloat32 .OR. exf_iprec.EQ.precFloat64) |
38 |
& ) then |
39 |
stop 'S/R EXF_CHECK: value of exf_iprec not allowed' |
40 |
elseif ( exf_yftype.NE.'RL' ) then |
41 |
stop 'S/R EXF_CHECK: value of exf_yftype not allowed' |
42 |
endif |
43 |
|
44 |
if (repeatPeriod.lt.0.) then |
45 |
stop 'S/R EXF_CHECK: repeatPeriod must be positive' |
46 |
endif |
47 |
|
48 |
if (useExfYearlyFields.and.repeatPeriod.ne.0.) then |
49 |
print*,'Use of usefldyearlyfields AND repeatPeriod', |
50 |
& ' not implemented' |
51 |
stop 'ABNORMAL END: S/R EXF_CHECK' |
52 |
endif |
53 |
|
54 |
#if ( defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_WIND) ) |
55 |
IF ( ustressfile .NE. ' ' .OR. ustressfile .NE. ' ' ) THEN |
56 |
STOP |
57 |
& 'S/R EXF_CHECK: use u,v_wind components but not wind-stress' |
58 |
ENDIF |
59 |
#endif |
60 |
|
61 |
#ifndef ALLOW_ATM_WIND |
62 |
IF ( uwindfile .NE. ' ' .OR. vwindfile .NE. ' ' ) THEN |
63 |
STOP |
64 |
& 'S/R EXF_CHECK: read-in wind-stress but not u,v_wind components' |
65 |
ENDIF |
66 |
#endif |
67 |
|
68 |
#ifdef USE_EXF_INTERPOLATION |
69 |
if ( climsst_nlat .GT. MAX_LAT_INC ) |
70 |
& stop 'stopped in exf_readparms: climsst_nlat > MAX_LAT_INC' |
71 |
if ( climsss_nlat .GT. MAX_LAT_INC ) |
72 |
& stop 'stopped in exf_readparms: climsss_nlat > MAX_LAT_INC' |
73 |
if ( usingCartesianGrid ) then |
74 |
print*,'USE_EXF_INTERPOLATION assumes latitude/longitude' |
75 |
print*,'input and output coordinates. Trivial to extend to' |
76 |
print*,'cartesian coordinates, but has not yet been done.' |
77 |
stop |
78 |
endif |
79 |
IF ( readStressOnAgrid.OR.readStressOnCgrid ) THEN |
80 |
STOP 'wind-stress position defined by Long/Lat' |
81 |
ENDIF |
82 |
if ( usingCurvilinearGrid ) then |
83 |
c some restrictions that can be relaxed later on |
84 |
if ( ustressfile .NE. ' ' .and. vstressfile .NE. ' ' ) then |
85 |
if ( ustressstartdate .ne. vstressstartdate .or. |
86 |
& ustressperiod .ne. vstressperiod ) then |
87 |
print*,'For useCubedSphereExchange, S/R exf_set_uv.F' |
88 |
print*,'assumes that the u and v wind stress files' |
89 |
print*,'have the same startdate and period.' |
90 |
stop |
91 |
endif |
92 |
endif |
93 |
if ( uwindfile .NE. ' ' .and. vwindfile .NE. ' ' ) then |
94 |
if ( uwindstartdate .ne. vwindstartdate .or. |
95 |
& uwindperiod .ne. vwindperiod ) then |
96 |
print*,'For useCubedSphereExchange, S/R exf_set_uv.F' |
97 |
print*,'assumes that the u and v wind files' |
98 |
print*,'have the same startdate and period.' |
99 |
stop |
100 |
endif |
101 |
endif |
102 |
endif |
103 |
#else /* ifndef USE_EXF_INTERPOLATION */ |
104 |
IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN |
105 |
IF ( (readStressOnAgrid.AND.readStressOnCgrid) .OR. |
106 |
& .NOT.(readStressOnAgrid.OR.readStressOnCgrid) ) THEN |
107 |
STOP |
108 |
& 'S/R EXF_CHECK: Select 1 wind-stress position: A or C-grid' |
109 |
ENDIF |
110 |
ELSE |
111 |
IF ( readStressOnAgrid .OR. readStressOnCgrid ) THEN |
112 |
STOP 'S/R EXF_CHECK: wind-stress position irrelevant' |
113 |
ENDIF |
114 |
ENDIF |
115 |
#endif /* USE_EXF_INTERPOLATION */ |
116 |
|
117 |
#ifdef ALLOW_CLIMTEMP_RELAXATION |
118 |
STOP 'ALLOW_CLIMTEMP_RELAXATION no longer supported. Use pkg/rbcs' |
119 |
#endif |
120 |
|
121 |
#ifdef ALLOW_CLIMSALT_RELAXATION |
122 |
STOP 'ALLOW_CLIMSALT_RELAXATION no longer supported. Use pkg/rbcs' |
123 |
#endif |
124 |
|
125 |
RETURN |
126 |
END |