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

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

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


Revision 1.6 - (hide annotations) (download)
Tue Nov 1 04:09:46 2005 UTC (18 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, checkpoint58u_post, checkpoint58w_post, checkpoint60, checkpoint61, checkpoint58r_post, checkpoint57y_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint58a_post, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint58b_post, checkpoint58m_post
Changes since 1.5: +5 -5 lines
Completely restructured the arpack2model interface.
Now (again) only 1-d wetpoint vector is passed to ARPACK.
ctrl_unpack/pack are mimiced by admtlm_dsvd2model/model2dsvd

1 heimbach 1.6 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_init_ctrlvar.F,v 1.5 2005/10/26 21:39:10 heimbach Exp $
2 heimbach 1.1 C $Name: $
3    
4     #include "CTRL_CPPOPTIONS.h"
5    
6     subroutine ctrl_init_ctrlvar(
7     & xx_fname
8     & , ivarindex
9     & , ncvarindex_loc
10     & , ncvarrecs_loc
11     & , ncvarrecstart_loc
12     & , ncvarrecsend_loc
13     & , ncvarxmax_loc
14     & , ncvarymax_loc
15     & , ncvarnrmax_loc
16     & , ncvargrd_loc
17     & , whichxyz
18     & , mythid
19     & )
20    
21     c ==================================================================
22     c SUBROUTINE ctrl_init_ctrlvar
23     c ==================================================================
24     c
25     c started: heimbach@mit.edu 28-Oct-2003
26     c
27     c ==================================================================
28     c SUBROUTINE ctrl_init_ctrlvar
29     c ==================================================================
30    
31     implicit none
32    
33     c == global variables ==
34    
35     #include "EEPARAMS.h"
36     #include "SIZE.h"
37     #include "PARAMS.h"
38     #include "GRID.h"
39     #include "ctrl.h"
40 heimbach 1.4 #include "optim.h"
41 heimbach 1.5 #ifdef ALLOW_MNC
42     #include "MNC_PARAMS.h"
43     #endif
44 heimbach 1.1
45     c == routine arguments ==
46     character*(MAX_LEN_FNAM) xx_fname
47     integer ivarindex
48     integer ncvarindex_loc
49     integer ncvarrecs_loc
50     integer ncvarrecstart_loc
51     integer ncvarrecsend_loc
52     integer ncvarxmax_loc
53     integer ncvarymax_loc
54     integer ncvarnrmax_loc
55     character ncvargrd_loc*1
56     character whichxyz*2
57     integer mythid
58    
59     c == local variables ==
60     character*( 80) fname(2)
61 heimbach 1.2 logical exst
62 heimbach 1.1
63     _BEGIN_MASTER( mythid )
64    
65     ncvarindex(ivarindex) = ncvarindex_loc
66     ncvarrecs (ivarindex) = ncvarrecs_loc
67     ncvarrecstart(ivarindex) = ncvarrecstart_loc
68     ncvarrecsend(ivarindex) = ncvarrecsend_loc
69     ncvarxmax (ivarindex) = ncvarxmax_loc
70     ncvarymax (ivarindex) = ncvarymax_loc
71     ncvarnrmax(ivarindex) = ncvarnrmax_loc
72     ncvargrd (ivarindex) = ncvargrd_loc
73    
74     call ctrl_set_fname( xx_fname, fname, mythid )
75    
76 heimbach 1.2 inquire( file='costfinal', exist=exst )
77     IF ( .NOT. exst) THEN
78    
79     if ( whichxyz .EQ. '3d') then
80 heimbach 1.4 if ( .NOT.doAdmTlm .OR. (doAdmTlm.AND.yadprefix.EQ.'ad') )
81     & call ctrl_set_globfld_xyz( fname(2), ivarindex, mythid)
82 heimbach 1.6 if ( ( doInitXX .AND. optimcycle.eq.0 ) .OR. doAdmTlm )
83 heimbach 1.2 & call ctrl_set_globfld_xyz( fname(1), ivarindex, mythid)
84     else if ( whichxyz .EQ. 'xy') then
85 heimbach 1.4 if ( .NOT.doAdmTlm .OR. (doAdmTlm.AND.yadprefix.EQ.'ad') )
86     & call ctrl_set_globfld_xy( fname(2), ivarindex, mythid)
87 heimbach 1.6 if ( ( doInitXX .AND. optimcycle.eq.0 ) .OR. doAdmTlm )
88 heimbach 1.2 & call ctrl_set_globfld_xy( fname(1), ivarindex, mythid )
89     else if ( whichxyz .EQ. 'xz') then
90 heimbach 1.4 if ( .NOT.doAdmTlm .OR. (doAdmTlm.AND.yadprefix.EQ.'ad') )
91     & call ctrl_set_globfld_xz( fname(2), ivarindex, mythid)
92 heimbach 1.6 if ( ( doInitXX .AND. optimcycle.eq.0 ) .OR. doAdmTlm )
93 heimbach 1.2 & call ctrl_set_globfld_xz( fname(1), ivarindex, mythid )
94     else if ( whichxyz .EQ. 'yz') then
95 heimbach 1.4 if ( .NOT.doAdmTlm .OR. (doAdmTlm.AND.yadprefix.EQ.'ad') )
96     & call ctrl_set_globfld_yz( fname(2), ivarindex, mythid)
97 heimbach 1.6 if ( ( doInitXX .AND. optimcycle.eq.0 ) .OR. doAdmTlm )
98 heimbach 1.2 & call ctrl_set_globfld_yz( fname(1), ivarindex, mythid )
99     else
100     STOP 'whichxyz option not implemented'
101     end if
102    
103 heimbach 1.5 ELSE
104    
105     c-- for DIVA, avoid rorward-related output in adjoint part
106     taveFreq = 0.
107     dumpFreq = 0.
108     pChkptFreq = 0.
109     monitorFreq = 0.
110     useDiagnostics = .FALSE.
111     #ifdef ALLOW_MNC
112     monitor_mnc=.FALSE.
113     snapshot_mnc=.FALSE.
114     timeave_mnc=.FALSE.
115     #endif
116    
117 heimbach 1.2 ENDIF
118 heimbach 1.1
119     _END_MASTER( mythid )
120    
121     return
122     end

  ViewVC Help
Powered by ViewVC 1.1.22