File indexing completed on 2019-08-13 05:10:48 UTC
view on githubraw file Latest commit 30fcb891 on 2019-07-20 15:39:54 UTC
23753a76a9 Dimi*0001 #include "EXF_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE EXF_INIT_FIXED( myThid )
0007
0008
0009
0010
c3c3169472 Jean*0011
23753a76a9 Dimi*0012
0013
0014
0015
0016 IMPLICIT NONE
0017
0018
0019 #include "EEPARAMS.h"
0020 #include "SIZE.h"
0021 #include "PARAMS.h"
c3c3169472 Jean*0022 #include "EXF_PARAM.h"
0023 #include "EXF_CONSTANTS.h"
30fcb891cf Jean*0024 #include "EXF_INTERP_SIZE.h"
0025 #include "EXF_INTERP_PARAM.h"
23753a76a9 Dimi*0026
0027
0028
54454651d3 Jean*0029
23753a76a9 Dimi*0030 INTEGER myThid
0031
0032
0033
0034
54454651d3 Jean*0035
0036
0037 CHARACTER*(MAX_LEN_MBUF) msgBuf
0038 INTEGER errCount
69fec4eba6 Jean*0039 #ifdef USE_EXF_INTERPOLATION
0040 INTEGER j
0041 #endif
c3c3169472 Jean*0042
1f9369e289 Jean*0043 #ifdef ALLOW_DEBUG
0044 IF (debugMode) CALL DEBUG_ENTER('EXF_INIT_FIXED',myThid)
0045 #endif
0046
69fec4eba6 Jean*0047 _BEGIN_MASTER( myThid )
54454651d3 Jean*0048 errCount = 0
69fec4eba6 Jean*0049
0050
0051
0052 hfluxmask = 'c'
0053 sfluxmask = 'c'
0054 atempmask = 'c'
0055 aqhmask = 'c'
e2f35e9bc3 Jean*0056 hs_mask = 'c'
0057 hl_mask = 'c'
69fec4eba6 Jean*0058 evapmask = 'c'
0059 precipmask = 'c'
0060 snowprecipmask='c'
0061 runoffmask = 'c'
a66aad0124 Gael*0062 saltflxmask = 'c'
69fec4eba6 Jean*0063 IF ( stressIsOnCgrid ) THEN
0064 ustressmask = 'w'
0065 vstressmask = 's'
0066 ELSE
0067 ustressmask = 'c'
0068 vstressmask = 'c'
0069 ENDIF
0070 uwindmask = 'c'
0071 vwindmask = 'c'
0072 wspeedmask = 'c'
0073 swfluxmask = 'c'
0074 lwfluxmask = 'c'
0075 swdownmask = 'c'
0076 lwdownmask = 'c'
0077 apressuremask= 'c'
497d85062c Jean*0078 tidePotmask = 'c'
69fec4eba6 Jean*0079 areamaskmask = 'c'
0080 climsstmask = 'c'
0081 climsssmask = 'c'
0082 climustrmask = 'w'
0083 climvstrmask = 's'
0084
0085 IF ( useSEAICE ) THEN
ca04b90e6f Jean*0086
0087
69fec4eba6 Jean*0088 hfluxmask = ' '
0089 sfluxmask = ' '
ca04b90e6f Jean*0090
0091
e2f35e9bc3 Jean*0092
0093
ca04b90e6f Jean*0094
0095
0096
0097
a66aad0124 Gael*0098
69fec4eba6 Jean*0099 ustressmask = ' '
0100 vstressmask = ' '
0101 uwindmask = ' '
0102 vwindmask = ' '
0103 wspeedmask = ' '
0104 swfluxmask = ' '
0105 swdownmask = ' '
ca04b90e6f Jean*0106
0107
69fec4eba6 Jean*0108 apressuremask= ' '
497d85062c Jean*0109
ca04b90e6f Jean*0110
0111
0112
69fec4eba6 Jean*0113 climustrmask = ' '
0114 climvstrmask = ' '
0115 ENDIF
0116
0117
1f9369e289 Jean*0118
32e4056e6a Jean*0119
1f9369e289 Jean*0120
0121
0122
c3c3169472 Jean*0123
358649780a Gael*0124 IF ( useAtmWind ) THEN
54454651d3 Jean*0125 IF ( uwindfile .NE. ' ' ) THEN
1f9369e289 Jean*0126 # ifdef ALLOW_DEBUG
54454651d3 Jean*0127 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START uwind',myThid)
f05433056d Jean*0128 # endif
54454651d3 Jean*0129 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0130 I 'exf', 'uwind', uwindperiod,
0131 I uwindstartdate1, uwindstartdate2,
0132 U uwindStartTime, errCount,
0133 I myThid )
e2f35e9bc3 Jean*0134 ENDIF
54454651d3 Jean*0135 IF ( vwindfile .NE. ' ' ) THEN
1f9369e289 Jean*0136 # ifdef ALLOW_DEBUG
54454651d3 Jean*0137 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START vwind',myThid)
f05433056d Jean*0138 # endif
54454651d3 Jean*0139 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0140 I 'exf', 'vwind', vwindperiod,
0141 I vwindstartdate1, vwindstartdate2,
0142 U vwindStartTime, errCount,
0143 I myThid )
e2f35e9bc3 Jean*0144 ENDIF
358649780a Gael*0145 ENDIF
0146
54454651d3 Jean*0147 IF ( wspeedfile .NE. ' ' ) THEN
1f9369e289 Jean*0148 # ifdef ALLOW_DEBUG
54454651d3 Jean*0149 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START wspeed',myThid)
f05433056d Jean*0150 # endif
54454651d3 Jean*0151 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0152 I 'exf', 'wspeed', wspeedperiod,
0153 I wspeedstartdate1, wspeedstartdate2,
0154 U wspeedStartTime, errCount,
0155 I myThid )
c3c3169472 Jean*0156 ENDIF
358649780a Gael*0157
0158 IF ( .NOT.useAtmWind ) THEN
54454651d3 Jean*0159 IF ( ustressfile .NE. ' ' ) THEN
e2f35e9bc3 Jean*0160 # ifdef ALLOW_DEBUG
54454651d3 Jean*0161 IF (debugMode)
0162 & CALL DEBUG_CALL('GETFFIELD_START ustress',myThid)
e2f35e9bc3 Jean*0163 # endif
54454651d3 Jean*0164 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0165 I 'exf', 'ustress', ustressperiod,
0166 I ustressstartdate1, ustressstartdate2,
0167 U ustressStartTime, errCount,
0168 I myThid )
e2f35e9bc3 Jean*0169 ENDIF
54454651d3 Jean*0170 IF ( vstressfile .NE. ' ' ) THEN
1f9369e289 Jean*0171 # ifdef ALLOW_DEBUG
54454651d3 Jean*0172 IF (debugMode)
0173 & CALL DEBUG_CALL('GETFFIELD_START vstress',myThid)
e2f35e9bc3 Jean*0174 # endif
54454651d3 Jean*0175 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0176 I 'exf', 'vstress', vstressperiod,
0177 I vstressstartdate1, vstressstartdate2,
0178 U vstressStartTime, errCount,
0179 I myThid )
e2f35e9bc3 Jean*0180 ENDIF
0181 ENDIF
0182
54454651d3 Jean*0183 IF ( hfluxfile .NE. ' ' ) THEN
e2f35e9bc3 Jean*0184 # ifdef ALLOW_DEBUG
54454651d3 Jean*0185 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START hflux',myThid)
f05433056d Jean*0186 # endif
54454651d3 Jean*0187 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0188 I 'exf', 'hflux', hfluxperiod,
0189 I hfluxstartdate1, hfluxstartdate2,
0190 U hfluxStartTime, errCount,
0191 I myThid )
c3c3169472 Jean*0192 ENDIF
54454651d3 Jean*0193 IF ( sfluxfile .NE. ' ' ) THEN
1f9369e289 Jean*0194 # ifdef ALLOW_DEBUG
54454651d3 Jean*0195 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START sflux',myThid)
f05433056d Jean*0196 # endif
54454651d3 Jean*0197 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0198 I 'exf', 'sflux', sfluxperiod,
0199 I sfluxstartdate1, sfluxstartdate2,
0200 U sfluxStartTime, errCount,
0201 I myThid )
c3c3169472 Jean*0202 ENDIF
e2f35e9bc3 Jean*0203
0204 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
54454651d3 Jean*0205 IF ( swfluxfile .NE. ' ' ) THEN
e2f35e9bc3 Jean*0206 # ifdef ALLOW_DEBUG
54454651d3 Jean*0207 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START swflux',myThid)
e2f35e9bc3 Jean*0208 # endif
54454651d3 Jean*0209 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0210 I 'exf', 'swflux', swfluxperiod,
0211 I swfluxstartdate1, swfluxstartdate2,
0212 U swfluxStartTime, errCount,
0213 I myThid )
358649780a Gael*0214 ENDIF
e2f35e9bc3 Jean*0215 #endif /* defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) */
c3c3169472 Jean*0216
0217 #ifdef ALLOW_ATM_TEMP
54454651d3 Jean*0218 IF ( atempfile .NE. ' ' ) THEN
1f9369e289 Jean*0219 # ifdef ALLOW_DEBUG
54454651d3 Jean*0220 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START atemp',myThid)
f05433056d Jean*0221 # endif
54454651d3 Jean*0222 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0223 I 'exf', 'atemp', atempperiod,
0224 I atempstartdate1, atempstartdate2,
0225 U atempStartTime, errCount,
0226 I myThid )
c3c3169472 Jean*0227 ENDIF
54454651d3 Jean*0228 IF ( aqhfile .NE. ' ' ) THEN
1f9369e289 Jean*0229 # ifdef ALLOW_DEBUG
54454651d3 Jean*0230 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START aqh',myThid)
f05433056d Jean*0231 # endif
54454651d3 Jean*0232 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0233 I 'exf', 'aqh', aqhperiod,
0234 I aqhstartdate1, aqhstartdate2,
0235 U aqhStartTime, errCount,
0236 I myThid )
c3c3169472 Jean*0237 ENDIF
e2f35e9bc3 Jean*0238 # ifdef ALLOW_READ_TURBFLUXES
54454651d3 Jean*0239 IF ( hs_file .NE. ' ' ) THEN
e2f35e9bc3 Jean*0240 # ifdef ALLOW_DEBUG
54454651d3 Jean*0241 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START hs ',myThid)
e2f35e9bc3 Jean*0242 # endif
54454651d3 Jean*0243 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0244 I 'exf', 'hs_', hs_period,
0245 I hs_startdate1, hs_startdate2,
0246 U hs_StartTime, errCount,
0247 I myThid )
e2f35e9bc3 Jean*0248 ENDIF
54454651d3 Jean*0249 IF ( hl_file .NE. ' ' ) THEN
e2f35e9bc3 Jean*0250 # ifdef ALLOW_DEBUG
54454651d3 Jean*0251 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START hl ',myThid)
e2f35e9bc3 Jean*0252 # endif
54454651d3 Jean*0253 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0254 I 'exf', 'hl_', hl_period,
0255 I hl_startdate1, hl_startdate2,
0256 U hl_StartTime, errCount,
0257 I myThid )
e2f35e9bc3 Jean*0258 ENDIF
0259 # endif /* ALLOW_READ_TURBFLUXES */
54454651d3 Jean*0260 IF ( lwfluxfile .NE. ' ' ) THEN
1f9369e289 Jean*0261 # ifdef ALLOW_DEBUG
54454651d3 Jean*0262 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START lwflux',myThid)
f05433056d Jean*0263 # endif
54454651d3 Jean*0264 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0265 I 'exf', 'lwflux', lwfluxperiod,
0266 I lwfluxstartdate1, lwfluxstartdate2,
0267 U lwfluxStartTime, errCount,
0268 I myThid )
c3c3169472 Jean*0269 ENDIF
54454651d3 Jean*0270 IF ( precipfile .NE. ' ' ) THEN
1f9369e289 Jean*0271 # ifdef ALLOW_DEBUG
54454651d3 Jean*0272 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START precip',myThid)
f05433056d Jean*0273 # endif
54454651d3 Jean*0274 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0275 I 'exf', 'precip', precipperiod,
0276 I precipstartdate1, precipstartdate2,
0277 U precipStartTime, errCount,
0278 I myThid )
c3c3169472 Jean*0279 ENDIF
54454651d3 Jean*0280 IF ( snowprecipfile .NE. ' ' ) THEN
1f9369e289 Jean*0281 # ifdef ALLOW_DEBUG
f05433056d Jean*0282 IF (debugMode)
54454651d3 Jean*0283 & CALL DEBUG_CALL('GETFFIELD_START snowprecip',myThid)
f05433056d Jean*0284 # endif
54454651d3 Jean*0285 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0286 I 'exf', 'snowprecip', snowprecipperiod,
0287 I snowprecipstartdate1, snowprecipstartdate2,
0288 U snowprecipStartTime, errCount,
0289 I myThid )
c3c3169472 Jean*0290 ENDIF
9c699cb29f Dimi*0291 #endif /* ALLOW_ATM_TEMP */
c3c3169472 Jean*0292
0293 #ifdef EXF_READ_EVAP
54454651d3 Jean*0294 IF ( evapfile .NE. ' ' ) THEN
1f9369e289 Jean*0295 # ifdef ALLOW_DEBUG
54454651d3 Jean*0296 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START evap',myThid)
f05433056d Jean*0297 # endif
54454651d3 Jean*0298 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0299 I 'exf', 'evap', evapperiod,
0300 I evapstartdate1, evapstartdate2,
0301 U evapStartTime, errCount,
0302 I myThid )
c3c3169472 Jean*0303 ENDIF
9c699cb29f Dimi*0304 #endif /* EXF_READ_EVAP */
c3c3169472 Jean*0305
0306 #ifdef ALLOW_RUNOFF
54454651d3 Jean*0307 IF ( runofffile .NE. ' ' ) THEN
1f9369e289 Jean*0308 # ifdef ALLOW_DEBUG
54454651d3 Jean*0309 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START runoff',myThid)
f05433056d Jean*0310 # endif
54454651d3 Jean*0311 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0312 I 'exf', 'runoff', runoffperiod,
0313 I runoffstartdate1, runoffstartdate2,
0314 U runoffStartTime, errCount,
0315 I myThid )
c3c3169472 Jean*0316 ENDIF
9c699cb29f Dimi*0317 #endif /* ALLOW_RUNOFF */
c3c3169472 Jean*0318
a66aad0124 Gael*0319 #ifdef ALLOW_SALTFLX
54454651d3 Jean*0320 IF ( saltflxfile .NE. ' ' ) THEN
a66aad0124 Gael*0321 # ifdef ALLOW_DEBUG
0322 IF (debugMode)
54454651d3 Jean*0323 & CALL DEBUG_CALL('GETFFIELD_START saltflx',myThid)
a66aad0124 Gael*0324 # endif
54454651d3 Jean*0325 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0326 I 'exf', 'saltflx', saltflxperiod,
0327 I saltflxstartdate1, saltflxstartdate2,
0328 U saltflxStartTime, errCount,
0329 I myThid )
a66aad0124 Gael*0330 ENDIF
0331 #endif /* ALLOW_SALTFLX */
0332
c3c3169472 Jean*0333 #ifdef ALLOW_DOWNWARD_RADIATION
54454651d3 Jean*0334 IF ( swdownfile .NE. ' ' ) THEN
1f9369e289 Jean*0335 # ifdef ALLOW_DEBUG
54454651d3 Jean*0336 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START swdown',myThid)
f05433056d Jean*0337 # endif
54454651d3 Jean*0338 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0339 I 'exf', 'swdown', swdownperiod,
0340 I swdownstartdate1, swdownstartdate2,
0341 U swdownStartTime, errCount,
0342 I myThid )
c3c3169472 Jean*0343 ENDIF
54454651d3 Jean*0344 IF ( lwdownfile .NE. ' ' ) THEN
1f9369e289 Jean*0345 # ifdef ALLOW_DEBUG
54454651d3 Jean*0346 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START lwdown',myThid)
f05433056d Jean*0347 # endif
54454651d3 Jean*0348 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0349 I 'exf', 'lwdown', lwdownperiod,
0350 I lwdownstartdate1, lwdownstartdate2,
0351 U lwdownStartTime, errCount,
0352 I myThid )
c3c3169472 Jean*0353 ENDIF
9c699cb29f Dimi*0354 #endif /* ALLOW_DOWNWARD_RADIATION */
c3c3169472 Jean*0355
0356 #ifdef ATMOSPHERIC_LOADING
54454651d3 Jean*0357 IF ( apressurefile .NE. ' ' ) THEN
1f9369e289 Jean*0358 # ifdef ALLOW_DEBUG
f05433056d Jean*0359 IF (debugMode)
54454651d3 Jean*0360 & CALL DEBUG_CALL('GETFFIELD_START apressure',myThid)
f05433056d Jean*0361 # endif
54454651d3 Jean*0362 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0363 I 'exf', 'apressure', apressureperiod,
0364 I apressurestartdate1, apressurestartdate2,
0365 U apressureStartTime, errCount,
0366 I myThid )
c3c3169472 Jean*0367 ENDIF
9c699cb29f Dimi*0368 #endif /* ATMOSPHERIC_LOADING */
c3c3169472 Jean*0369
497d85062c Jean*0370 #ifdef EXF_ALLOW_TIDES
0371 IF ( tidePotFile .NE. ' ' ) THEN
0372 # ifdef ALLOW_DEBUG
0373 IF (debugMode)
0374 & CALL DEBUG_CALL('GETFFIELD_START tidePot',myThid)
0375 # endif
0376 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0377 I 'exf', 'tidePot', tidePotPeriod,
0378 I tidePotStartdate1, tidePotStartdate2,
0379 U tidePotStartTime, errCount,
0380 I myThid )
0381 ENDIF
0382 #endif /* EXF_ALLOW_TIDES */
0383
24da7525ba Jean*0384 #ifdef EXF_SEAICE_FRACTION
54454651d3 Jean*0385 IF ( areamaskfile .NE. ' ' ) THEN
1f9369e289 Jean*0386 # ifdef ALLOW_DEBUG
54454651d3 Jean*0387 IF (debugMode)
0388 & CALL DEBUG_CALL('GETFFIELD_START areamask',myThid)
f05433056d Jean*0389 # endif
54454651d3 Jean*0390 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0391 I 'exf', 'areamask', areamaskperiod,
0392 I areamaskstartdate1, areamaskstartdate2,
0393 U areamaskStartTime, errCount,
0394 I myThid )
8f277f2728 Gael*0395 ENDIF
24da7525ba Jean*0396 #endif /* EXF_SEAICE_FRACTION */
8f277f2728 Gael*0397
c3c3169472 Jean*0398 #ifdef ALLOW_OBCS
54454651d3 Jean*0399 IF ( useOBCS ) THEN
1f9369e289 Jean*0400 # ifdef ALLOW_DEBUG
54454651d3 Jean*0401 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START obcsN',myThid)
f05433056d Jean*0402 # endif
54454651d3 Jean*0403 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0404 I 'exf', 'obcsN', obcsNperiod,
0405 I obcsNstartdate1, obcsNstartdate2,
8c0ba3ad74 Jean*0406 U obcsNstartTime, errCount,
54454651d3 Jean*0407 I myThid )
1f9369e289 Jean*0408 # ifdef ALLOW_DEBUG
54454651d3 Jean*0409 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START obcsS',myThid)
f05433056d Jean*0410 # endif
54454651d3 Jean*0411 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0412 I 'exf', 'obcsS', obcsSperiod,
0413 I obcsSstartdate1, obcsSstartdate2,
8c0ba3ad74 Jean*0414 U obcsSstartTime, errCount,
54454651d3 Jean*0415 I myThid )
1f9369e289 Jean*0416 # ifdef ALLOW_DEBUG
54454651d3 Jean*0417 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START obcsE',myThid)
f05433056d Jean*0418 # endif
54454651d3 Jean*0419 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0420 I 'exf', 'obcsE', obcsEperiod,
0421 I obcsEstartdate1, obcsEstartdate2,
8c0ba3ad74 Jean*0422 U obcsEstartTime, errCount,
54454651d3 Jean*0423 I myThid )
1f9369e289 Jean*0424 # ifdef ALLOW_DEBUG
54454651d3 Jean*0425 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START obcsW',myThid)
f05433056d Jean*0426 # endif
54454651d3 Jean*0427 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0428 I 'exf', 'obcsW', obcsWperiod,
0429 I obcsWstartdate1, obcsWstartdate2,
8c0ba3ad74 Jean*0430 U obcsWstartTime, errCount,
54454651d3 Jean*0431 I myThid )
c3c3169472 Jean*0432 ENDIF
212017a383 Dimi*0433 # ifdef ALLOW_SEAICE
54454651d3 Jean*0434 IF ( useOBCS .AND. useSEAICE ) THEN
1f9369e289 Jean*0435 # ifdef ALLOW_DEBUG
54454651d3 Jean*0436 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START siobN',myThid)
f05433056d Jean*0437 # endif
54454651d3 Jean*0438 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0439 I 'exf', 'siobN', siobNperiod,
0440 I siobNstartdate1, siobNstartdate2,
8c0ba3ad74 Jean*0441 U siobNstartTime, errCount,
54454651d3 Jean*0442 I myThid )
1f9369e289 Jean*0443 # ifdef ALLOW_DEBUG
54454651d3 Jean*0444 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START siobS',myThid)
f05433056d Jean*0445 # endif
54454651d3 Jean*0446 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0447 I 'exf', 'siobS', siobSperiod,
0448 I siobSstartdate1, siobSstartdate2,
8c0ba3ad74 Jean*0449 U siobSstartTime, errCount,
54454651d3 Jean*0450 I myThid )
1f9369e289 Jean*0451 # ifdef ALLOW_DEBUG
54454651d3 Jean*0452 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START siobE',myThid)
f05433056d Jean*0453 # endif
54454651d3 Jean*0454 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0455 I 'exf', 'siobE', siobEperiod,
0456 I siobEstartdate1, siobEstartdate2,
8c0ba3ad74 Jean*0457 U siobEstartTime, errCount,
54454651d3 Jean*0458 I myThid )
1f9369e289 Jean*0459 # ifdef ALLOW_DEBUG
54454651d3 Jean*0460 IF (debugMode) CALL DEBUG_CALL('GETFFIELD_START siobW',myThid)
f05433056d Jean*0461 # endif
54454651d3 Jean*0462 CALL EXF_GETFFIELD_START( useOBCSYearlyFields,
0463 I 'exf', 'siobW', siobWperiod,
0464 I siobWstartdate1, siobWstartdate2,
8c0ba3ad74 Jean*0465 U siobWstartTime, errCount,
54454651d3 Jean*0466 I myThid )
212017a383 Dimi*0467 ENDIF
0468 # endif /* ALLOW_SEAICE */
c3c3169472 Jean*0469 #endif /* ALLOW_OBCS */
0470
0471 #ifdef ALLOW_CLIMSST_RELAXATION
54454651d3 Jean*0472 IF ( climsstfile .NE. ' ' ) THEN
1f9369e289 Jean*0473 # ifdef ALLOW_DEBUG
54454651d3 Jean*0474 IF (debugMode)
0475 & CALL DEBUG_CALL('GETFFIELD_START climsst',myThid)
f05433056d Jean*0476 # endif
54454651d3 Jean*0477 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0478 I 'exf', 'climsst', climsstperiod,
0479 I climsststartdate1, climsststartdate2,
0480 U climsstStartTime, errCount,
0481 I myThid )
c3c3169472 Jean*0482 ENDIF
9c699cb29f Dimi*0483 #endif /* ALLOW_CLIMSST_RELAXATION */
c3c3169472 Jean*0484
0485 #ifdef ALLOW_CLIMSSS_RELAXATION
54454651d3 Jean*0486 IF ( climsssfile .NE. ' ' ) THEN
1f9369e289 Jean*0487 # ifdef ALLOW_DEBUG
54454651d3 Jean*0488 IF (debugMode)
0489 & CALL DEBUG_CALL('GETFFIELD_START climsss',myThid)
f05433056d Jean*0490 # endif
54454651d3 Jean*0491 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0492 I 'exf', 'climsss', climsssperiod,
0493 I climsssstartdate1, climsssstartdate2,
0494 U climsssStartTime, errCount,
0495 I myThid )
c3c3169472 Jean*0496 ENDIF
9c699cb29f Dimi*0497 #endif /* ALLOW_CLIMSSS_RELAXATION */
c3c3169472 Jean*0498
de9be302a8 Patr*0499 #ifdef ALLOW_CLIMSTRESS_RELAXATION
54454651d3 Jean*0500 IF ( climustrfile .NE. ' ' ) THEN
1f9369e289 Jean*0501 # ifdef ALLOW_DEBUG
54454651d3 Jean*0502 IF (debugMode)
0503 & CALL DEBUG_CALL('GETFFIELD_START climustr',myThid)
f05433056d Jean*0504 # endif
54454651d3 Jean*0505 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0506 I 'exf', 'climustr', climustrperiod,
0507 I climustrstartdate1, climustrstartdate2,
0508 U climustrStartTime, errCount,
0509 I myThid )
de9be302a8 Patr*0510 ENDIF
1f9369e289 Jean*0511
54454651d3 Jean*0512 IF ( climvstrfile .NE. ' ' ) THEN
1f9369e289 Jean*0513 # ifdef ALLOW_DEBUG
54454651d3 Jean*0514 IF (debugMode)
0515 & CALL DEBUG_CALL('GETFFIELD_START climvstr',myThid)
f05433056d Jean*0516 # endif
54454651d3 Jean*0517 CALL EXF_GETFFIELD_START( useExfYearlyFields,
0518 I 'exf', 'climvstr', climvstrperiod,
0519 I climvstrstartdate1, climvstrstartdate2,
0520 U climvstrStartTime, errCount,
0521 I myThid )
de9be302a8 Patr*0522 ENDIF
0523 #endif /* ALLOW_CLIMSTRESS_RELAXATION */
0524
69fec4eba6 Jean*0525 #ifdef USE_EXF_INTERPOLATION
0526
0527
0528 uvInterp_stress = ustressfile.NE.' ' .AND. vstressfile.NE.' '
0529 & .AND. ustress_interpMethod.GE.1 .AND. vstress_interpMethod.GE.1
0530 uvInterp_stress = uvInterp_stress
32e4056e6a Jean*0531 & .AND. ustressStartTime .EQ. vstressStartTime
69fec4eba6 Jean*0532 & .AND. ustressperiod .EQ. vstressperiod
0533 uvInterp_stress = uvInterp_stress
0534 & .AND. ustress_nlon .EQ. vstress_nlon
0535 & .AND. ustress_nlat .EQ. vstress_nlat
0536 & .AND. ustress_lon0 .EQ. vstress_lon0
0537 & .AND. ustress_lat0 .EQ. vstress_lat0
0538 & .AND. ustress_lon_inc .EQ. vstress_lon_inc
0539 IF ( uvInterp_stress ) THEN
0540 DO j=1,MIN(ustress_nlat-1,MAX_LAT_INC)
0541 uvInterp_stress = uvInterp_stress
0542 & .AND. ustress_lat_inc(j) .EQ. vstress_lat_inc(j)
0543 ENDDO
0544 ENDIF
0545
0546 uvInterp_wind = uwindfile.NE.' ' .AND. vwindfile.NE.' '
0547 & .AND. uwind_interpMethod.GE.1 .AND. vwind_interpMethod.GE.1
0548 uvInterp_wind = uvInterp_wind
32e4056e6a Jean*0549 & .AND. uwindStartTime .EQ. vwindStartTime
69fec4eba6 Jean*0550 & .AND. uwindperiod .EQ. vwindperiod
0551 uvInterp_wind = uvInterp_wind
0552 & .AND. uwind_nlon .EQ. vwind_nlon
0553 & .AND. uwind_nlat .EQ. vwind_nlat
0554 & .AND. uwind_lon0 .EQ. vwind_lon0
0555 & .AND. uwind_lat0 .EQ. vwind_lat0
0556 & .AND. uwind_lon_inc .EQ. vwind_lon_inc
0557 IF ( uvInterp_wind ) THEN
0558 DO j=1,MIN(uwind_nlat-1,MAX_LAT_INC)
0559 uvInterp_wind = uvInterp_wind
0560 & .AND. uwind_lat_inc(j) .EQ. vwind_lat_inc(j)
0561 ENDDO
0562 ENDIF
0563
0564 uvInterp_climstr = climustrfile.NE.' ' .AND. climvstrfile.NE.' '
0565 & .AND.climustr_interpMethod.GE.1 .AND.climvstr_interpMethod.GE.1
0566 uvInterp_climstr = uvInterp_climstr
32e4056e6a Jean*0567 & .AND. climustrStartTime .EQ. climvstrStartTime
69fec4eba6 Jean*0568 & .AND. climustrperiod .EQ. climvstrperiod
0569 uvInterp_climstr = uvInterp_climstr
0570 & .AND. climustr_nlon .EQ. climvstr_nlon
0571 & .AND. climustr_nlat .EQ. climvstr_nlat
0572 & .AND. climustr_lon0 .EQ. climvstr_lon0
0573 & .AND. climustr_lat0 .EQ. climvstr_lat0
0574 & .AND. climustr_lon_inc .EQ. climvstr_lon_inc
0575 IF ( uvInterp_climstr ) THEN
0576 DO j=1,MIN(climustr_nlat-1,MAX_LAT_INC)
0577 uvInterp_climstr = uvInterp_climstr
0578 & .AND. climustr_lat_inc(j) .EQ. climvstr_lat_inc(j)
0579 ENDDO
0580 ENDIF
ae5cd4f62c Jean*0581 # ifdef EXF_USE_OLD_INTERP_POLE
0582 uvInterp_stress = .FALSE.
0583 uvInterp_wind = .FALSE.
0584 uvInterp_climstr= .FALSE.
0585 # endif
69fec4eba6 Jean*0586 #endif /* USE_EXF_INTERPOLATION */
0587
54454651d3 Jean*0588 IF ( errCount.GE.1 ) THEN
0589 WRITE(msgBuf,'(A,I3,A)')
0590 & 'EXF_INIT_FIXED: detected', errCount,' fatal error(s)'
0591 CALL PRINT_ERROR( msgBuf, myThid )
0592 CALL ALL_PROC_DIE( 0 )
0593 STOP 'ABNORMAL END: S/R EXF_INIT_FIXED'
0594 ENDIF
0595
c3c3169472 Jean*0596 _END_MASTER( myThid )
0597 _BARRIER
0598
69fec4eba6 Jean*0599 #ifdef ALLOW_ZENITHANGLE
d106b5e2d8 Gael*0600 IF ( useExfZenAlbedo .OR. useExfZenIncoming ) THEN
1f9369e289 Jean*0601 # ifdef ALLOW_DEBUG
0602 IF (debugMode) CALL DEBUG_CALL('EXF_ZENITHANGLE_TABLE',myThid)
0603 # endif
94390f4f16 Gael*0604 CALL EXF_ZENITHANGLE_TABLE(myThid)
0605 ENDIF
69fec4eba6 Jean*0606 #endif /* ALLOW_ZENITHANGLE */
94390f4f16 Gael*0607
3daafce20b Jean*0608
1f9369e289 Jean*0609 # ifdef ALLOW_DEBUG
0610 IF (debugMode) CALL DEBUG_CALL('EXF_SUMMARY',myThid)
0611 # endif
c3c3169472 Jean*0612 CALL EXF_SUMMARY( myThid )
23753a76a9 Dimi*0613
0614 #ifdef ALLOW_DIAGNOSTICS
0615 IF ( useDiagnostics ) THEN
1f9369e289 Jean*0616 # ifdef ALLOW_DEBUG
0617 IF (debugMode) CALL DEBUG_CALL('EXF_DIAGNOSTICS_INIT',myThid)
0618 # endif
23753a76a9 Dimi*0619 CALL EXF_DIAGNOSTICS_INIT( myThid )
0620 ENDIF
0621 #endif
0622
1f9369e289 Jean*0623 #ifdef ALLOW_DEBUG
0624 IF (debugMode) CALL DEBUG_LEAVE('EXF_INIT_FIXED',myThid)
0625 #endif
0626
23753a76a9 Dimi*0627 RETURN
0628 END