/[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.5 by heimbach, Wed Nov 19 19:07:02 2003 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 195  cph) Line 193  cph)
193                       do k = 1,ncvarnrmax(icvar)                       do k = 1,ncvarnrmax(icvar)
194                          cbuffindex = 0                          cbuffindex = 0
195                          if (ncvargrd(icvar) .eq. 'c') then                          if (ncvargrd(icvar) .eq. 'c') then
196                             cbuffindex = nwetctile(bi,bj,k)                             cbuffindex = nWetcGlobal(k)
197                          else if (ncvargrd(icvar) .eq. 's') then                          else if (ncvargrd(icvar) .eq. 's') then
198                             cbuffindex = nwetstile(bi,bj,k)                             cbuffindex = nWetsGlobal(k)
199                          else if (ncvargrd(icvar) .eq. 'w') then                          else if (ncvargrd(icvar) .eq. 'w') then
200                             cbuffindex = nwetwtile(bi,bj,k)                             cbuffindex = nWetwGlobal(k)
201                            else if (ncvargrd(icvar) .eq. 'v') then
202                               cbuffindex = nWetvGlobal(k)
203    
204  cgg(   O.B. points have the grid mask "m".  cgg(   O.B. points have the grid mask "m".
205                          else if (ncvargrd(icvar) .eq. 'm') then                          else if (ncvargrd(icvar) .eq. 'm') then
# Line 209  cgg    From "icvrec", calculate what iob Line 209  cgg    From "icvrec", calculate what iob
209                            iobcs= icvrec - igg*nobcs                            iobcs= icvrec - igg*nobcs
210  #ifdef ALLOW_OBCSN_CONTROL  #ifdef ALLOW_OBCSN_CONTROL
211                            if (icvar .eq. 11) then                                                if (icvar .eq. 11) then                    
212                               cbuffindex = nwetobcsn(bi,bj,k,iobcs)                               cbuffindex = nWetobcsnGlo(k,iobcs)
213                            endif                            endif
214  #endif  #endif
215  #ifdef ALLOW_OBCSS_CONTROL  #ifdef ALLOW_OBCSS_CONTROL
216                            if (icvar .eq. 12) then                            if (icvar .eq. 12) then
217                               cbuffindex = nwetobcss(bi,bj,k,iobcs)                               cbuffindex = nWetobcssGlo(k,iobcs)
218                            endif                            endif
219  #endif  #endif
220  #ifdef ALLOW_OBCSW_CONTROL  #ifdef ALLOW_OBCSW_CONTROL
221                            if (icvar .eq. 13) then                            if (icvar .eq. 13) then
222                               cbuffindex = nwetobcsw(bi,bj,k,iobcs)                               cbuffindex = nWetobcswGlo(k,iobcs)
223                            endif                            endif
224  #endif  #endif
225  #ifdef ALLOW_OBCSE_CONTROL  #ifdef ALLOW_OBCSE_CONTROL
226                            if (icvar .eq. 14) then                            if (icvar .eq. 14) then
227                               cbuffindex = nwetobcse(bi,bj,k,iobcs)                               cbuffindex = nWetobcseGlo(k,iobcs)
228                            endif                            endif
229  #endif  #endif
230                          endif                          endif

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

  ViewVC Help
Powered by ViewVC 1.1.22