/[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.8 by mlosch, Tue May 10 07:53:24 2011 UTC revision 1.11 by gforget, Tue May 26 22:54:09 2015 UTC
# Line 1  Line 1 
1    
2    #ifdef ALLOW_OBCS
3    c Include ECCO_CPPOPTIONS because ecco,ctrl,cost files have headers with options for OBCS masks.
4    # include "ECCO_CPPOPTIONS.h"
5    #else
6    # include "CTRL_OPTIONS.h"
7    #endif
8    
9        subroutine optim_writedata(        subroutine optim_writedata(
10       I                       nn,       I                       nn,
11       I                       dfile,       I                       dfile,
# Line 30  c     == global variables == Line 37  c     == global variables ==
37    
38  #include "EEPARAMS.h"  #include "EEPARAMS.h"
39  #include "SIZE.h"  #include "SIZE.h"
 cgg   Include ECCO_CPPOPTIONS because the ecco_ctrl,cost files have headers with  
 cgg   options for OBCS masks.  
 #include "ECCO_CPPOPTIONS.h"  
   
40  #include "ctrl.h"  #include "ctrl.h"
41  #include "optim.h"  #include "optim.h"
42  #include "minimization.h"  #include "minimization.h"
# Line 184  c--         Write the data. Line 187  c--         Write the data.
187        do icvar = 1,maxcvars        do icvar = 1,maxcvars
188           if ( ncvarindex(icvar) .ne. -1 ) then           if ( ncvarindex(icvar) .ne. -1 ) then
189              do icvrec = 1,ncvarrecs(icvar)              do icvrec = 1,ncvarrecs(icvar)
190                 do bj = 1,nsy  cph               do bj = 1,nsy
191                    do bi = 1,nsx  cph                  do bi = 1,nsx
192                       write( funit ) ncvarindex(icvar)                       write( funit ) ncvarindex(icvar)
193                       write( funit ) bj                       write( funit ) bj
194                       write( funit ) bi                       write( funit ) bi
# Line 234  cgg) Line 237  cgg)
237                          if (cbuffindex .gt. 0) then                          if (cbuffindex .gt. 0) then
238                             do icvcomp = 1,cbuffindex                             do icvcomp = 1,cbuffindex
239                                cbuff(icvcomp) = vv(icvoffset + icvcomp)                                cbuff(icvcomp) = vv(icvoffset + icvcomp)
240  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
241  cgg( The model will crash due to physical reasons.  c     uncomment the next two lines.
242  cgg( However, we can optimize with respect to just O.B. T and S if the  c                              if (iobcs .eq. 3) cbuff(icvcomp)=0.
243  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.  
244                             enddo                             enddo
245                             write( funit ) cbuffindex                             write( funit ) cbuffindex
246                             write( funit ) k                             write( funit ) k
# Line 247  cgg                              if (iob Line 248  cgg                              if (iob
248                             icvoffset = icvoffset + cbuffindex                             icvoffset = icvoffset + cbuffindex
249                          endif                          endif
250                       enddo                       enddo
251                    enddo  cph                  enddo
252                 enddo  cph               enddo
253              enddo              enddo
254           endif           endif
255        enddo        enddo

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

  ViewVC Help
Powered by ViewVC 1.1.22