69 |
#endif |
#endif |
70 |
|
|
71 |
#ifndef ALLOW_ZENITHANGLE |
#ifndef ALLOW_ZENITHANGLE |
72 |
IF ( useExfZenAlbedo .OR. useExfZenIncoming .OR. |
IF ( useExfZenAlbedo .OR. useExfZenIncoming .OR. |
73 |
& select_ZenAlbedo .NE. 0 ) THEN |
& select_ZenAlbedo .NE. 0 ) THEN |
74 |
WRITE(msgBuf,'(A,A)') 'S/R EXF_CHECK: unsupported option', |
WRITE(msgBuf,'(A,A)') 'EXF_CHECK: unsupported option', |
75 |
& ' when ALLOW_ZENITHANGLE is not defined' |
& ' when ALLOW_ZENITHANGLE is not defined' |
76 |
CALL PRINT_ERROR( msgBuf , mythid) |
CALL PRINT_ERROR( msgBuf , mythid) |
77 |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
80 |
|
|
81 |
#ifdef ALLOW_ZENITHANGLE |
#ifdef ALLOW_ZENITHANGLE |
82 |
IF ( usingCartesianGrid .OR. usingCylindricalGrid ) then |
IF ( usingCartesianGrid .OR. usingCylindricalGrid ) then |
83 |
WRITE(msgBuf,'(A,A)') 'S/R EXF_CHECK: ALLOW_ZENITHANGLE does ', |
WRITE(msgBuf,'(A,A)') 'EXF_CHECK: ALLOW_ZENITHANGLE does ', |
84 |
& 'not work for carthesian and cylindrical grids' |
& 'not work for carthesian and cylindrical grids' |
85 |
CALL PRINT_ERROR( msgBuf , mythid) |
CALL PRINT_ERROR( msgBuf , mythid) |
86 |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
87 |
ENDIF |
ENDIF |
88 |
IF ( select_ZenAlbedo.LT.0 .OR. select_ZenAlbedo.GT.3 ) then |
IF ( select_ZenAlbedo.LT.0 .OR. select_ZenAlbedo.GT.3 ) then |
89 |
WRITE(msgBuf,'(A,A)') 'S/R EXF_CHECK: unsupported ', |
WRITE(msgBuf,'(A,A)') 'EXF_CHECK: unsupported ', |
90 |
& 'select_ZenAlbedo choice' |
& 'select_ZenAlbedo choice' |
91 |
CALL PRINT_ERROR( msgBuf , mythid) |
CALL PRINT_ERROR( msgBuf , mythid) |
92 |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
93 |
ENDIF |
ENDIF |
94 |
IF ( select_ZenAlbedo.EQ.2 .) then |
IF ( select_ZenAlbedo.EQ.2 .) then |
95 |
write(standardmessageunit,'(A,A)') |
write(standardmessageunit,'(A,A)') |
96 |
& 'EXF WARNING: for daily mean albedo, it is advised ', |
& 'EXF WARNING: for daily mean albedo, it is advised ', |
97 |
& 'to use select_ZenAlbedo.EQ.1 instead of 2' |
& 'to use select_ZenAlbedo.EQ.1 instead of 2' |
98 |
ENDIF |
ENDIF |
99 |
IF ( select_ZenAlbedo.GT.2 .AND. swdownperiod.GT. 21600 ) then |
IF ( select_ZenAlbedo.GT.2 .AND. swdownperiod.GT. 21600 ) then |
100 |
WRITE(msgBuf,'(A,A)') 'S/R EXF_CHECK: using diurnal albedo ', |
WRITE(msgBuf,'(A,A)') 'EXF_CHECK: using diurnal albedo ', |
101 |
& 'formula requires diurnal downward shortwave forcing' |
& 'formula requires diurnal downward shortwave forcing' |
102 |
CALL PRINT_ERROR( msgBuf , mythid) |
CALL PRINT_ERROR( msgBuf , mythid) |
103 |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
STOP 'ABNORMAL END: S/R EXF_CHECK' |
104 |
ENDIF |
ENDIF |
105 |
IF ( select_ZenAlbedo.GT.2 .AND. swdownperiod.GT. 3600 ) then |
IF ( select_ZenAlbedo.GT.2 .AND. swdownperiod.GT. 3600 ) then |
106 |
write(standardmessageunit,'(A,A)') |
write(standardmessageunit,'(A,A)') |
107 |
& 'EXF WARNING: the diurnal albedo formula is likely not safe ', |
& 'EXF WARNING: the diurnal albedo formula is likely not safe ', |
108 |
& 'for such coarse temporal resolution downward shortwave forcing' |
& 'for such coarse temporal resolution downward shortwave forcing' |
109 |
ENDIF |
ENDIF |
110 |
#endif |
#endif |
111 |
|
|
|
|
|
112 |
#ifdef USE_EXF_INTERPOLATION |
#ifdef USE_EXF_INTERPOLATION |
113 |
if ( climsst_nlat .GT. MAX_LAT_INC ) |
if ( climsst_nlat .GT. MAX_LAT_INC ) |
114 |
& stop 'stopped in exf_readparms: climsst_nlat > MAX_LAT_INC' |
& stop 'stopped in exf_readparms: climsst_nlat > MAX_LAT_INC' |
120 |
print*,'cartesian coordinates, but has not yet been done.' |
print*,'cartesian coordinates, but has not yet been done.' |
121 |
stop |
stop |
122 |
endif |
endif |
123 |
IF ( readStressOnAgrid.OR.readStressOnCgrid ) THEN |
C- some restrictions on 2-component vector field (might be relaxed later on) |
124 |
STOP 'wind-stress position defined by Long/Lat' |
IF ( ( uwind_interpMethod.GE.1 .AND. uwindfile.NE.' ' ) .OR. |
125 |
|
& ( vwind_interpMethod.GE.1 .AND. vwindfile.NE.' ' ) ) THEN |
126 |
|
IF ( usingCurvilinearGrid .OR. rotateGrid ) THEN |
127 |
|
IF ( uwind_interpMethod.EQ.0 .OR. uwindfile.EQ.' ' .OR. |
128 |
|
& vwind_interpMethod.EQ.0 .OR. vwindfile.EQ.' ' ) THEN |
129 |
|
C- stop if one expects interp+rotation (Curvilin-G) which will not happen |
130 |
|
STOP 'interp. needs 2 components (wind)' |
131 |
|
ENDIF |
132 |
|
IF ( uwindstartdate .NE. vwindstartdate .OR. |
133 |
|
& uwindperiod .NE. vwindperiod ) THEN |
134 |
|
print*,'For CurvilinearGrid/RotatedGrid, S/R EXF_SET_UV' |
135 |
|
print*,'assumes that the u and v wind files' |
136 |
|
print*,'have the same startdate and period.' |
137 |
|
stop |
138 |
|
ENDIF |
139 |
|
ENDIF |
140 |
|
ENDIF |
141 |
|
IF ( (ustress_interpMethod.GE.1 .AND. ustressfile.NE.' ') .OR. |
142 |
|
& (vstress_interpMethod.GE.1 .AND. vstressfile.NE.' ') ) THEN |
143 |
|
IF ( readStressOnCgrid ) THEN |
144 |
|
STOP 'readStressOnCgrid and interp wind-stress (=A-grid)' |
145 |
|
ENDIF |
146 |
|
IF ( usingCurvilinearGrid .OR. rotateGrid ) THEN |
147 |
|
IF ( ustress_interpMethod.EQ.0 .OR. ustressfile.EQ.' ' .OR. |
148 |
|
& vstress_interpMethod.EQ.0 .OR. vstressfile.EQ.' ' ) THEN |
149 |
|
C- stop if one expects interp+rotation (Curvilin-G) which will not happen |
150 |
|
STOP 'interp. needs 2 components (wind-stress)' |
151 |
|
ENDIF |
152 |
|
IF ( ustressstartdate .NE. vstressstartdate .OR. |
153 |
|
& ustressperiod .NE. vstressperiod ) THEN |
154 |
|
print*,'For CurvilinearGrid/RotatedGrid, S/R EXF_SET_UV' |
155 |
|
print*,'assumes that the u and v wind stress files' |
156 |
|
print*,'have the same startdate and period.' |
157 |
|
stop |
158 |
|
ENDIF |
159 |
|
ENDIF |
160 |
ENDIF |
ENDIF |
161 |
if ( usingCurvilinearGrid ) then |
|
162 |
c some restrictions that can be relaxed later on |
IF ( (ustress_interpMethod.EQ.0 .AND. ustressfile.NE.' ') .OR. |
163 |
if ( ustressfile .NE. ' ' .and. vstressfile .NE. ' ' ) then |
& (vstress_interpMethod.EQ.0 .AND. vstressfile.NE.' ') ) THEN |
|
if ( ustressstartdate .ne. vstressstartdate .or. |
|
|
& ustressperiod .ne. vstressperiod ) then |
|
|
print*,'For useCubedSphereExchange, S/R exf_set_uv.F' |
|
|
print*,'assumes that the u and v wind stress files' |
|
|
print*,'have the same startdate and period.' |
|
|
stop |
|
|
endif |
|
|
endif |
|
|
if ( uwindfile .NE. ' ' .and. vwindfile .NE. ' ' ) then |
|
|
if ( uwindstartdate .ne. vwindstartdate .or. |
|
|
& uwindperiod .ne. vwindperiod ) then |
|
|
print*,'For useCubedSphereExchange, S/R exf_set_uv.F' |
|
|
print*,'assumes that the u and v wind files' |
|
|
print*,'have the same startdate and period.' |
|
|
stop |
|
|
endif |
|
|
endif |
|
|
endif |
|
164 |
#else /* ifndef USE_EXF_INTERPOLATION */ |
#else /* ifndef USE_EXF_INTERPOLATION */ |
165 |
IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN |
IF ( ustressfile .NE. ' ' .OR. vstressfile .NE. ' ' ) THEN |
166 |
|
#endif /* USE_EXF_INTERPOLATION */ |
167 |
IF ( (readStressOnAgrid.AND.readStressOnCgrid) .OR. |
IF ( (readStressOnAgrid.AND.readStressOnCgrid) .OR. |
168 |
& .NOT.(readStressOnAgrid.OR.readStressOnCgrid) ) THEN |
& .NOT.(readStressOnAgrid.OR.readStressOnCgrid) ) THEN |
169 |
STOP |
STOP |
174 |
STOP 'S/R EXF_CHECK: wind-stress position irrelevant' |
STOP 'S/R EXF_CHECK: wind-stress position irrelevant' |
175 |
ENDIF |
ENDIF |
176 |
ENDIF |
ENDIF |
177 |
#endif /* USE_EXF_INTERPOLATION */ |
|
178 |
|
#ifdef USE_NO_INTERP_RUNOFF |
179 |
|
WRITE(msgBuf,'(A,A)') 'EXF_CHECK: USE_NO_INTERP_RUNOFF code', |
180 |
|
& ' has been removed;' |
181 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
182 |
|
WRITE(msgBuf,'(A,A)') 'use instead "runoff_interpMethod=0"', |
183 |
|
& ' in "data.exf" (EXF_NML_04)' |
184 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
185 |
|
STOP 'ABNORMAL END: S/R EXF_CHECK' |
186 |
|
#endif /* USE_NO_INTERP_RUNOFF */ |
187 |
|
|
188 |
#ifdef ALLOW_CLIMTEMP_RELAXATION |
#ifdef ALLOW_CLIMTEMP_RELAXATION |
189 |
STOP 'ALLOW_CLIMTEMP_RELAXATION no longer supported. Use pkg/rbcs' |
STOP 'ALLOW_CLIMTEMP_RELAXATION no longer supported. Use pkg/rbcs' |