1 |
|
2 |
#include "CPP_OPTIONS.h" |
3 |
#include "OFFLINE_OPTIONS.h" |
4 |
|
5 |
SUBROUTINE OFFLINE_READPARMS( myThid ) |
6 |
C /==========================================================\ |
7 |
C | SUBROUTINE OFFLINE_READPARMS | |
8 |
C | o Routine to initialize OFFLINE variables and constants. | |
9 |
C |==========================================================| |
10 |
C | Initialize OFFLINE parameters, read in data.off | |
11 |
C \==========================================================/ |
12 |
IMPLICIT NONE |
13 |
|
14 |
C === Global variables === |
15 |
#include "SIZE.h" |
16 |
#include "EEPARAMS.h" |
17 |
#include "PARAMS.h" |
18 |
#include "GRID.h" |
19 |
#ifdef ALLOW_OFFLINE |
20 |
#include "OFFLINE.h" |
21 |
#endif |
22 |
|
23 |
C === Routine arguments === |
24 |
INTEGER myThid |
25 |
|
26 |
#ifdef ALLOW_OFFLINE |
27 |
C-- Bulk Formula parameter |
28 |
NAMELIST /OFFLINE_PARM01/ |
29 |
& UvelFile, VvelFile, WvelFile, ThetFile, |
30 |
& SaltFile, ConvFile, GMwxFile, GMwyFile, |
31 |
& GMwzFile, HfluxFile, SfluxFile, KPP_DiffSFile, |
32 |
& KPP_ghatFile |
33 |
|
34 |
NAMELIST /OFFLINE_PARM02/ |
35 |
& offlineIter0, offlineOffsetIter, |
36 |
& deltaToffline, offlineForcingPeriod, |
37 |
& offlineForcingCycle |
38 |
|
39 |
C === Local variables === |
40 |
C msgBuf - Informational/error meesage buffer |
41 |
C iUnit - Work variable for IO unit number |
42 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
43 |
INTEGER iUnit |
44 |
|
45 |
_BEGIN_MASTER(myThid) |
46 |
|
47 |
WRITE(msgBuf,'(A)') ' OFFLINE_READPARMS: opening data.off' |
48 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
49 |
& SQUEEZE_RIGHT , 1) |
50 |
|
51 |
|
52 |
CALL OPEN_COPY_DATA_FILE( |
53 |
I 'data.off', 'OFFLINE_READPARMS', |
54 |
O iUnit, |
55 |
I myThid ) |
56 |
|
57 |
C-- Default values |
58 |
UvelFile=' ' |
59 |
VvelFile=' ' |
60 |
WvelFile=' ' |
61 |
ThetFile=' ' |
62 |
SaltFile=' ' |
63 |
ConvFile=' ' |
64 |
GMwxFile=' ' |
65 |
GMwyFile=' ' |
66 |
GMwzFile=' ' |
67 |
HFluxFile=' ' |
68 |
SFluxFile=' ' |
69 |
KPP_DiffSFile=' ' |
70 |
KPP_ghatFile=' ' |
71 |
|
72 |
C-- Read parameters from open data file |
73 |
READ(UNIT=iUnit,NML=OFFLINE_PARM01) |
74 |
|
75 |
deltaToffline=deltaTclock |
76 |
offlineIter0=nIter0 !initial offline field timestep |
77 |
offlineOffsetIter=0 !offset |
78 |
offlineForcingPeriod=2592000. |
79 |
offlineForcingCycle=31104000. |
80 |
|
81 |
|
82 |
C-- Read parameters from open data file |
83 |
READ(UNIT=iUnit,NML=OFFLINE_PARM02) |
84 |
|
85 |
WRITE(msgBuf,'(A)') |
86 |
& ' OFFLINE_READPARMS: finished reading data.off' |
87 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
88 |
& SQUEEZE_RIGHT , 1) |
89 |
|
90 |
C-- Close the open data file |
91 |
CLOSE(iUnit) |
92 |
_END_MASTER(myThid) |
93 |
|
94 |
C-- Everyone else must wait for the parameters to be loaded |
95 |
_BARRIER |
96 |
|
97 |
|
98 |
#endif /* ALLOW_OFFLINE */ |
99 |
|
100 |
return |
101 |
end |