/[MITgcm]/MITgcm/pkg/cost/cost_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/cost/cost_readparms.F

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


Revision 1.16 - (show annotations) (download)
Fri Aug 10 19:36:02 2012 UTC (11 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66i, checkpoint66h, checkpoint63r, checkpoint63s, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.15: +2 -2 lines
rename COST_CPPOPTIONS.h to COST_OPTIONS.h

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_readparms.F,v 1.15 2012/08/10 14:43:57 gforget Exp $
2 C $Name: $
3
4 #include "COST_OPTIONS.h"
5
6 subroutine cost_readparms( mythid )
7
8 c ==================================================================
9 c SUBROUTINE cost_readparms
10 c ==================================================================
11 c
12 c o This routine initialises the package cost.
13 c
14 c started: Ralf Giering 18-Jan-2001
15 c
16 c ==================================================================
17 c SUBROUTINE cost_readparms
18 c ==================================================================
19
20 implicit none
21
22 c == global variables ==
23
24 #include "EEPARAMS.h"
25 #include "SIZE.h"
26 #include "GRID.h"
27 #include "PARAMS.h"
28
29 #include "cost.h"
30
31 c == routine arguments ==
32 integer mythid
33
34 c == local variables ==
35 character*(max_len_mbuf) msgbuf
36 integer iUnit
37
38 c == end of interface ==
39
40 c-- Read the namelist input.
41 namelist /cost_nml/
42 & mult_atl, mult_test, mult_tracer
43 & , multTheta, multSalt, multUvel, multVvel, multEtan
44 #ifdef ALLOW_COST_TRANSPORT
45 & , mult_transport
46 #endif
47 #ifdef ALLOW_COST_DEPTH
48 & , mult_depth
49 #endif
50 & , lastinterval
51 cHFLUXM_CONTROL
52 & , mult_temp_tut, mult_hflux_tut
53 cHFLUXM_CONTROL
54
55 _BEGIN_MASTER( myThid )
56
57 c-- Set default values.
58 mult_atl = 0. _d 0
59 mult_test = 0. _d 0
60 mult_tracer = 0. _d 0
61 multTheta = 0. _d 0
62 multSalt = 0. _d 0
63 multUvel = 0. _d 0
64 multVvel = 0. _d 0
65 multEtan = 0. _d 0
66 #ifdef ALLOW_COST_TRANSPORT
67 mult_transport = 0. _d 0
68 #endif
69 #ifdef ALLOW_COST_DEPTH
70 mult_depth = 0. _d 0
71 #endif
72 cHFLUXM_CONTROL
73 mult_temp_tut = 0. _d 0
74 mult_hflux_tut = 0. _d 0
75 cHFLUXM_CONTROL
76
77 c-- 30*24*3600 = 2592000 = 1 model month
78 lastinterval = 2592000.
79
80 c-- Next, read the cost data file.
81 WRITE(msgBuf,'(A)') 'COST_READPARMS: opening data.cost'
82 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
83 & SQUEEZE_RIGHT , 1)
84
85 CALL OPEN_COPY_DATA_FILE(
86 I 'data.cost', 'COST_READPARMS',
87 O iUnit,
88 I myThid )
89
90 READ( iUnit, nml = cost_nml )
91
92 WRITE(msgBuf,'(A)') 'COST_READPARMS: finished reading data.cost'
93 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
94 & SQUEEZE_RIGHT , 1)
95
96 CLOSE( iUnit )
97
98 IF ( MOD(lastinterval,deltaTclock) .GT. 0. )
99 & lastinterval = MAX(
100 & INT(lastinterval/deltaTclock-1)*deltaTclock,deltaTclock)
101
102 #if (defined ALLOW_COST_HFLUXM) || (defined ALLOW_COST_TEMP)
103 c-- get the weights for the cost functions
104 CALL COST_WEIGHTS( myThid )
105 cgf : to compile previous line user is expected to provide cost_weights.F
106 #endif
107 _END_MASTER( mythid )
108
109 _BARRIER
110
111 end

  ViewVC Help
Powered by ViewVC 1.1.22