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

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

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


Revision 1.10 - (hide 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 mlosch 1.10 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check.F,v 1.9 2008/01/25 11:49:48 dimitri Exp $
2 jmc 1.4 C $Name: $
3 heimbach 1.1
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 jmc 1.6 c#include "FFIELDS.h"
20     c#include "GRID.h"
21 heimbach 1.1
22 jmc 1.4 #include "EXF_PARAM.h"
23     #include "EXF_CONSTANTS.h"
24 jmc 1.6 c#include "EXF_FIELDS.h"
25 heimbach 1.1 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 dimitri 1.8 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 heimbach 1.1
51 dimitri 1.8 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 heimbach 1.1 endif
56    
57 jmc 1.6 #if ( defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_WIND) )
58 mlosch 1.10 IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN
59 jmc 1.6 STOP
60     & 'S/R EXF_CHECK: use u,v_wind components but not wind-stress'
61     ENDIF
62     #endif
63 dimitri 1.8
64 jmc 1.6 #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 dimitri 1.3 #ifdef USE_EXF_INTERPOLATION
72 jmc 1.6 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 dimitri 1.3 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 jmc 1.6 IF ( readStressOnAgrid.OR.readStressOnCgrid ) THEN
83     STOP 'wind-stress position defined by Long/Lat'
84     ENDIF
85 dimitri 1.8 if ( usingCurvilinearGrid ) then
86     c some restrictions that can be relaxed later on
87 dimitri 1.9 if ( ustressfile .NE. ' ' .and. vstressfile .NE. ' ' ) then
88     if ( ustressstartdate .ne. vstressstartdate .or.
89     & ustressperiod .ne. vstressperiod ) then
90 dimitri 1.8 print*,'For useCubedSphereExchange, S/R exf_set_uv.F'
91 dimitri 1.9 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 dimitri 1.8 stop
103     endif
104     endif
105     endif
106     #else /* ifndef USE_EXF_INTERPOLATION */
107 heimbach 1.7 IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN
108 jmc 1.6 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 dimitri 1.8 #endif /* USE_EXF_INTERPOLATION */
119 dimitri 1.3
120 heimbach 1.2 #ifdef ALLOW_CLIMTEMP_RELAXATION
121     STOP 'ALLOW_CLIMTEMP_RELAXATION no longer supported. Use pkg/rbcs'
122     #endif
123 heimbach 1.1
124 heimbach 1.2 #ifdef ALLOW_CLIMSALT_RELAXATION
125     STOP 'ALLOW_CLIMSALT_RELAXATION no longer supported. Use pkg/rbcs'
126     #endif
127    
128 jmc 1.6 RETURN
129     END

  ViewVC Help
Powered by ViewVC 1.1.22