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