/[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.7 - (hide annotations) (download)
Thu Nov 6 22:05:08 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint54d_post, checkpoint54e_post, checkpoint52l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint54f_post, checkpoint55i_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint55c_post, checkpoint52e_pre, checkpoint52e_post, checkpoint53d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint52m_post, checkpoint55g_post, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint55a_post, checkpoint53b_post, checkpoint52a_post, ecco_c52_e35, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51u_post
Branch point for: netcdf-sm0
Changes since 1.6: +1 -3 lines
o merging from ecco-branch
o cleaned some cross-dependencies and updated CPP options

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

  ViewVC Help
Powered by ViewVC 1.1.22