/[MITgcm]/MITgcm/pkg/ctrl/ctrl_pack.F
ViewVC logotype

Diff of /MITgcm/pkg/ctrl/ctrl_pack.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.12 by heimbach, Thu Nov 6 22:05:08 2003 UTC revision 1.13 by heimbach, Fri May 28 16:04:42 2004 UTC
# Line 137  c Line 137  c
137  c--     Only the master thread will do I/O.  c--     Only the master thread will do I/O.
138        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
139    
140        if ( first .AND. optimcycle .EQ. 0 ) then        if ( first ) then
141  c     >>> Initialise control vector for optimcycle=0 <<<  c     >>> Initialise control vector for optimcycle=0 <<<
142            lxxadxx   = .TRUE.            lxxadxx   = .TRUE.
143            ictrlgrad = 1            ictrlgrad = 1
144            fcloc     = fmin            fcloc     = fmin
145            write(cfile(1:128),'(4a,i4.4)')            write(cfile(1:128),'(4a,i4.4)')
146       &      ctrlname(1:9),'_',yctrlid(1:10),'.opt', optimcycle       &         ctrlname(1:9),'_',yctrlid(1:10),
147         &         yctrlpospack, optimcycle
148              print *, 'ph-pack: unpacking ', ctrlname(1:9)
149        else        else
150  c     >>> Write gradient vector <<<  c     >>> Write gradient vector <<<
151            lxxadxx   = .FALSE.            lxxadxx   = .FALSE.
152            ictrlgrad = 2            ictrlgrad = 2
153            fcloc     = fc            fcloc     = fc
154            write(cfile(1:128),'(4a,i4.4)')            write(cfile(1:128),'(4a,i4.4)')
155       &    costname(1:9),'_',yctrlid(1:10),'.opt', optimcycle       &         costname(1:9),'_',yctrlid(1:10),
156         &         yctrlpospack, optimcycle
157              print *, 'ph-pack: unpacking ', costname(1:9)
158         endif         endif
159    
160         call mdsfindunit( cunit, mythid )         call mdsfindunit( cunit, mythid )
# Line 160  c     >>> Write gradient vector <<< Line 164  c     >>> Write gradient vector <<<
164       &      access  = 'sequential'   )       &      access  = 'sequential'   )
165    
166  c--       Header information.  c--       Header information.
167            write(cunit) nvartype            write(cunit) filenvartype
168            write(cunit) nvarlength            write(cunit) filenvarlength
169            write(cunit) yctrlid            write(cunit) fileyctrlid
170            write(cunit) optimCycle            write(cunit) fileoptimCycle
171            write(cunit) fcloc            write(cunit) filefc
172            write(cunit) 1            write(cunit) fileIg
173            write(cunit) 1            write(cunit) fileJg
174            write(cunit) 1            write(cunit) filensx
175            write(cunit) 1            write(cunit) filensy
176            write(cunit) (nWetcGlobal(k), k=1,nr)            write(cunit) (filenWetcGlobal(k), k=1,nr)
177            write(cunit) (nWetsGlobal(k), k=1,nr)            write(cunit) (filenWetsGlobal(k), k=1,nr)
178            write(cunit) (nWetwGlobal(k), k=1,nr)            write(cunit) (filenWetwGlobal(k), k=1,nr)
179  #ifdef ALLOW_CTRL_WETV  #ifdef ALLOW_CTRL_WETV
180            write(cunit) (nWetvGlobal(k), k=1,nr)            write(cunit) (filenWetvGlobal(k), k=1,nr)
181  #endif  #endif
182    
183  #ifdef ALLOW_OBCSN_CONTROL  #ifdef ALLOW_OBCSN_CONTROL
# Line 188  c--       Header information. Line 192  c--       Header information.
192  #ifdef ALLOW_OBCSE_CONTROL  #ifdef ALLOW_OBCSE_CONTROL
193            write(cunit) ((nWetobcseGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)            write(cunit) ((nWetobcseGlo(k,iobcs), k=1,nr),iobcs= 1,nobcs)
194  #endif  #endif
195            write(cunit) (ncvarindex(i), i=1,maxcvars)            write(cunit) (filencvarindex(i), i=1,maxcvars)
196            write(cunit) (ncvarrecs(i),  i=1,maxcvars)            write(cunit) (filencvarrecs(i),  i=1,maxcvars)
197            write(cunit) (nx,  i=1,maxcvars)            write(cunit) (filencvarxmax(i),  i=1,maxcvars)
198            write(cunit) (ny,  i=1,maxcvars)            write(cunit) (filencvarymax(i),  i=1,maxcvars)
199            write(cunit) (ncvarnrmax(i), i=1,maxcvars)            write(cunit) (filencvarnrmax(i), i=1,maxcvars)
200            write(cunit) (ncvargrd(i),   i=1,maxcvars)            write(cunit) (filencvargrd(i),   i=1,maxcvars)
201            write(cunit)            write(cunit)
202    
203  #ifdef ALLOW_THETA0_CONTROL  #ifdef ALLOW_THETA0_CONTROL

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22