4 |
#include "OFFLINE_OPTIONS.h" |
#include "OFFLINE_OPTIONS.h" |
5 |
|
|
6 |
SUBROUTINE OFFLINE_READPARMS( myThid ) |
SUBROUTINE OFFLINE_READPARMS( myThid ) |
7 |
C /==========================================================\ |
C *==========================================================* |
8 |
C | SUBROUTINE OFFLINE_READPARMS | |
C | SUBROUTINE OFFLINE_READPARMS |
9 |
C | o Routine to initialize OFFLINE variables and constants. | |
C | o Routine to initialize OFFLINE variables and constants. |
10 |
C |==========================================================| |
C *==========================================================* |
11 |
C | Initialize OFFLINE parameters, read in data.off | |
C | Initialize OFFLINE parameters, read in data.off |
12 |
C \==========================================================/ |
C *==========================================================* |
13 |
IMPLICIT NONE |
IMPLICIT NONE |
14 |
|
|
15 |
C === Global variables === |
C === Global variables === |
16 |
#include "SIZE.h" |
#include "SIZE.h" |
17 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
18 |
#include "PARAMS.h" |
#include "PARAMS.h" |
19 |
#include "GRID.h" |
c#include "GRID.h" |
20 |
#ifdef ALLOW_OFFLINE |
#ifdef ALLOW_OFFLINE |
21 |
#include "OFFLINE.h" |
#include "OFFLINE.h" |
22 |
#endif |
#endif |
24 |
C === Routine arguments === |
C === Routine arguments === |
25 |
INTEGER myThid |
INTEGER myThid |
26 |
|
|
27 |
#ifdef ALLOW_OFFLINE |
#ifdef ALLOW_OFFLINE |
28 |
C-- Bulk Formula parameter |
C-- Bulk Formula parameter |
29 |
NAMELIST /OFFLINE_PARM01/ |
NAMELIST /OFFLINE_PARM01/ |
30 |
& UvelFile, VvelFile, WvelFile, ThetFile, |
& UvelFile, VvelFile, WvelFile, ThetFile, |
31 |
& SaltFile, ConvFile, GMwxFile, GMwyFile, |
& SaltFile, ConvFile, GMwxFile, GMwyFile, |
32 |
& GMwzFile, HfluxFile, SfluxFile, KPP_DiffSFile, |
& GMwzFile, HfluxFile, SfluxFile, |
33 |
& KPP_ghatFile, ICEFile |
& KPP_DiffSFile, KPP_ghatKFile, ICEFile, |
34 |
|
& KPP_ghatFile |
35 |
|
|
36 |
NAMELIST /OFFLINE_PARM02/ |
NAMELIST /OFFLINE_PARM02/ |
37 |
& offlineIter0, offlineOffsetIter, |
& offlineIter0, offlineOffsetIter, |
38 |
& deltaToffline, offlineForcingPeriod, |
& deltaToffline, offlineForcingPeriod, |
39 |
& offlineForcingCycle, offlineLoadPrec |
& offlineForcingCycle, offlineLoadPrec |
40 |
|
|
41 |
C === Local variables === |
C === Local variables === |
42 |
C msgBuf - Informational/error meesage buffer |
C msgBuf :: Informational/error message buffer |
43 |
C iUnit - Work variable for IO unit number |
C iUnit :: Work variable for IO unit number |
44 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
45 |
INTEGER iUnit |
INTEGER iUnit |
46 |
|
C Retired main data.offline file parameters |
47 |
|
CHARACTER*(MAX_LEN_FNAM) KPP_ghatFile |
48 |
|
|
49 |
_BEGIN_MASTER(myThid) |
_BEGIN_MASTER(myThid) |
50 |
|
|
51 |
WRITE(msgBuf,'(A)') ' OFFLINE_READPARMS: opening data.off' |
WRITE(msgBuf,'(A)') ' OFFLINE_READPARMS: opening data.off' |
52 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
53 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT, myThid ) |
54 |
|
|
55 |
|
|
56 |
CALL OPEN_COPY_DATA_FILE( |
CALL OPEN_COPY_DATA_FILE( |
57 |
I 'data.off', 'OFFLINE_READPARMS', |
I 'data.off', 'OFFLINE_READPARMS', |
58 |
O iUnit, |
O iUnit, |
59 |
I myThid ) |
I myThid ) |
60 |
|
|
61 |
C-- Default values |
C-- Default values for params in OFFLINE_PARM01 : |
62 |
UvelFile=' ' |
UvelFile=' ' |
63 |
VvelFile=' ' |
VvelFile=' ' |
64 |
WvelFile=' ' |
WvelFile=' ' |
67 |
ConvFile=' ' |
ConvFile=' ' |
68 |
GMwxFile=' ' |
GMwxFile=' ' |
69 |
GMwyFile=' ' |
GMwyFile=' ' |
70 |
GMwzFile=' ' |
GMwzFile=' ' |
71 |
HFluxFile=' ' |
HFluxFile=' ' |
72 |
SFluxFile=' ' |
SFluxFile=' ' |
73 |
KPP_DiffSFile=' ' |
KPP_DiffSFile=' ' |
74 |
KPP_ghatFile=' ' |
KPP_ghatKFile=' ' |
75 |
|
KPP_ghatFile='KPP_ghatFile has been replaced by KPP_ghatKFile' |
76 |
ICEFile=' ' |
ICEFile=' ' |
77 |
|
|
78 |
C-- Read parameters from open data file |
C-- Read parameters from open data file |
79 |
READ(UNIT=iUnit,NML=OFFLINE_PARM01) |
READ(UNIT=iUnit,NML=OFFLINE_PARM01) |
80 |
|
|
81 |
|
IF ( KPP_ghatFile .NE. |
82 |
|
& 'KPP_ghatFile has been replaced by KPP_ghatKFile' ) THEN |
83 |
|
c nRetired = nRetired+1 |
84 |
|
WRITE(msgBuf,'(A,A)') 'S/R OFFLINE_READPARMS: "KPP_ghatFile"', |
85 |
|
& ' is no longer allowed in file "data.off"' |
86 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
87 |
|
WRITE(msgBuf,'(A,A)') 'S/R OFFLINE_READPARMS: read instead ', |
88 |
|
& 'the product ghat*diffKz from file "KPP_ghatKFile"' |
89 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
90 |
|
STOP 'ABNORMAL END: S/R OFFLINE_READPARMS' |
91 |
|
ENDIF |
92 |
|
|
93 |
|
C-- Default values for params in OFFLINE_PARM02 : |
94 |
deltaToffline=deltaTclock |
deltaToffline=deltaTclock |
95 |
offlineIter0=nIter0 !initial offline field timestep |
offlineIter0=nIter0 !initial offline field timestep |
96 |
offlineOffsetIter=0 !offset |
offlineOffsetIter=0 !offset |
97 |
offlineForcingPeriod=2592000. |
offlineForcingPeriod=2592000. |
98 |
offlineForcingCycle=31104000. |
offlineForcingCycle=31104000. |
99 |
offlineLoadPrec=readBinaryPrec |
offlineLoadPrec=readBinaryPrec |
100 |
|
|
101 |
C-- Read parameters from open data file |
C-- Read parameters from open data file |
102 |
READ(UNIT=iUnit,NML=OFFLINE_PARM02) |
READ(UNIT=iUnit,NML=OFFLINE_PARM02) |
103 |
|
|
104 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
105 |
& ' OFFLINE_READPARMS: finished reading data.off' |
& ' OFFLINE_READPARMS: finished reading data.off' |
106 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
107 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT, myThid ) |
108 |
|
|
109 |
C-- Close the open data file |
C-- Close the open data file |
110 |
CLOSE(iUnit) |
CLOSE(iUnit) |
113 |
C-- Everyone else must wait for the parameters to be loaded |
C-- Everyone else must wait for the parameters to be loaded |
114 |
_BARRIER |
_BARRIER |
115 |
|
|
|
|
|
116 |
#endif /* ALLOW_OFFLINE */ |
#endif /* ALLOW_OFFLINE */ |
117 |
|
|
118 |
RETURN |
RETURN |