/[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.2 - (hide annotations) (download)
Mon Nov 17 22:32:33 2003 UTC (20 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint54a_post, checkpoint53c_post, checkpoint55d_pre, checkpoint55j_post, hrcube_1, branch-netcdf, checkpoint52d_pre, checkpoint52l_post, checkpoint55h_post, checkpoint52k_post, checkpoint52b_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint54d_post, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint54, checkpoint54f_post, checkpoint53b_post, checkpoint55g_post, checkpoint55f_post, checkpoint55i_post, checkpoint53, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, hrcube5, checkpoint55e_post, checkpoint52i_post, checkpoint52j_pre, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint52i_pre, checkpoint52h_pre, checkpoint52f_pre, hrcube_2, hrcube_3, checkpoint55d_post
Branch point for: netcdf-sm0
Changes since 1.1: +26 -20 lines
fixes for DIVA

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

  ViewVC Help
Powered by ViewVC 1.1.22