--- MITgcm/optim/optim_readdata.F 2002/12/06 01:42:25 1.3 +++ MITgcm/optim/optim_readdata.F 2011/07/25 08:24:38 1.9 @@ -37,7 +37,6 @@ cgg have headers with options for OBCS masks. #include "ECCO_CPPOPTIONS.h" -#include "ecco.h" #include "ctrl.h" #include "optim.h" #include "minimization.h" @@ -75,18 +74,18 @@ integer funit integer cbuffindex - _RL cbuff( sNx*nSx*nPx*sNy*nSy*nPy ) + real*4 cbuff( sNx*nSx*nPx*sNy*nSy*nPy ) character*(128) fname - integer filei - integer filej - integer filek +c integer filei +c integer filej +c integer filek +c integer fileiG +c integer filejG +c integer filensx +c integer filensy integer filenopt - integer fileig - integer filejg - integer filensx - integer filensy _RL fileff cgg( @@ -97,6 +96,8 @@ c == end of interface == + print *, 'pathei-lsopt in optim_readdata' + c-- The reference i/o unit. funit = 20 @@ -129,7 +130,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 = 'old', & form = 'unformatted', @@ -139,7 +140,7 @@ c-- Read the header. read( funit ) nvartype read( funit ) nvarlength - read( funit ) expId + read( funit ) yctrlid read( funit ) filenopt read( funit ) fileff read( funit ) fileiG @@ -147,14 +148,16 @@ read( funit ) filensx read( funit ) filensy -cph( - print *,'ph-opt 1 ', nvartype, nvarlength, filensx, filensy -cph) - read( funit ) (nWetcGlobal(k), k=1,nr) read( funit ) (nWetsGlobal(k), k=1,nr) read( funit ) (nWetwGlobal(k), k=1,nr) +#ifdef ALLOW_CTRL_WETV read( funit ) (nWetvGlobal(k), k=1,nr) +#endif +#ifdef ALLOW_SHIFWFLX_CONTROL + read(funit) (nWetiGlobal(k), k=1,nr) +c read(funit) nWetiGlobal(1) +#endif cgg( Add OBCS Mask information into the header section for optimization. #ifdef ALLOW_OBCSN_CONTROL @@ -182,7 +185,7 @@ cph if (lheaderonly) then print *, 'pathei: nvartype ', nvartype print *, 'pathei: nvarlength ', nvarlength - print *, 'pathei: expId ', expId + print *, 'pathei: yctrlid ', yctrlid print *, 'pathei: filenopt ', filenopt print *, 'pathei: fileff ', fileff print *, 'pathei: fileiG ', fileiG @@ -198,6 +201,34 @@ & (nWetwGlobal(k), k=1,nr) print *, 'pathei: nWetvGlobal ', & (nWetvGlobal(k), k=1,nr) +#ifdef ALLOW_SHIFWFLX_CONTROL + print *, 'pathei: nWetiGlobal ', + & (nWetiGlobal(k), k=1,nr) +#endif +#ifdef ALLOW_OBCSN_CONTROL + do iobcs=1,nobcs + print *, 'pathei: nWetobcsnGlo (iobcs=', iobcs,')', + & (nWetobcsnGlo(k,iobcs), k=1,nr) + enddo +#endif +#ifdef ALLOW_OBCSS_CONTROL + do iobcs=1,nobcs + print *, 'pathei: nWetobcssGlo (iobcs=', iobcs,')', + & (nWetobcssGlo(k,iobcs), k=1,nr) + enddo +#endif +#ifdef ALLOW_OBCSW_CONTROL + do iobcs=1,nobcs + print *, 'pathei: nWetobcswGlo (iobcs=', iobcs,')', + & (nWetobcswGlo(k,iobcs), k=1,nr) + enddo +#endif +#ifdef ALLOW_OBCSE_CONTROL + do iobcs=1,nobcs + print *, 'pathei: nWetobcseGlo (iobcs=', iobcs,')', + & (nWetobcseGlo(k,iobcs), k=1,nr) + enddo +#endif print *, 'pathei: ncvarindex ', & (ncvarindex(i), i=1,maxcvars) print *, 'pathei: ncvarrecs ', @@ -270,6 +301,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.