1 |
stephd |
1.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 |
stephd |
1.2 |
& GMwzFile, HfluxFile, SfluxFile |
32 |
stephd |
1.1 |
|
33 |
|
|
NAMELIST /OFFLINE_PARM02/ |
34 |
|
|
& offlineIter0, deltaToffline, offlineForcingPeriod, |
35 |
|
|
& offlineForcingCycle |
36 |
|
|
|
37 |
|
|
C === Local variables === |
38 |
|
|
C msgBuf - Informational/error meesage buffer |
39 |
|
|
C iUnit - Work variable for IO unit number |
40 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
41 |
|
|
INTEGER iUnit |
42 |
|
|
|
43 |
|
|
_BEGIN_MASTER(myThid) |
44 |
|
|
|
45 |
|
|
WRITE(msgBuf,'(A)') ' OFFLINE_READPARMS: opening data.off' |
46 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
47 |
|
|
& SQUEEZE_RIGHT , 1) |
48 |
|
|
|
49 |
|
|
|
50 |
|
|
CALL OPEN_COPY_DATA_FILE( |
51 |
|
|
I 'data.off', 'OFFLINE_READPARMS', |
52 |
|
|
O iUnit, |
53 |
|
|
I myThid ) |
54 |
|
|
|
55 |
|
|
C-- Default values |
56 |
|
|
UvelFile=' ' |
57 |
|
|
VvelFile=' ' |
58 |
|
|
WvelFile=' ' |
59 |
|
|
ThetFile=' ' |
60 |
|
|
SaltFile=' ' |
61 |
|
|
ConvFile=' ' |
62 |
|
|
GMwxFile=' ' |
63 |
|
|
GMwyFile=' ' |
64 |
|
|
GMwzFile=' ' |
65 |
stephd |
1.2 |
HFluxFile=' ' |
66 |
|
|
SFluxFile=' ' |
67 |
stephd |
1.1 |
|
68 |
|
|
C-- Read parameters from open data file |
69 |
|
|
READ(UNIT=iUnit,NML=OFFLINE_PARM01) |
70 |
|
|
|
71 |
|
|
deltaToffline=deltaTclock |
72 |
|
|
offlineIter0=nIter0 |
73 |
|
|
offlineForcingPeriod=2592000. |
74 |
|
|
offlineForcingCycle=31104000. |
75 |
|
|
|
76 |
|
|
|
77 |
|
|
C-- Read parameters from open data file |
78 |
|
|
READ(UNIT=iUnit,NML=OFFLINE_PARM02) |
79 |
|
|
|
80 |
|
|
WRITE(msgBuf,'(A)') |
81 |
|
|
& ' OFFLINE_READPARMS: finished reading data.off' |
82 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
83 |
|
|
& SQUEEZE_RIGHT , 1) |
84 |
|
|
|
85 |
|
|
C-- Close the open data file |
86 |
|
|
CLOSE(iUnit) |
87 |
|
|
_END_MASTER(myThid) |
88 |
|
|
|
89 |
|
|
C-- Everyone else must wait for the parameters to be loaded |
90 |
|
|
_BARRIER |
91 |
|
|
|
92 |
|
|
|
93 |
|
|
#endif /* ALLOW_OFFLINE */ |
94 |
|
|
|
95 |
|
|
return |
96 |
|
|
end |