/[MITgcm]/MITgcm/pkg/mnc/mnc_cwrapper.F
ViewVC logotype

Diff of /MITgcm/pkg/mnc/mnc_cwrapper.F

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

revision 1.11 by edhill, Mon Mar 29 03:33:51 2004 UTC revision 1.12 by edhill, Fri Apr 2 16:12:48 2004 UTC
# Line 4  C $Name$ Line 4  C $Name$
4  #include "MNC_OPTIONS.h"  #include "MNC_OPTIONS.h"
5                
6  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7  CBOP  CBOP 0
8  C     !ROUTINE: MNC_CW_ADD_GNAME  C     !ROUTINE: MNC_CW_ADD_GNAME
9    
10  C     !INTERFACE:  C     !INTERFACE:
# Line 29  C     !INPUT PARAMETERS: Line 29  C     !INPUT PARAMETERS:
29        character*(*) name        character*(*) name
30        integer dlens(*), inds_beg(*), inds_end(*)        integer dlens(*), inds_beg(*), inds_end(*)
31        character*(*) dnames(*)        character*(*) dnames(*)
32    CEOP
33    
34  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
35        integer i, nnf,nnl, indg        integer i, nnf,nnl, indg
36        character*(MAX_LEN_MBUF) msgbuf        character*(MAX_LEN_MBUF) msgbuf
37  CEOP  
38  C     Functions  C     Functions
39        integer IFNBLNK, ILNBLNK        integer IFNBLNK, ILNBLNK
40    
# Line 69  C     Check that this name is not alread Line 70  C     Check that this name is not alread
70        END        END
71    
72  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
73  CBOP  CBOP 1
74  C     !ROUTINE: MNC_CW_DUMP  C     !ROUTINE: MNC_CW_DUMP
75    
76  C     !INTERFACE:  C     !INTERFACE:
# Line 88  C     !USES: Line 89  C     !USES:
89    
90  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
91        integer myThid        integer myThid
92    CEOP
93    
94  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
95        integer i,j, ntot        integer i,j, ntot
96        integer NBLNK        integer NBLNK
97        parameter ( NBLNK = 150 )        parameter ( NBLNK = 150 )
98        character s1*(NBLNK), blnk*(NBLNK)        character s1*(NBLNK), blnk*(NBLNK)
 CEOP  
