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