1 |
C $Header: /u/gcmpack/MITgcm/pkg/flt/flt_readparms.F,v 1.2 2009/02/01 20:48:50 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.h" |
21 |
|
22 |
C == routine arguments == |
23 |
C myThid - thread number for this instance of the routine. |
24 |
INTEGER myThid |
25 |
|
26 |
C == local variables == |
27 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
28 |
INTEGER iUnit |
29 |
|
30 |
NAMELIST /FLT_NML/ flt_int_traj, flt_int_prof, |
31 |
& flt_noise, flt_deltaT, |
32 |
& flt_file |
33 |
|
34 |
C == end of interface == |
35 |
|
36 |
_BEGIN_MASTER(myThid) |
37 |
|
38 |
C Set default values. |
39 |
flt_deltaT = deltaTClock |
40 |
flt_int_traj = 3600. |
41 |
flt_int_prof = 43200. |
42 |
flt_noise = 0.0 |
43 |
flt_file = 'float_pos' |
44 |
|
45 |
WRITE(msgBuf,'(A)') ' FLT_READPARMS: opening data.flt' |
46 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
47 |
& SQUEEZE_RIGHT, myThid ) |
48 |
CALL OPEN_COPY_DATA_FILE( |
49 |
I 'data.flt', 'FLT_READPARMS', |
50 |
O iUnit, |
51 |
I myThid ) |
52 |
|
53 |
C Read parameters from open data file |
54 |
READ(UNIT=iUnit,NML=FLT_NML) |
55 |
WRITE(msgBuf,'(A)') ' FLT_READPARMS: finished reading data.flt' |
56 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
57 |
& SQUEEZE_RIGHT, myThid ) |
58 |
C Close the open data file |
59 |
CLOSE(iUnit) |
60 |
|
61 |
C DO some checks |
62 |
IF ( useFLT .AND. useOBCS ) THEN |
63 |
WRITE(msgBuf,'(A,A)') |
64 |
& 'S/R FLT_READPARMS: floats currently not implemented', |
65 |
& ' with open boundaries' |
66 |
CALL PRINT_ERROR( msgBuf , myThid) |
67 |
STOP 'ABNORMAL END: S/R FLT_READPARMS' |
68 |
ENDIF |
69 |
|
70 |
_END_MASTER(myThid) |
71 |
_BARRIER |
72 |
|
73 |
RETURN |
74 |
END |