99    
100        _BEGIN_MASTER(myThid)        _BEGIN_MASTER(myThid)
101                
# Line 188  CEOP Line 189  CEOP
189        END        END
190    
191  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
192  CBOP  CBOP 0
193  C     !ROUTINE: MNC_CW_INIT  C     !ROUTINE: MNC_CW_INIT
194    
195  C     !INTERFACE:  C     !INTERFACE:
# Line 197  C     !INTERFACE: Line 198  C     !INTERFACE:
198       I     myThid )       I     myThid )
199    
200  C     !DESCRIPTION:  C     !DESCRIPTION:
201  C     Create the pre-defined grid types and variable types  C     Create the pre-defined grid types and variable types.
202          
203    C     The grid type is a character string that encodes the presence and
204    C     types associated with the four possible dimensions.  The character
205    C     string follows the format
206    C     \begin{center}
207    C       \texttt{H0\_H1\_H2\_\_V\_\_T}
208    C     \end{center}
209    C     where the terms \textit{H0}, \textit{H1}, \textit{H2}, \textit{V},
210    C     \textit{T} can be almost any combination of the following:
211    C     \begin{center}
212    C       \begin{tabular}[h]{|ccc|c|c|}\hline
213    C         \multicolumn{3}{|c|}{Horizontal} & Vertical & Time \\
214    C         \textit{H0}: location & \textit{H1}: dimensions & \textit{H2}: halo
215    C               & \textit{V}: location & \textit{T}: level  \\\hline
216    C         \texttt{-} & xy & Hn & \texttt{-} & \texttt{-} \\
217    C         U  &  x  &  Hy  &  i  &  t  \\
218    C         V  &  y  &      &  c  &     \\
219    C         Cen  &   &      &     &     \\
220    C         Cor  &   &      &     &     \\\hline
221    C       \end{tabular}
222    C     \end{center}
223    
224    
225  C     !USES:  C     !USES:
226        implicit none        implicit none
227  #include "mnc_common.h"  #include "mnc_common.h"
# Line 207  C     !USES: Line 230  C     !USES:
230  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
231        integer myThid        integer myThid
232        integer sNx,sNy, OLx,OLy, nSx,nSy, nPx,nPy, Nr        integer sNx,sNy, OLx,OLy, nSx,nSy, nPx,nPy, Nr
233    CEOP
234    
235  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
236        integer CW_MAX_LOC        integer CW_MAX_LOC
# Line 220  C     !LOCAL VARIABLES: Line 244  C     !LOCAL VARIABLES:
244       &     vert_dat(CW_MAX_LOC), time_dat(CW_MAX_LOC),       &     vert_dat(CW_MAX_LOC), time_dat(CW_MAX_LOC),
245       &     halo_dat(CW_MAX_LOC)       &     halo_dat(CW_MAX_LOC)
246        integer dim(CW_MAX_LOC), ib(CW_MAX_LOC), ie(CW_MAX_LOC)        integer dim(CW_MAX_LOC), ib(CW_MAX_LOC), ie(CW_MAX_LOC)
247  CEOP  
248  C     Functions  C     Functions
249        integer IFNBLNK, ILNBLNK        integer IFNBLNK, ILNBLNK
250    
# Line 391  C               Time dimension Line 415  C               Time dimension
415        END        END
416    
417  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
418  CBOP  CBOP 0
419  C     !ROUTINE: MNC_CW_ADD_VNAME  C     !ROUTINE: MNC_CW_ADD_VNAME
420    
421  C     !INTERFACE:  C     !INTERFACE:
# Line 401  C     !INTERFACE: Line 425  C     !INTERFACE:
425       I     bi_dim, bj_dim,       I     bi_dim, bj_dim,
426       I     myThid )       I     myThid )
427    
428  C     !DESCRIPTION:  C     !DESCRIPTION: Add a variable type to the MNC CW layer.  The
429  C     Add a variable type.  C     variable type is an association between a variable type name and
430          C     the following items:
431    C     \begin{center}
432    C       \begin{tabular}[h]{|ll|}\hline
433    C         \textbf{Item}  & \textbf{Purpose}  \\\hline
434    C         grid type  &  defines the in-memory arrangement  \\
435    C         \texttt{bi,bj} dimensions  &  tiling indices, if present  \\\hline
436    C       \end{tabular}
437    C     \end{center}
438      
439  C     !USES:  C     !USES:
440        implicit none        implicit none
441  #include "mnc_common.h"  #include "mnc_common.h"
# Line 412  C     !USES: Line 444  C     !USES:
444  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
445        integer myThid, bi_dim, bj_dim        integer myThid, bi_dim, bj_dim
446        character*(*) vname, gname        character*(*) vname, gname
447    CEOP
448    
449  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
450        integer i, nvf,nvl, ngf,ngl, indv,indg        integer i, nvf,nvl, ngf,ngl, indv,indg
451        character*(MAX_LEN_MBUF) msgbuf        character*(MAX_LEN_MBUF) msgbuf
452  CEOP  
453  C     Functions  C     Functions
454        integer IFNBLNK, ILNBLNK        integer IFNBLNK, ILNBLNK
455    
# Line 460  C     Check that gname exists Line 493  C     Check that gname exists
493        END        END
494    
495  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
496  CBOP  CBOP 0
497  C     !ROUTINE: MNC_CW_ADD_VATTR_TEXT  C     !ROUTINE: MNC_CW_ADD_VATTR_TEXT
498    
499  C     !INTERFACE:  C     !INTERFACE:
# Line 522  CEOP Line 555  CEOP
555        END        END
556    
557  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
558  CBOP  CBOP 0
559  C !ROUTINE: MNC_CW_ADD_VATTR_DBL  C !ROUTINE: MNC_CW_ADD_VATTR_DBL
560    
561  C !INTERFACE:  C !INTERFACE:
# Line 553  CEOP Line 586  CEOP
586        END        END
587    
588  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
589  CBOP  CBOP 1
590  C     !ROUTINE: MNC_CW_ADD_VATTR_ANY  C     !ROUTINE: MNC_CW_ADD_VATTR_ANY
591    
592  C     !INTERFACE:  C     !INTERFACE:
# Line 578  C     !INPUT PARAMETERS: Line 611  C     !INPUT PARAMETERS:
611        character*(*) tvals(*)        character*(*) tvals(*)
612        integer ivals(*)        integer ivals(*)
613        REAL*8 dvals(*)        REAL*8 dvals(*)
614    CEOP
615    
616  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
617        integer i, n, nvf,nvl, n1,n2, indv        integer i, n, nvf,nvl, n1,n2, indv
618        character*(MAX_LEN_MBUF) msgbuf        character*(MAX_LEN_MBUF) msgbuf
619  CEOP  
620  C     Functions  C     Functions
621        integer IFNBLNK, ILNBLNK        integer IFNBLNK, ILNBLNK
622    
# Line 634  C     Double Attributes Line 668  C     Double Attributes
668        END        END
669    
670  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
671  CBOP  CBOP 1
672  C     !ROUTINE: MNC_CW_GET_TILE_NUM  C     !ROUTINE: MNC_CW_GET_TILE_NUM
673    
674  C     !INTERFACE:  C     !INTERFACE:
# Line 656  C     !USES: Line 690  C     !USES:
690    
691  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
692        integer myThid, bi,bj, uniq_tnum        integer myThid, bi,bj, uniq_tnum
693    CEOP
694    
695  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
696        integer iG,jG        integer iG,jG
 CEOP  
697    
698        iG = 0        iG = 0
699        jG = 0        jG = 0
# Line 684  CEH3      write(*,*) 'iG,jG,uniq_tnum :' Line 718  CEH3      write(*,*) 'iG,jG,uniq_tnum :'
718        END        END
719    
720  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
721  CBOP  CBOP 1
722  C     !ROUTINE: MNC_CW_FILE_AORC  C     !ROUTINE: MNC_CW_FILE_AORC
723                
724  C     !INTERFACE:  C     !INTERFACE:
# Line 704  C     !USES: Line 738  C     !USES:
738  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
739        integer myThid, indf        integer myThid, indf
740        character*(*) fname        character*(*) fname
741    CEOP
742    
743  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
744        integer i, ierr        integer i, ierr
745        character*(MAX_LEN_MBUF) msgbuf        character*(MAX_LEN_MBUF) msgbuf
 CEOP  
746    
747  C     Check if the file is already open  C     Check if the file is already open
748        CALL MNC_GET_IND(MNC_MAX_ID, fname, mnc_f_names, indf, myThid)        CALL MNC_GET_IND(MNC_MAX_ID, fname, mnc_f_names, indf, myThid)

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

  ViewVC Help
Powered by ViewVC 1.1.22