1 |
heimbach |
1.5 |
C $Header: /u/gcmpack/MITgcm/pkg/ecco/ecco_readparms.F,v 1.2.4.3 2002/07/11 14:59:00 heimbach Exp $ |
2 |
heimbach |
1.1 |
|
3 |
|
|
#include "CPP_OPTIONS.h" |
4 |
|
|
|
5 |
|
|
|
6 |
heimbach |
1.4 |
subroutine ecco_readparms( mythid ) |
7 |
heimbach |
1.1 |
|
8 |
|
|
c ================================================================== |
9 |
|
|
c SUBROUTINE ecco_readparms |
10 |
|
|
c ================================================================== |
11 |
|
|
c |
12 |
|
|
c o Initialize the ECCO release of the MITgcmUV. |
13 |
|
|
c |
14 |
|
|
c started: Christian Eckert eckert@mit.edu 29-Feb-1999 |
15 |
|
|
c |
16 |
|
|
c - Introduced to create a package for the MITgcmUV. |
17 |
|
|
c |
18 |
|
|
c changed: Christian Eckert eckert@mit.edu |
19 |
|
|
c |
20 |
|
|
c ================================================================== |
21 |
|
|
c SUBROUTINE ecco_readparms |
22 |
|
|
c ================================================================== |
23 |
|
|
|
24 |
|
|
implicit none |
25 |
|
|
|
26 |
|
|
c == global variables == |
27 |
|
|
|
28 |
|
|
#include "SIZE.h" |
29 |
|
|
#include "EEPARAMS.h" |
30 |
|
|
#include "PARAMS.h" |
31 |
|
|
#include "ecco.h" |
32 |
|
|
|
33 |
|
|
c == routine arguments == |
34 |
|
|
|
35 |
|
|
integer mythid |
36 |
|
|
|
37 |
|
|
c == local variables == |
38 |
|
|
|
39 |
|
|
integer errio |
40 |
|
|
integer il |
41 |
|
|
|
42 |
|
|
character*(max_len_prec) record |
43 |
|
|
|
44 |
|
|
c == external == |
45 |
|
|
|
46 |
|
|
integer ilnblnk |
47 |
|
|
external ilnblnk |
48 |
|
|
|
49 |
|
|
c == end of interface == |
50 |
|
|
|
51 |
|
|
c-- ECCO parameters. |
52 |
|
|
namelist /ECCO_PARMS/ |
53 |
|
|
& expId |
54 |
|
|
|
55 |
|
|
_BEGIN_MASTER( myThid ) |
56 |
|
|
open( unit=scrunit1, status='scratch' ) |
57 |
|
|
|
58 |
|
|
c-- Next, read the ECCO data file. |
59 |
|
|
open( unit = modeldataunit, |
60 |
|
|
& file = 'data.ecco', |
61 |
|
|
& status = 'old', |
62 |
|
|
& iostat = errio) |
63 |
|
|
|
64 |
|
|
if ( errio .lt. 0 ) then |
65 |
|
|
stop ' stopped in ecco_readparms.' |
66 |
|
|
endif |
67 |
|
|
|
68 |
|
|
do while ( .true. ) |
69 |
|
|
read(modeldataunit, fmt='(a)', end=1001) record |
70 |
|
|
il = max(ilnblnk(record),1) |
71 |
|
|
if ( record(1:1) .ne. commentcharacter ) |
72 |
|
|
& write(unit=scrunit1, fmt='(a)') record(:il) |
73 |
|
|
enddo |
74 |
|
|
1001 continue |
75 |
|
|
close( modeldataunit ) |
76 |
|
|
|
77 |
|
|
rewind( scrunit1 ) |
78 |
|
|
read ( unit = scrunit1, nml = ecco_parms) |
79 |
|
|
close ( scrunit1 ) |
80 |
|
|
|
81 |
|
|
#ifdef INCLUDE_ECCO_PACKAGE |
82 |
|
|
C-- Initialise the ECCO State Estimation package. |
83 |
|
|
|
84 |
|
|
#ifdef ALLOW_ECCO_OPTIMIZATION |
85 |
|
|
c-- Initialise the optimization-related parts of the ECCO State |
86 |
|
|
c-- Estimation package. |
87 |
heimbach |
1.5 |
call optim_readparms( myThid ) |
88 |
heimbach |
1.1 |
_BARRIER |
89 |
|
|
#endif |
90 |
|
|
|
91 |
|
|
#ifndef ALLOW_ECCO_FORWARD_RUN |
92 |
|
|
C-- Initialise the control vector. |
93 |
heimbach |
1.2 |
call ctrl_init( myThid ) |
94 |
heimbach |
1.1 |
_BARRIER |
95 |
|
|
#endif |
96 |
|
|
|
97 |
|
|
#ifdef ALLOW_ECCO_DIAGNOSTICS_RUN |
98 |
|
|
c-- Initialise the ECCO diagnostics package. |
99 |
heimbach |
1.2 |
call diagnos_init( myThid ) |
100 |
heimbach |
1.1 |
_BARRIER |
101 |
|
|
#endif |
102 |
|
|
|
103 |
|
|
#endif /* INCLUDE_ECCO_PACKAGE */ |
104 |
|
|
|
105 |
|
|
c-- Summarize the setup of the ECCO release. |
106 |
heimbach |
1.2 |
c call ecco_summary( mythid ) |
107 |
heimbach |
1.1 |
_END_MASTER( mythid ) |
108 |
|
|
|
109 |
|
|
c-- Everyone else must wait for the parameters to be loaded and |
110 |
|
|
c-- the setup to be completed. |
111 |
|
|
_BARRIER |
112 |
|
|
|
113 |
|
|
end |