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

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

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

revision 1.37 by mlosch, Tue Mar 15 16:53:05 2011 UTC revision 1.38 by mmazloff, Wed Apr 20 19:13:40 2011 UTC
# Line 97  c     == local variables == Line 97  c     == local variables ==
97        integer endrec        integer endrec
98        integer diffrec        integer diffrec
99    
100    #ifdef ALLOW_OBCS_CONTROL_MODES
101          INTEGER  k,length_of_rec,dUnit
102          INTEGER  MDS_RECLEN
103          EXTERNAL MDS_RECLEN
104    #endif
105    
106  c     == external ==  c     == external ==
107    
108        integer  ilnblnk        integer  ilnblnk
# Line 364  c--   Eastern obc. Line 370  c--   Eastern obc.
370    
371  c----------------------------------------------------------------------  c----------------------------------------------------------------------
372  c--  c--
373    #ifdef ALLOW_OBCS_CONTROL_MODES
374    cih  Get matrices for reconstruction from barotropic-barclinic modes
375    CMM  To use modes now hardcoded with ECCO_CPPOPTION.  Would be good to have
376    c     run-time option and also define filename=baro_invmodes.bin
377            CALL MDSFINDUNIT( dUnit, myThid )
378            length_of_rec = MDS_RECLEN( 64, NR*NR, myThid )
379            open(dUnit, file='baro_invmodes.bin', status='old',
380         &         access='direct', recl=length_of_rec )
381            do j = 1,Nr
382               read(dUnit,rec=j) ((modesv(k,i,j), k=1,Nr), i=1,Nr)
383            end do
384            CLOSE( dUnit )
385    CMM  double precision modesv is size [NR,NR,NR]
386    c     dim one is z-space    
387    c     dim two is mode space
388    c     dim three is the total depth for which this set of modes applies
389    c     so for example modesv(:,2,nr) will be the second mode
390    c     in z-space for the full model depth
391    c    The modes are to be orthogonal when weighted by dz.  
392    c     i.e. if f_i(z) = mode i, sum_j(f_i(z_j)*f_j(z_j)*dz_j = delta_ij
393    c    first mode should also be constant in depth...barotropic
394    c    For a matlab code example how to construct the orthonormal modes,
395    c     which are ideally the solution of planetary vertical mode equation
396    c     using model mean dRho/dz, see
397    c     MITgcm/verification/obcs_ctrl/input/gendata.m
398    c    This code is compatible with partial cells
399    #endif
400    
401    c----------------------------------------------------------------------
402    c--
403  #ifdef ALLOW_DIFFKR_CONTROL  #ifdef ALLOW_DIFFKR_CONTROL
404        call ctrl_init_ctrlvar (        call ctrl_init_ctrlvar (
405       &     xx_diffkr_file, 15, 115, 1, 1, 1,       &     xx_diffkr_file, 15, 115, 1, 1, 1,

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.22