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

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

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

revision 1.6 by heimbach, Thu Oct 30 19:09:06 2003 UTC revision 1.7 by heimbach, Thu Nov 6 22:05:08 2003 UTC
# Line 1  Line 1 
 C  
 C $Header$  
 C $Name$  
1    
2  #include "CTRL_CPPOPTIONS.h"  #include "CTRL_CPPOPTIONS.h"
3    
   
4        subroutine ctrl_set_unpack_xz(        subroutine ctrl_set_unpack_xz(
5       &     cunit, ivartype, fname, masktype, weighttype,       &     cunit, ivartype, fname, masktype, weighttype,
6       &     weightfld, nwetglobal, mythid)       &     weightfld, nwetglobal, mythid)
# Line 35  c     == global variables == Line 31  c     == global variables ==
31  #include "GRID.h"  #include "GRID.h"
32    
33  #include "ctrl.h"  #include "ctrl.h"
 #include "cost.h"  
34    
35  #ifdef ALLOW_ECCO_OPTIMIZATION  #ifdef ALLOW_ECCO_OPTIMIZATION
36  #include "optim.h"  #include "optim.h"
# Line 71  c     == local variables == Line 66  c     == local variables ==
66    
67        integer cbuffindex        integer cbuffindex
68    
69        _RL     cbuff    ( snx*nsx*npx*nsy*npy )        real*4     cbuff    ( snx*nsx*npx*nsy*npy )
70        _RL     globfldxz( snx,nsx,npx,nsy,npy,nr )        _RL     globfldxz( snx,nsx,npx,nsy,npy,nr )
71        _RL     globfld3d( snx,nsx,npx,sny,nsy,npy,nr )        _RL     globfld3d( snx,nsx,npx,sny,nsy,npy,nr )
72        _RL     globmskxz( snx,nsx,npx,nsy,npy,nr,nobcs )        _RL     globmskxz( snx,nsx,npx,nsy,npy,nr,nobcs )
# Line 225  cgg       And now back-calculate what io Line 220  cgg       And now back-calculate what io
220                    read(cunit) (cbuff(ii), ii=1,cbuffindex)                    read(cunit) (cbuff(ii), ii=1,cbuffindex)
221                 endif                 endif
222                 cbuffindex = 0                 cbuffindex = 0
223                   jj=mod((j-1)*nr+k-1,sny)+1
224                   kk=int((j-1)*nr+k-1)/sny+1
225                 do jp = 1,nPy                 do jp = 1,nPy
226                  do bj = jtlo,jthi                  do bj = jtlo,jthi
227                   do ip = 1,nPx                   do ip = 1,nPx
# Line 232  cgg       And now back-calculate what io Line 229  cgg       And now back-calculate what io
229                     do i = imin,imax                     do i = imin,imax
230                      if ( globmskxz(i,bi,ip,bj,jp,k,iobcs) .ne. 0. ) then                      if ( globmskxz(i,bi,ip,bj,jp,k,iobcs) .ne. 0. ) then
231                         cbuffindex = cbuffindex + 1                         cbuffindex = cbuffindex + 1
                        jj=mod((j-1)*nr+k-1,sny)+1  
                        kk=int((j-1)*nr+k-1)/sny+1  
232                         globfld3d(i,bi,ip,jj,bj,jp,kk) =                         globfld3d(i,bi,ip,jj,bj,jp,kk) =
233       &                      cbuff(cbuffindex)       &                      cbuff(cbuffindex)
234  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22