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

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

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


Revision 1.4 - (hide annotations) (download)
Tue Jun 24 16:07:07 2003 UTC (20 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51l_post, checkpoint51, checkpoint51f_post, checkpoint51d_post, checkpoint51j_post, checkpoint51l_pre, checkpoint51b_pre, checkpoint51h_pre, branchpoint-genmake2, checkpoint51i_post, checkpoint51b_post, checkpoint51c_post, checkpoint51i_pre, checkpoint51e_post, checkpoint51f_pre, checkpoint51g_post, checkpoint51m_post, checkpoint51a_post
Branch point for: branch-genmake2, tg2-branch
Changes since 1.3: +31 -6 lines
Merging for c51 vs. e34

1 heimbach 1.2 #include "CTRL_CPPOPTIONS.h"
2    
3    
4     subroutine ctrl_set_globfld_yz(
5     I fname, ivartype, mythid )
6    
7     c ==================================================================
8     c SUBROUTINE ctrl_set_globfld_yz
9     c ==================================================================
10     c
11     c o initialise field
12     c
13     c started: heimbach@mit.edu, 16-Aug-2001
14     c
15 heimbach 1.4 c changed: heimbach@mit.edu 17-Jun-2003
16     c merged Armin's changes to replace write of
17     c nr * globfld2d by 1 * globfld3d
18     c (ad hoc fix to speed up global I/O)
19     c
20 heimbach 1.2 c ==================================================================
21    
22     implicit none
23    
24     c == global variables ==
25    
26     #include "EEPARAMS.h"
27     #include "SIZE.h"
28     #include "PARAMS.h"
29     #include "GRID.h"
30    
31     #include "ctrl.h"
32     #include "cost.h"
33    
34     #ifdef ALLOW_ECCO_OPTIMIZATION
35     #include "optim.h"
36     #endif
37    
38     c == routine arguments ==
39    
40     character*( 80) fname
41     integer ivartype
42     integer mythid
43    
44     c == local variables ==
45    
46     #ifndef ALLOW_ECCO_OPTIMIZATION
47     integer optimcycle
48     #endif
49    
50     integer bi,bj
51     integer ip,jp
52     integer i,j,k
53     integer itlo,ithi
54     integer jtlo,jthi
55     integer jmin,jmax
56     integer imin,imax
57 heimbach 1.4 integer irec,nrec_nl
58 heimbach 1.2
59     _RL globfldyz( nsx,npx,sny,nsy,npy,nr )
60 heimbach 1.4 _RL globfld3d( snx,nsx,npx,sny,nsy,npy,nr )
61 heimbach 1.2
62     c == external ==
63    
64     c == end of interface ==
65    
66     jtlo = 1
67     jthi = nsy
68     itlo = 1
69     ithi = nsx
70     jmin = 1
71     jmax = sny
72     imin = 1
73     imax = snx
74    
75     c Initialise temporary file
76     do k = 1,nr
77     do jp = 1,nPy
78     do bj = jtlo,jthi
79     do j = jmin,jmax
80     do ip = 1,nPx
81     do bi = itlo,ithi
82 heimbach 1.3 globfldyz(bi,ip,j,bj,jp,k) = 0. _d 0
83 heimbach 1.4 enddo
84     enddo
85     enddo
86     enddo
87     enddo
88     enddo
89     c Initialise temporary file
90     do k = 1,nr
91     do jp = 1,nPy
92     do bj = jtlo,jthi
93     do j = jmin,jmax
94     do ip = 1,nPx
95     do bi = itlo,ithi
96     do i = imin,imax
97     globfld3d(i,bi,ip,j,bj,jp,k) = 0. _d 0
98     enddo
99 heimbach 1.2 enddo
100     enddo
101     enddo
102     enddo
103     enddo
104     enddo
105    
106     #ifndef ALLOW_ECCO_OPTIMIZATION
107     optimcycle = 0
108     #endif
109    
110     c-- Only the master thread will do I/O.
111     _BEGIN_MASTER( mythid )
112    
113 heimbach 1.4 nrec_nl=int(ncvarrecs(ivartype)/snx)
114     do irec = 1, nrec_nl
115     call MDSWRITEFIELD_3D_GL( fname, ctrlprec, 'RL',
116     & Nr, globfld3d,
117     & irec, optimcycle, mythid)
118     enddo
119    
120     do irec = nrec_nl*snx+1, ncvarrecs(ivartype)
121 heimbach 1.2 call MDSWRITEFIELD_YZ_GL( fname, ctrlprec, 'RL',
122     & Nr, globfldyz,
123     & irec, optimcycle, mythid)
124     enddo
125    
126     _END_MASTER( mythid )
127    
128     end

  ViewVC Help
Powered by ViewVC 1.1.22