/[MITgcm]/MITgcm/pkg/ctrl/optim_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/ctrl/optim_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.6 - (hide annotations) (download)
Wed Aug 9 15:23:38 2017 UTC (6 years, 9 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, HEAD
Changes since 1.5: +7 -3 lines
replace CLOSE(nmlfileUnit) with CLOSE(nmlfileUnit,STATUS='DELETE') to remove
scratchfiles after closing, except for SINGLE_DISK_IO, when everything
stays the same

1 mlosch 1.6 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/optim_readparms.F,v 1.5 2015/12/25 15:24:51 gforget Exp $
2     C $Name: BASE $
3 heimbach 1.1
4 jmc 1.4 #include "CTRL_OPTIONS.h"
5 heimbach 1.1
6    
7     subroutine optim_readparms(
8     I mythid
9     & )
10    
11     c ==================================================================
12     c SUBROUTINE optim_readparms
13     c ==================================================================
14     c
15     c o Initialise the optimization part of the ECCO release.
16     c
17     c started: Christian Eckert eckert@mit.edu 03-Mar-2000
18     c
19 jmc 1.3 c changed:
20 heimbach 1.1 c
21     c ==================================================================
22     c SUBROUTINE optim_readparms
23     c ==================================================================
24    
25     implicit none
26    
27     c == global variables ==
28    
29     #include "EEPARAMS.h"
30 gforget 1.5 #include "SIZE.h"
31     #include "PARAMS.h"
32 heimbach 1.1
33     #include "optim.h"
34    
35     c == routine arguments ==
36    
37 jmc 1.3 integer mythid
38 heimbach 1.1
39     c == local variables ==
40    
41     integer errio
42     integer il
43 heimbach 1.2 integer iUnit
44 heimbach 1.1
45     character*(max_len_prec) record
46 heimbach 1.2 character*(max_len_mbuf) msgbuf
47 heimbach 1.1
48     c == external ==
49    
50     integer ilnblnk
51     external ilnblnk
52    
53     c == end of interface ==
54    
55     c-- Optimization parameters.
56     namelist /optim/
57     & optimcycle, nvars,
58     & nondimcontrol,
59     & numiter, nfunc, fmin, iprint,
60     & epsf, epsx, epsg,
61     & nupdate, eps
62    
63 gforget 1.5 IF ( .NOT.useCTRL ) THEN
64     C- pkg CTRL is not used
65     _BEGIN_MASTER(myThid)
66     C- Track pkg activation status:
67     C print a (weak) warning if data.optim is found
68     CALL PACKAGES_UNUSED_MSG( 'useCTRL', ' ', ' ' )
69     _END_MASTER(myThid)
70     RETURN
71     ENDIF
72    
73 heimbach 1.1 _BEGIN_MASTER( mythid )
74    
75     c-- Set default values.
76     optimcycle = 0
77     nvars = 10
78     nondimcontrol = .false.
79     numiter = 0
80     nfunc = 1
81     fmin = 0.0 _d 0
82     iprint = 10
83     epsx = 1.e-6
84     epsg = 1.e-6
85     eps = -1.e-6
86     nupdate = 0
87    
88 heimbach 1.2 WRITE(msgBuf,'(A)') 'OPTIM_READPARMS: opening data.optim'
89     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
90     & SQUEEZE_RIGHT , 1)
91    
92     CALL OPEN_COPY_DATA_FILE(
93     I 'data.optim', 'OPTIM_READPARMS',
94     O iUnit,
95     I myThid )
96    
97     READ(unit = iUnit, nml = optim)
98    
99 jmc 1.3 WRITE(msgBuf,'(A)')
100 heimbach 1.2 & 'OPTIM_READPARMS: finished reading data.optim'
101     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
102     & SQUEEZE_RIGHT , 1)
103 heimbach 1.1
104 mlosch 1.6 #ifdef SINGLE_DISK_IO
105     CLOSE(iUnit)
106     #else
107     CLOSE(iUnit,STATUS='DELETE')
108     #endif /* SINGLE_DISK_IO */
109 heimbach 1.1
110     _END_MASTER( mythid )
111    
112     _BARRIER
113    
114     return
115     end
116    

  ViewVC Help
Powered by ViewVC 1.1.22