/[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.7 by dfer, Tue Jan 15 16:36:32 2008 UTC revision 1.10 by heimbach, Fri Jun 1 16:13:56 2012 UTC
# Line 151  c--   Write the header. Line 151  c--   Write the header.
151  #ifdef ALLOW_CTRL_WETV  #ifdef ALLOW_CTRL_WETV
152        write( funit ) (nWetvGlobal(k), k=1,nr)        write( funit ) (nWetvGlobal(k), k=1,nr)
153  #endif  #endif
154    #ifdef ALLOW_SHIFWFLX_CONTROL
155          write(funit) (nWetiGlobal(k),   k=1,nr)
156    c     write(funit) nWetiGlobal(1)
157    #endif
158    
159  cgg(    Add OBCS Mask information into the header section for optimization.  cgg(    Add OBCS Mask information into the header section for optimization.
160  #ifdef ALLOW_OBCSN_CONTROL  #ifdef ALLOW_OBCSN_CONTROL
# Line 180  c--         Write the data. Line 184  c--         Write the data.
184        do icvar = 1,maxcvars        do icvar = 1,maxcvars
185           if ( ncvarindex(icvar) .ne. -1 ) then           if ( ncvarindex(icvar) .ne. -1 ) then
186              do icvrec = 1,ncvarrecs(icvar)              do icvrec = 1,ncvarrecs(icvar)
187                 do bj = 1,nsy  cph               do bj = 1,nsy
188                    do bi = 1,nsx  cph                  do bi = 1,nsx
189                       write( funit ) ncvarindex(icvar)                       write( funit ) ncvarindex(icvar)
190                       write( funit ) bj                       write( funit ) bj
191                       write( funit ) bi                       write( funit ) bi
# Line 195  c--         Write the data. Line 199  c--         Write the data.
199                             cbuffindex = nWetwGlobal(k)                             cbuffindex = nWetwGlobal(k)
200                          else if (ncvargrd(icvar) .eq. 'v') then                          else if (ncvargrd(icvar) .eq. 'v') then
201                             cbuffindex = nWetvGlobal(k)                             cbuffindex = nWetvGlobal(k)
202    #ifdef ALLOW_SHIFWFLX_CONTROL
203                            else if (ncvargrd(icvar) .eq. 'i') then
204                               cbuffindex = nWetiGlobal(k)
205    #endif
206  cgg(   O.B. points have the grid mask "m".  cgg(   O.B. points have the grid mask "m".
207                          else if (ncvargrd(icvar) .eq. 'm') then                          else if (ncvargrd(icvar) .eq. 'm') then
208  cgg    From "icvrec", calculate what iobcs must be.  cgg    From "icvrec", calculate what iobcs must be.
# Line 227  cgg) Line 234  cgg)
234                          if (cbuffindex .gt. 0) then                          if (cbuffindex .gt. 0) then
235                             do icvcomp = 1,cbuffindex                             do icvcomp = 1,cbuffindex
236                                cbuff(icvcomp) = vv(icvoffset + icvcomp)                                cbuff(icvcomp) = vv(icvoffset + icvcomp)
237  cgg( Right now, the changes to the open boundary velocities are not balanced.  c     If you want to optimize with respect to just O.B. T and S
238  cgg( The model will crash due to physical reasons.  c     uncomment the next two lines.
239  cgg( However, we can optimize with respect to just O.B. T and S if the  c                              if (iobcs .eq. 3) cbuff(icvcomp)=0.
240  cgg( next two lines are uncommented.  c                              if (iobcs .eq. 4) cbuff(icvcomp)=0.
 cgg                              if (iobcs .eq. 3) cbuff(icvcomp)=0.  
 cgg                              if (iobcs .eq. 4) cbuff(icvcomp)=0.  
241                             enddo                             enddo
242                             write( funit ) cbuffindex                             write( funit ) cbuffindex
243                             write( funit ) k                             write( funit ) k
# Line 240  cgg                              if (iob Line 245  cgg                              if (iob
245                             icvoffset = icvoffset + cbuffindex                             icvoffset = icvoffset + cbuffindex
246                          endif                          endif
247                       enddo                       enddo
248                    enddo  cph                  enddo
249                 enddo  cph               enddo
250              enddo              enddo
251           endif           endif
252        enddo        enddo

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

  ViewVC Help
Powered by ViewVC 1.1.22