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

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

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

revision 1.9 by heimbach, Tue Jan 4 22:02:31 2005 UTC revision 1.10 by heimbach, Wed Jan 12 23:39:39 2005 UTC
# Line 69  c     == local variables == Line 69  c     == local variables ==
69        character*(128)   cfile        character*(128)   cfile
70        character*(80) weightname        character*(80) weightname
71    
 #ifdef CTRL_DELZNORM  
72        _RL delZnorm        _RL delZnorm
 #endif  
73        integer reclen, irectrue        integer reclen, irectrue
74        integer cunit2, cunit3        integer cunit2, cunit3
75        character*(80) cfile2, cfile3        character*(80) cfile2, cfile3
# Line 150  c--   Only the master thread will do I/O Line 148  c--   Only the master thread will do I/O
148    
149           reclen = FLOAT(snx*nsx*npx*sny*nsy*npy*4)           reclen = FLOAT(snx*nsx*npx*sny*nsy*npy*4)
150           call mdsfindunit( cunit2, mythid )           call mdsfindunit( cunit2, mythid )
151           open( cunit2, file=cfile2, status='new',           open( cunit2, file=cfile2, status='unknown',
152       &        access='direct', recl=reclen )       &        access='direct', recl=reclen )
153           call mdsfindunit( cunit3, mythid )           call mdsfindunit( cunit3, mythid )
154           open( cunit3, file=cfile3, status='new',           open( cunit3, file=cfile3, status='unknown',
155       &        access='direct', recl=reclen )       &        access='direct', recl=reclen )
156        endif        endif
157    
# Line 183  c--   Only the master thread will do I/O Line 181  c--   Only the master thread will do I/O
181           read(cunit) filei           read(cunit) filei
182           do k = 1, Nr           do k = 1, Nr
183           irectrue = (irec-1)*nr + k           irectrue = (irec-1)*nr + k
184                if ( doZscaleUnpack ) then
185                   delZnorm = SQRT(delR(1)/delR(k))
186                else
187                   delZnorm = 1. _d 0
188                endif
189              cbuffindex = nwetglobal(k)              cbuffindex = nwetglobal(k)
190              if ( cbuffindex .gt. 0 ) then              if ( cbuffindex .gt. 0 ) then
191                 read(cunit) filencbuffindex                 read(cunit) filencbuffindex
# Line 214  cph( Line 217  cph(
217  cph)  cph)
218  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO  #ifdef ALLOW_NONDIMENSIONAL_CONTROL_IO
219                       if ( lxxadxx ) then                       if ( lxxadxx ) then
220                          globfld3d(i,bi,ip,j,bj,jp,k) =                          globfld3d(i,bi,ip,j,bj,jp,k) = delZnorm
221       &                       globfld3d(i,bi,ip,j,bj,jp,k)       &                       * globfld3d(i,bi,ip,j,bj,jp,k)
222  # ifdef CTRL_UNPACK_PRECISE  # ifdef CTRL_UNPACK_PRECISE
223       &                    / sqrt(weightfld3d(i,bi,ip,j,bj,jp,k))       &                       / sqrt(weightfld3d(i,bi,ip,j,bj,jp,k))
224  # else  # else
225       &                    / sqrt(weightfld(k,bi,bj))       &                       / sqrt(weightfld(k,bi,bj))
226  # endif  # endif
227                       else                       else
228                          globfld3d(i,bi,ip,j,bj,jp,k) =                          globfld3d(i,bi,ip,j,bj,jp,k) = delZnorm
229       &                       globfld3d(i,bi,ip,j,bj,jp,k)       &                       * globfld3d(i,bi,ip,j,bj,jp,k)
230  # ifdef CTRL_UNPACK_PRECISE  # ifdef CTRL_UNPACK_PRECISE
231       &                       * sqrt(weightfld3d(i,bi,ip,j,bj,jp,k))       &                       * sqrt(weightfld3d(i,bi,ip,j,bj,jp,k))
232  # else  # else

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22