--- MITgcm/optim/optim_writedata.F 2002/12/06 01:42:25 1.3 +++ MITgcm/optim/optim_writedata.F 2011/05/10 07:53:24 1.8 @@ -34,7 +34,6 @@ cgg options for OBCS masks. #include "ECCO_CPPOPTIONS.h" -#include "ecco.h" #include "ctrl.h" #include "optim.h" #include "minimization.h" @@ -62,7 +61,7 @@ integer funit integer cbuffindex - _RL cbuff( sNx*nSx*nPx*sNy*nSy*nPy ) + real*4 cbuff( sNx*nSx*nPx*sNy*nSy*nPy ) character*(128) fname cgg( @@ -97,7 +96,7 @@ c-- Generate file name and open the file. write(fname(1:128),'(4a,i4.4)') - & dfile,'_',expId(1:10),'.opt', nopt + & dfile,'_',yctrlid(1:10),'.opt', nopt open( funit, file = fname, & status = 'new', & form = 'unformatted', @@ -106,7 +105,7 @@ cph( print *, 'pathei: nvartype ', nvartype print *, 'pathei: nvarlength ', nvarlength - print *, 'pathei: expId ', expId + print *, 'pathei: yctrlid ', yctrlid print *, 'pathei: nopt ', nopt print *, 'pathei: ff ', ff print *, 'pathei: iG ', biG @@ -139,7 +138,7 @@ c-- Write the header. write( funit ) nvartype write( funit ) nvarlength - write( funit ) expId + write( funit ) yctrlid write( funit ) optimcycle write( funit ) ff write( funit ) big @@ -149,7 +148,13 @@ write( funit ) (nWetcGlobal(k), k=1,nr) write( funit ) (nWetsGlobal(k), k=1,nr) write( funit ) (nWetwGlobal(k), k=1,nr) +#ifdef ALLOW_CTRL_WETV write( funit ) (nWetvGlobal(k), k=1,nr) +#endif +#ifdef ALLOW_SHIFWFLX_CONTROL + write(funit) (nWetiGlobal(k), k=1,nr) +c write(funit) nWetiGlobal(1) +#endif cgg( Add OBCS Mask information into the header section for optimization. #ifdef ALLOW_OBCSN_CONTROL @@ -179,10 +184,6 @@ do icvar = 1,maxcvars if ( ncvarindex(icvar) .ne. -1 ) then do icvrec = 1,ncvarrecs(icvar) -cph( - print *,'in owd: icvar, icvrec, ncvarrecs, ncvarindex', - & icvar, icvrec, ncvarrecs(icvar), ncvarindex(icvar) -cph) do bj = 1,nsy do bi = 1,nsx write( funit ) ncvarindex(icvar) @@ -198,7 +199,10 @@ cbuffindex = nWetwGlobal(k) else if (ncvargrd(icvar) .eq. 'v') then cbuffindex = nWetvGlobal(k) - +#ifdef ALLOW_SHIFWFLX_CONTROL + else if (ncvargrd(icvar) .eq. 'i') then + cbuffindex = nWetiGlobal(k) +#endif cgg( O.B. points have the grid mask "m". else if (ncvargrd(icvar) .eq. 'm') then cgg From "icvrec", calculate what iobcs must be.