/[MITgcm]/MITgcm/optim/optim_writedata.F
ViewVC logotype

Diff of /MITgcm/optim/optim_writedata.F

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

revision 1.2 by heimbach, Fri Nov 15 04:03:25 2002 UTC revision 1.6 by mlosch, Fri Dec 3 01:06:33 2004 UTC
# Line 62  c     == local variables == Line 62  c     == local variables ==
62        integer funit        integer funit
63        integer cbuffindex        integer cbuffindex
64    
65        _RL     cbuff( sNx*nSx*nPx*sNy*nSy*nPy )        real*4 cbuff( sNx*nSx*nPx*sNy*nSy*nPy )
66    
67        character*(128) fname        character*(128) fname
68  cgg(  cgg(
# Line 114  cph( Line 114  cph(
114           print *, 'pathei: nsx ', nsx           print *, 'pathei: nsx ', nsx
115           print *, 'pathei: nsy ', nsy           print *, 'pathei: nsy ', nsy
116                    
117           print *, 'pathei: nWetcTile ',           print *, 'pathei: nWetcGlobal ',
118       &        (((nWetcTile(i,j,k), i=1,nsx), j=1,nsy), k=1,nr)       &        (nWetcGlobal(k), k=1,nr)
119           print *, 'pathei: nWetsTile ',           print *, 'pathei: nWetsGlobal ',
120       &        (((nWetsTile(i,j,k), i=1,nsx), j=1,nsy), k=1,nr)       &        (nWetsGlobal(k), k=1,nr)
121           print *, 'pathei: nWetwTile ',           print *, 'pathei: nWetwGlobal ',
122       &        (((nWetwTile(i,j,k), i=1,nsx), j=1,nsy), k=1,nr)       &        (nWetwGlobal(k), k=1,nr)
123             print *, 'pathei: nWetvGlobal ',
124         &        (nWetvGlobal(k), k=1,nr)
125           print *, 'pathei: ncvarindex ',           print *, 'pathei: ncvarindex ',
126       &        (ncvarindex(i), i=1,maxcvars)       &        (ncvarindex(i), i=1,maxcvars)
127           print *, 'pathei: ncvarrecs ',           print *, 'pathei: ncvarrecs ',
# Line 144  c--   Write the header. Line 146  c--   Write the header.
146        write( funit ) bjg        write( funit ) bjg
147        write( funit ) nsx        write( funit ) nsx
148        write( funit ) nsy        write( funit ) nsy
149        write( funit ) (((nWetcTile(i,j,k), i=1,nsx), j=1,nsy),        write( funit ) (nWetcGlobal(k), k=1,nr)
150       &     k=1,nr)        write( funit ) (nWetsGlobal(k), k=1,nr)
151        write( funit ) (((nWetsTile(i,j,k), i=1,nsx), j=1,nsy),        write( funit ) (nWetwGlobal(k), k=1,nr)
152       &     k=1,nr)  #ifdef ALLOW_CTRL_WETV
153        write( funit ) (((nWetwTile(i,j,k), i=1,nsx), j=1,nsy),        write( funit ) (nWetvGlobal(k), k=1,nr)
154       &     k=1,nr)  #endif
155    
156  cgg(    Add OBCS Mask information into the header section for optimization.  cgg(    Add OBCS Mask information into the header section for optimization.
157  #ifdef ALLOW_OBCSN_CONTROL  #ifdef ALLOW_OBCSN_CONTROL
158            write(funit) ((((nWetobcsn(i,j,k,iobcs), k=1,nr),            write(funit) ((nWetobcsnGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
      &          iobcs= 1,nobcs), i=1,nsx) , j=1,nsy)  
159  #endif  #endif
160  #ifdef ALLOW_OBCSS_CONTROL  #ifdef ALLOW_OBCSS_CONTROL
161            write(funit) ((((nWetobcss(i,j,k,iobcs), k=1,nr),            write(funit) ((nWetobcssGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
      &          iobcs= 1,nobcs), i=1,nsx) , j=1,nsy)  
162  #endif  #endif
163  #ifdef ALLOW_OBCSW_CONTROL  #ifdef ALLOW_OBCSW_CONTROL
164            write(funit) ((((nWetobcsw(i,j,k,iobcs), k=1,nr),            write(funit) ((nWetobcswGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
      &          iobcs= 1,nobcs), i=1,nsx) , j=1,nsy)  
165  #endif  #endif
166  #ifdef ALLOW_OBCSE_CONTROL  #ifdef ALLOW_OBCSE_CONTROL
167            write(funit) ((((nWetobcse(i,j,k,iobcs), k=1,nr),            write(funit) ((nWetobcseGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
      &          iobcs= 1,nobcs), i=1,nsx) , j=1,nsy)  
168  #endif  #endif
169  cgg)  cgg)
170    
# Line 183  c--         Write the data. Line 181  c--         Write the data.
181        do icvar = 1,maxcvars        do icvar = 1,maxcvars
182           if ( ncvarindex(icvar) .ne. -1 ) then           if ( ncvarindex(icvar) .ne. -1 ) then
183              do icvrec = 1,ncvarrecs(icvar)              do icvrec = 1,ncvarrecs(icvar)
 cph(  
                print *,'in owd: icvar, icvrec, ncvarrecs, ncvarindex',  
      &              icvar, icvrec, ncvarrecs(icvar), ncvarindex(icvar)  
 cph)  
184                 do bj = 1,nsy                 do bj = 1,nsy
185                    do bi = 1,nsx                    do bi = 1,nsx
186                       write( funit ) ncvarindex(icvar)                       write( funit ) ncvarindex(icvar)
# Line 195  cph) Line 189  cph)
189                       do k = 1,ncvarnrmax(icvar)                       do k = 1,ncvarnrmax(icvar)
190                          cbuffindex = 0                          cbuffindex = 0
191                          if (ncvargrd(icvar) .eq. 'c') then                          if (ncvargrd(icvar) .eq. 'c') then
192                             cbuffindex = nwetctile(bi,bj,k)                             cbuffindex = nWetcGlobal(k)
193                          else if (ncvargrd(icvar) .eq. 's') then                          else if (ncvargrd(icvar) .eq. 's') then
194                             cbuffindex = nwetstile(bi,bj,k)                             cbuffindex = nWetsGlobal(k)
195                          else if (ncvargrd(icvar) .eq. 'w') then                          else if (ncvargrd(icvar) .eq. 'w') then
196                             cbuffindex = nwetwtile(bi,bj,k)                             cbuffindex = nWetwGlobal(k)
197                            else if (ncvargrd(icvar) .eq. 'v') then
198                               cbuffindex = nWetvGlobal(k)
199    
200  cgg(   O.B. points have the grid mask "m".  cgg(   O.B. points have the grid mask "m".
201                          else if (ncvargrd(icvar) .eq. 'm') then                          else if (ncvargrd(icvar) .eq. 'm') then
# Line 209  cgg    From "icvrec", calculate what iob Line 205  cgg    From "icvrec", calculate what iob
205                            iobcs= icvrec - igg*nobcs                            iobcs= icvrec - igg*nobcs
206  #ifdef ALLOW_OBCSN_CONTROL  #ifdef ALLOW_OBCSN_CONTROL
207                            if (icvar .eq. 11) then                                                if (icvar .eq. 11) then                    
208                               cbuffindex = nwetobcsn(bi,bj,k,iobcs)                               cbuffindex = nWetobcsnGlo(k,iobcs)
209                            endif                            endif
210  #endif  #endif
211  #ifdef ALLOW_OBCSS_CONTROL  #ifdef ALLOW_OBCSS_CONTROL
212                            if (icvar .eq. 12) then                            if (icvar .eq. 12) then
213                               cbuffindex = nwetobcss(bi,bj,k,iobcs)                               cbuffindex = nWetobcssGlo(k,iobcs)
214                            endif                            endif
215  #endif  #endif
216  #ifdef ALLOW_OBCSW_CONTROL  #ifdef ALLOW_OBCSW_CONTROL
217                            if (icvar .eq. 13) then                            if (icvar .eq. 13) then
218                               cbuffindex = nwetobcsw(bi,bj,k,iobcs)                               cbuffindex = nWetobcswGlo(k,iobcs)
219                            endif                            endif
220  #endif  #endif
221  #ifdef ALLOW_OBCSE_CONTROL  #ifdef ALLOW_OBCSE_CONTROL
222                            if (icvar .eq. 14) then                            if (icvar .eq. 14) then
223                               cbuffindex = nwetobcse(bi,bj,k,iobcs)                               cbuffindex = nWetobcseGlo(k,iobcs)
224                            endif                            endif
225  #endif  #endif
226                          endif                          endif

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

  ViewVC Help
Powered by ViewVC 1.1.22