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