1 |
C $Header: /u/gcmpack/MITgcm/pkg/flt/flt_readparms.F,v 1.7 2011/08/31 21:41:55 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "FLT_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE FLT_READPARMS( myThid ) |
7 |
|
8 |
C ================================================================== |
9 |
C SUBROUTINE FLT_READPARMS |
10 |
C ================================================================== |
11 |
C o read float-pkg parameters from file "data.flt" |
12 |
C ================================================================== |
13 |
|
14 |
C !USES: |
15 |
IMPLICIT NONE |
16 |
|
17 |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
19 |
#include "PARAMS.h" |
20 |
#include "FLT_SIZE.h" |
21 |
#include "FLT.h" |
22 |
|
23 |
C == routine arguments == |
24 |
C myThid - thread number for this instance of the routine. |
25 |
INTEGER myThid |
26 |
|
27 |
C == local variables == |
28 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
29 |
INTEGER iUnit |
30 |
|
31 |
NAMELIST /FLT_NML/ flt_int_traj, flt_int_prof, |
32 |
& flt_selectTrajOutp, flt_selectProfOutp, |
33 |
& flt_noise, flt_deltaT, FLT_Iter0, |
34 |
& flt_file, mapIniPos2Index |
35 |
|
36 |
C == end of interface == |
37 |
|
38 |
_BEGIN_MASTER(myThid) |
39 |
|
40 |
C Set default values. |
41 |
flt_deltaT = deltaTClock |
42 |
FLT_Iter0 = 0 |
43 |
flt_int_traj = 3600. |
44 |
flt_int_prof = 43200. |
45 |
flt_noise = 0.0 |
46 |
flt_file = 'float_pos' |
47 |
mapIniPos2Index = .TRUE. |
48 |
flt_selectTrajOutp = 2 |
49 |
flt_selectProfOutp = 2 |
50 |
|
51 |
WRITE(msgBuf,'(A)') ' FLT_READPARMS: opening data.flt' |
52 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
53 |
& SQUEEZE_RIGHT, myThid ) |
54 |
CALL OPEN_COPY_DATA_FILE( |
55 |
I 'data.flt', 'FLT_READPARMS', |
56 |
O iUnit, |
57 |
I myThid ) |
58 |
|
59 |
C Read parameters from open data file |
60 |
READ(UNIT=iUnit,NML=FLT_NML) |
61 |
WRITE(msgBuf,'(A)') ' FLT_READPARMS: finished reading data.flt' |
62 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
63 |
& SQUEEZE_RIGHT, myThid ) |
64 |
C Close the open data file |
65 |
CLOSE(iUnit) |
66 |
|
67 |
C Do some checks |
68 |
c IF ( useFLT .AND. useOBCS ) THEN |
69 |
c WRITE(msgBuf,'(A,A)') |
70 |
c & 'S/R FLT_READPARMS: floats currently not implemented', |
71 |
c & ' with open boundaries' |
72 |
c CALL PRINT_ERROR( msgBuf , myThid) |
73 |
c STOP 'ABNORMAL END: S/R FLT_READPARMS' |
74 |
c ENDIF |
75 |
|
76 |
_END_MASTER(myThid) |
77 |
_BARRIER |
78 |
|
79 |
RETURN |
80 |
END |