1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "PROFILES_OPTIONS.h" |
5 |
|
6 |
subroutine profiles_readparms( mythid ) |
7 |
|
8 |
c ================================================================== |
9 |
c SUBROUTINE profiles_readparms |
10 |
c ================================================================== |
11 |
c |
12 |
c o This routine initialises the package cost. |
13 |
c started: Ralf Giering 18-Jan-2001 |
14 |
c |
15 |
c ================================================================== |
16 |
c SUBROUTINE profiles_readparms |
17 |
c ================================================================== |
18 |
|
19 |
implicit none |
20 |
|
21 |
c == global variables == |
22 |
|
23 |
#include "EEPARAMS.h" |
24 |
#include "SIZE.h" |
25 |
#include "GRID.h" |
26 |
#include "PARAMS.h" |
27 |
|
28 |
cph#include "ecco_cost.h" |
29 |
#include "profiles.h" |
30 |
|
31 |
c == routine arguments == |
32 |
|
33 |
integer mythid |
34 |
|
35 |
c == local variables == |
36 |
C msgBuf - Informational/error meesage buffer |
37 |
C iUnit - Work variable for IO unit number |
38 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
39 |
INTEGER iUnit, num_file, num_var |
40 |
|
41 |
c == end of interface == |
42 |
|
43 |
c-- Read the namelist input. |
44 |
namelist /profiles_nml/ |
45 |
& profilesfiles, |
46 |
& mult_profiles |
47 |
|
48 |
_BEGIN_MASTER( myThid ) |
49 |
|
50 |
c-- Set default values. |
51 |
do num_file=1,NFILESPROFMAX |
52 |
profilesfiles(num_file) = ' ' |
53 |
enddo |
54 |
|
55 |
do num_file=1,NFILESPROFMAX |
56 |
do num_var=1,NVARMAX |
57 |
mult_profiles(num_file,num_var) = 0. _d 0 |
58 |
enddo |
59 |
enddo |
60 |
|
61 |
prof_names(1)='prof_T' |
62 |
prof_names(2)='prof_S' |
63 |
prof_names(3)='prof_U' |
64 |
prof_names(4)='prof_V' |
65 |
prof_names(5)='prof_ptr' |
66 |
prof_names(6)='prof_ssh' |
67 |
prof_namesmask(1)='prof_Tmask' |
68 |
prof_namesmask(2)='prof_Smask' |
69 |
prof_namesmask(3)='prof_Umask' |
70 |
prof_namesmask(4)='prof_Vmask' |
71 |
prof_namesmask(5)='prof_ptrmask' |
72 |
prof_namesmask(6)='prof_sshmask' |
73 |
prof_namesweight(1)='prof_Tweight' |
74 |
prof_namesweight(2)='prof_Sweight' |
75 |
prof_namesweight(3)='prof_Uweight' |
76 |
prof_namesweight(4)='prof_Vweight' |
77 |
prof_namesweight(5)='prof_ptrweight' |
78 |
prof_namesweight(6)='prof_sshweight' |
79 |
profilesfile_equi_type=2 |
80 |
|
81 |
if (NVARMAX.GT.6) then |
82 |
WRITE(msgBuf,'(A)') |
83 |
& 'PROFILES_READPARMS: you need to define variables 7 to NVARMAX' |
84 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
85 |
& SQUEEZE_RIGHT , 1) |
86 |
stop |
87 |
endif |
88 |
|
89 |
c-- Next, read the cost data file. |
90 |
WRITE(msgBuf,'(A)') 'PROFILES_READPARMS: opening data.profiles' |
91 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
92 |
& SQUEEZE_RIGHT , 1) |
93 |
|
94 |
CALL OPEN_COPY_DATA_FILE( |
95 |
I 'data.profiles', 'PROFILES_READPARMS', |
96 |
O iUnit, |
97 |
I myThid ) |
98 |
|
99 |
READ( iUnit, nml = profiles_nml ) |
100 |
|
101 |
WRITE(msgBuf,'(2A)') 'PROFILES_READPARMS: ', |
102 |
& 'finished reading data.profiles' |
103 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
104 |
& SQUEEZE_RIGHT , 1) |
105 |
|
106 |
CLOSE( iUnit ) |
107 |
|
108 |
_END_MASTER( mythid ) |
109 |
|
110 |
_BARRIER |
111 |
|
112 |
end |