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

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

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

revision 1.11 by heimbach, Thu Jun 14 18:55:36 2007 UTC revision 1.12 by jmc, Tue Oct 9 00:00:01 2007 UTC
# Line 1  Line 1 
1    C $Header$
2    C $Name$
3    
4  #include "CTRL_CPPOPTIONS.h"  #include "CTRL_CPPOPTIONS.h"
5    
# Line 174  cgg      And now back-calculate what iob Line 176  cgg      And now back-calculate what iob
176              read(cunit) filej              read(cunit) filej
177              read(cunit) filei              read(cunit) filei
178              do k = 1, Nr              do k = 1, Nr
179                 cbuffindex = nwetglobal(k,iobcs)                 cbuffindex = nwetglobal(k,iobcs)
180                 if ( cbuffindex .gt. 0 ) then                 if ( cbuffindex .gt. 0 ) then
181                    read(cunit) filencbuffindex                    read(cunit) filencbuffindex
182                    if (filencbuffindex .NE. cbuffindex) then                    if (filencbuffindex .NE. cbuffindex) then
# Line 201  cgg      And now back-calculate what iob Line 203  cgg      And now back-calculate what iob
203                      kk=int((i-1)*nr*sny+(k-1)*sny+j-1)/(snx*sny)+1                      kk=int((i-1)*nr*sny+(k-1)*sny+j-1)/(snx*sny)+1
204                      if ( globmskyz(bi,ip,j,bj,jp,k,iobcs) .ne. 0. ) then                      if ( globmskyz(bi,ip,j,bj,jp,k,iobcs) .ne. 0. ) then
205                         cbuffindex = cbuffindex + 1                         cbuffindex = cbuffindex + 1
206                         globfld3d(ii,bi,ip,jj,bj,jp,kk) =                         globfld3d(ii,bi,ip,jj,bj,jp,kk) =
207       &                      cbuff(cbuffindex)       &                      cbuff(cbuffindex)
208  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO
209                         globfld3d(ii,bi,ip,jj,bj,jp,kk) =                         globfld3d(ii,bi,ip,jj,bj,jp,kk) =
210       &                      globfld3d(ii,bi,ip,jj,bj,jp,kk)/       &                      globfld3d(ii,bi,ip,jj,bj,jp,kk)/
211  # ifdef CTRL_UNPACK_PRECISE  # ifdef CTRL_UNPACK_PRECISE
212       &                      sqrt(weightfldyz(bi,ip,j,bj,jp,k,iobcs))       &                      sqrt(weightfldyz(bi,ip,j,bj,jp,k,iobcs))
# Line 248  c     -- end of irec loop -- Line 250  c     -- end of irec loop --
250           read(cunit) filej           read(cunit) filej
251           read(cunit) filei           read(cunit) filei
252           do k = 1, Nr           do k = 1, Nr
253              cbuffindex = nwetglobal(k,iobcs)              cbuffindex = nwetglobal(k,iobcs)
254              if ( cbuffindex .gt. 0 ) then              if ( cbuffindex .gt. 0 ) then
255                 read(cunit) filencbuffindex                 read(cunit) filencbuffindex
256                 if (filencbuffindex .NE. cbuffindex) then                 if (filencbuffindex .NE. cbuffindex) then
# Line 274  c     -- end of irec loop -- Line 276  c     -- end of irec loop --
276                       cbuffindex = cbuffindex + 1                       cbuffindex = cbuffindex + 1
277                       globfldyz(bi,ip,j,bj,jp,k) = cbuff(cbuffindex)                       globfldyz(bi,ip,j,bj,jp,k) = cbuff(cbuffindex)
278  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO
279                       globfldyz(bi,ip,j,bj,jp,k) =                       globfldyz(bi,ip,j,bj,jp,k) =
280       &                    globfldyz(bi,ip,j,bj,jp,k)/       &                    globfldyz(bi,ip,j,bj,jp,k)/
281  # ifdef CTRL_UNPACK_PRECISE  # ifdef CTRL_UNPACK_PRECISE
282       &                    sqrt(weightfldyz(bi,ip,j,bj,jp,k,iobcs))       &                    sqrt(weightfldyz(bi,ip,j,bj,jp,k,iobcs))
# Line 293  c     -- end of irec loop -- Line 295  c     -- end of irec loop --
295  c  c
296  c     -- end of k loop  c     -- end of k loop
297           enddo           enddo
298                
299           call MDSWRITEFIELD_YZ_GL( fname, ctrlprec, 'RL',           call MDSWRITEFIELD_YZ_GL( fname, ctrlprec, 'RL',
300       &                             Nr, globfldyz, irec,       &                             Nr, globfldyz, irec,
301       &                             optimcycle, mythid)       &                             optimcycle, mythid)

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22