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

Contents of /MITgcm/pkg/exf/exf_check.F

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


Revision 1.10 - (show annotations) (download)
Tue Jun 10 09:36:34 2008 UTC (16 years ago) by mlosch
Branch: MAIN
Changes since 1.9: +2 -2 lines
fix small bug in error check, as reported by Wentao Liu

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check.F,v 1.9 2008/01/25 11:49:48 dimitri 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. 32 .OR. exf_iprec .EQ. 64)
38 & ) then
39 stop 'S/R EXF_CHECK: value of exf_iprec not allowed'
40 elseif (.NOT.
41 & (exf_yftype .EQ. 'RS' .OR.
42 & exf_yftype .EQ. 'RL')
43 & ) then
44 stop 'S/R EXF_CHECK: value of exf_yftype not allowed'
45 endif
46
47 if (repeatPeriod.lt.0.) then
48 stop 'S/R EXF_CHECK: repeatPeriod must be positive'
49 endif
50
51 if (useExfYearlyFields.and.repeatPeriod.ne.0.) then
52 print*,'Use of usefldyearlyfields AND repeatPeriod',
53 & ' not implemented'
54 stop 'ABNORMAL END: S/R EXF_CHECK'
55 endif
56
57 #if ( defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_WIND) )
58 IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN
59 STOP
60 & 'S/R EXF_CHECK: use u,v_wind components but not wind-stress'
61 ENDIF
62 #endif
63
64 #ifndef ALLOW_ATM_WIND
65 IF ( uwindfile .NE. ' ' .OR. vwindfile .NE. ' ' ) THEN
66 STOP
67 & 'S/R EXF_CHECK: read-in wind-stress but not u,v_wind components'
68 ENDIF
69 #endif
70
71 #ifdef USE_EXF_INTERPOLATION
72 if ( climsst_nlat .GT. MAX_LAT_INC )
73 & stop 'stopped in exf_readparms: climsst_nlat > MAX_LAT_INC'
74 if ( climsss_nlat .GT. MAX_LAT_INC )
75 & stop 'stopped in exf_readparms: climsss_nlat > MAX_LAT_INC'
76 if ( usingCartesianGrid ) then
77 print*,'USE_EXF_INTERPOLATION assumes latitude/longitude'
78 print*,'input and output coordinates. Trivial to extend to'
79 print*,'cartesian coordinates, but has not yet been done.'
80 stop
81 endif
82 IF ( readStressOnAgrid.OR.readStressOnCgrid ) THEN
83 STOP 'wind-stress position defined by Long/Lat'
84 ENDIF
85 if ( usingCurvilinearGrid ) then
86 c some restrictions that can be relaxed later on
87 if ( ustressfile .NE. ' ' .and. vstressfile .NE. ' ' ) then
88 if ( ustressstartdate .ne. vstressstartdate .or.
89 & ustressperiod .ne. vstressperiod ) then
90 print*,'For useCubedSphereExchange, S/R exf_set_uv.F'
91 print*,'assumes that the u and v wind stress files'
92 print*,'have the same startdate and period.'
93 stop
94 endif
95 endif
96 if ( uwindfile .NE. ' ' .and. vwindfile .NE. ' ' ) then
97 if ( uwindstartdate .ne. vwindstartdate .or.
98 & uwindperiod .ne. vwindperiod ) then
99 print*,'For useCubedSphereExchange, S/R exf_set_uv.F'
100 print*,'assumes that the u and v wind files'
101 print*,'have the same startdate and period.'
102 stop
103 endif
104 endif
105 endif
106 #else /* ifndef USE_EXF_INTERPOLATION */
107 IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN
108 IF ( (readStressOnAgrid.AND.readStressOnCgrid) .OR.
109 & .NOT.(readStressOnAgrid.OR.readStressOnCgrid) ) THEN
110 STOP
111 & 'S/R EXF_CHECK: Select 1 wind-stress position: A or C-grid'
112 ENDIF
113 ELSE
114 IF ( readStressOnAgrid .OR. readStressOnCgrid ) THEN
115 STOP 'S/R EXF_CHECK: wind-stress position irrelevant'
116 ENDIF
117 ENDIF
118 #endif /* USE_EXF_INTERPOLATION */
119
120 #ifdef ALLOW_CLIMTEMP_RELAXATION
121 STOP 'ALLOW_CLIMTEMP_RELAXATION no longer supported. Use pkg/rbcs'
122 #endif
123
124 #ifdef ALLOW_CLIMSALT_RELAXATION
125 STOP 'ALLOW_CLIMSALT_RELAXATION no longer supported. Use pkg/rbcs'
126 #endif
127
128 RETURN
129 END

  ViewVC Help
Powered by ViewVC 1.1.22