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

Diff of /MITgcm/pkg/ctrl/ctrl_set_globfld_xy.F

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

revision 1.3 by heimbach, Mon Sep 16 18:11:58 2002 UTC revision 1.4 by heimbach, Tue Jun 24 16:07:07 2003 UTC
# Line 12  c     o initialise field Line 12  c     o initialise field
12  c  c
13  c     started: heimbach@mit.edu, 16-Aug-2001  c     started: heimbach@mit.edu, 16-Aug-2001
14  c  c
15    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  c     ==================================================================  c     ==================================================================
21    
22        implicit none        implicit none
# Line 44  c     == local variables == Line 49  c     == local variables ==
49    
50        integer bi,bj        integer bi,bj
51        integer ip,jp        integer ip,jp
52        integer i,j        integer i,j,k
53        integer itlo,ithi        integer itlo,ithi
54        integer jtlo,jthi        integer jtlo,jthi
55        integer jmin,jmax        integer jmin,jmax
56        integer imin,imax        integer imin,imax
57        integer irec        integer irec,nrec_nl
58    
59        _RL     globfld2d( snx,nsx,npx,sny,nsy,npy )        _RL     globfld2d( snx,nsx,npx,sny,nsy,npy )
60          _RL     globfld3d( snx,nsx,npx,sny,nsy,npy,nr )
61    
62  c     == external ==  c     == external ==
63    
# Line 73  c     Initialise temporary file Line 79  c     Initialise temporary file
79                 do ip = 1,nPx                 do ip = 1,nPx
80                    do bi = itlo,ithi                    do bi = itlo,ithi
81                       do i = imin,imax                       do i = imin,imax
 #ifdef ALLOW_TANGENTLINEAR_RUN  
                         globfld2d(i,bi,ip,j,bj,jp) = 0. _d 0  
 #else  
82                          globfld2d(i,bi,ip,j,bj,jp) = 0. _d 0                          globfld2d(i,bi,ip,j,bj,jp) = 0. _d 0
83  #endif                       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                       enddo                       enddo
100                    enddo                    enddo
101                 enddo                 enddo
# Line 92  c     Initialise temporary file Line 110  c     Initialise temporary file
110  c--   Only the master thread will do I/O.  c--   Only the master thread will do I/O.
111        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
112    
113        do irec = 1, ncvarrecs(ivartype)        nrec_nl=int(ncvarrecs(ivartype)/Nr)
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*Nr+1, ncvarrecs(ivartype)
121           call MDSWRITEFIELD_2D_GL( fname, ctrlprec, 'RL',           call MDSWRITEFIELD_2D_GL( fname, ctrlprec, 'RL',
122       &        1, globfld2d,       &        1, globfld2d,
123       &        irec,   optimcycle,  mythid)       &        irec,   optimcycle,  mythid)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22