1 |
C $Header: $ |
2 |
|
3 |
#include "CPP_OPTIONS.h" |
4 |
|
5 |
SUBROUTINE PACKAGE_INIT( myThid ) |
6 |
C /==========================================================\ |
7 |
C | SUBROUTINE PACKAGE_INIT | |
8 |
C | o Routine to initialize package configuration | |
9 |
C |==========================================================| |
10 |
C \==========================================================/ |
11 |
IMPLICIT NONE |
12 |
|
13 |
C === Global variables === |
14 |
#include "SIZE.h" |
15 |
#include "EEPARAMS.h" |
16 |
#include "PARAMS.h" |
17 |
|
18 |
C === Routine arguments === |
19 |
C myThid - Number of this instances |
20 |
INTEGER myThid |
21 |
|
22 |
C-- data.pkg namelists |
23 |
NAMELIST /PACKAGES/ |
24 |
& use_KPPmixing, |
25 |
& use_GMRedi |
26 |
|
27 |
C === Local variables === |
28 |
C msgBuf - Informational/error meesage buffer |
29 |
C iUnit - Work variable for IO unit number |
30 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
31 |
INTEGER iUnit |
32 |
|
33 |
_BEGIN_MASTER(myThid) |
34 |
|
35 |
WRITE(msgBuf,'(A)') ' PACKAGE_INIT: opening data.pkg' |
36 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
37 |
& SQUEEZE_RIGHT , 1) |
38 |
|
39 |
|
40 |
CALL OPEN_COPY_DATA_FILE( |
41 |
I 'data.pkg', 'PACKAGE_INIT', |
42 |
O iUnit, |
43 |
I myThid ) |
44 |
|
45 |
C-- Default package configuration |
46 |
use_GMRedi=.FALSE. |
47 |
use_KPPmixing=.FALSE. |
48 |
|
49 |
|
50 |
C-- Read parameters from open data file |
51 |
READ(UNIT=iUnit,NML=PACKAGES) |
52 |
|
53 |
|
54 |
WRITE(msgBuf,'(A)') ' PACKAGE_INIT: finished reading data.pkg' |
55 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
56 |
& SQUEEZE_RIGHT , 1) |
57 |
|
58 |
C-- Close the open data file |
59 |
CLOSE(iUnit) |
60 |
_END_MASTER(myThid) |
61 |
|
62 |
C-- Everyone else must wait for the parameters to be loaded |
63 |
_BARRIER |
64 |
|
65 |
return |
66 |
end |