/[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.8 - (hide annotations) (download)
Fri Jan 25 11:23:06 2008 UTC (16 years, 4 months ago) by dimitri
Branch: MAIN
Changes since 1.7: +31 -22 lines
o pkg/exf: rewrite of exf_getffieldrec.F to properly deal with year
  transitions for useExfYearlyFields

1 dimitri 1.8 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_check.F,v 1.7 2007/06/27 21:38:09 heimbach 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     IF ( ustressfile .NE. ' ' .OR. ustressfile .NE. ' ' ) THEN
59     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     if ( uvecfile .NE. ' ' .and. vvecfile .NE. ' ' ) then
87     c some restrictions that can be relaxed later on
88     if ( uvecstartdate .ne. vvecstartdate .or.
89     & uvecperiod .ne. vvecperiod ) then
90     print*,'For useCubedSphereExchange, S/R exf_set_uv.F'
91     print*,'assumes that the u and v wind or wind stress'
92     print*,'files have the same startdate and period.'
93     stop
94     endif
95     endif
96     endif
97     #else /* ifndef USE_EXF_INTERPOLATION */
98 heimbach 1.7 IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN
99 jmc 1.6 IF ( (readStressOnAgrid.AND.readStressOnCgrid) .OR.
100     & .NOT.(readStressOnAgrid.OR.readStressOnCgrid) ) THEN
101     STOP
102     & 'S/R EXF_CHECK: Select 1 wind-stress position: A or C-grid'
103     ENDIF
104     ELSE
105     IF ( readStressOnAgrid .OR. readStressOnCgrid ) THEN
106     STOP 'S/R EXF_CHECK: wind-stress position irrelevant'
107     ENDIF
108     ENDIF
109 dimitri 1.8 #endif /* USE_EXF_INTERPOLATION */
110 dimitri 1.3
111 heimbach 1.2 #ifdef ALLOW_CLIMTEMP_RELAXATION
112     STOP 'ALLOW_CLIMTEMP_RELAXATION no longer supported. Use pkg/rbcs'
113     #endif
114 heimbach 1.1
115 heimbach 1.2 #ifdef ALLOW_CLIMSALT_RELAXATION
116     STOP 'ALLOW_CLIMSALT_RELAXATION no longer supported. Use pkg/rbcs'
117     #endif
118    
119 jmc 1.6 RETURN
120     END

  ViewVC Help
Powered by ViewVC 1.1.22