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

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

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

revision 1.10 by edhill, Fri Apr 2 16:12:48 2004 UTC revision 1.15 by edhill, Fri Mar 10 22:01:53 2006 UTC
# Line 27  CEOP Line 27  CEOP
27        RETURN        RETURN
28        END        END
29    
   
30  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
31  CBOP 1  CBOP 1
32  C     !ROUTINE: MNC_DIM_INIT_ALL  C     !ROUTINE: MNC_DIM_INIT_ALL
# Line 45  C     Create a dimension within the MNC Line 44  C     Create a dimension within the MNC
44    
45  C     !USES:  C     !USES:
46        implicit none        implicit none
47    
48    C     !INPUT PARAMETERS:
49          integer myThid, dlen
50          character*(*) fname, dname
51          character*(1) doWrite
52    CEOP
53    
54          CALL MNC_DIM_INIT_ALL_CV(fname,dname,dlen,doWrite,-1,-1,myThid)
55          
56          RETURN
57          END
58    
59    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
60    CBOP 1
61    C     !ROUTINE: MNC_DIM_INIT_ALL_CV
62    
63    C     !INTERFACE:
64          SUBROUTINE MNC_DIM_INIT_ALL_CV(
65         I     fname,
66         I     dname,
67         I     dlen,
68         I     doWrite,
69         I     bi,bj,
70         I     myThid )
71    
72    C     !DESCRIPTION:
73    C     Create a dimension within the MNC look-up tables.
74    
75    C     !USES:
76          implicit none
77  #include "netcdf.inc"  #include "netcdf.inc"
78  #include "mnc_common.h"  #include "mnc_common.h"
79  #include "EEPARAMS.h"  #include "EEPARAMS.h"
80    
81  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
82        integer myThid, dlen        integer myThid, dlen, bi,bj
83        character*(*) fname, dname        character*(*) fname, dname
84        character*(1) doWrite        character*(1) doWrite
85  CEOP  CEOP
# Line 69  C     Functions Line 98  C     Functions
98        dnl = ILNBLNK(dname)        dnl = ILNBLNK(dname)
99    
100  C     Verify that the file exists  C     Verify that the file exists
101        CALL MNC_GET_IND(MNC_MAX_ID, fname, mnc_f_names, indf, myThid)        CALL MNC_GET_IND(MNC_MAX_FID, fname, mnc_f_names, indf, myThid)
102        IF ( indf .LT. 1 ) THEN        IF ( indf .LT. 1 ) THEN
103          write(msgbuf,'(3a)') 'MNC ERROR: file ''', fname(1:nf),          write(msgbuf,'(3a)') 'MNC ERROR: file ''', fname(1:nf),
104       &       ''' does not exist'       &       ''' does not exist'
# Line 103  C           Its OK, the names and sizes Line 132  C           Its OK, the names and sizes
132          ENDIF          ENDIF
133        ENDDO        ENDDO
134    
135        CALL MNC_GET_NEXT_EMPTY_IND(MNC_MAX_ID, mnc_d_names, indd, myThid)        CALL MNC_GET_NEXT_EMPTY_IND(MNC_MAX_ID, mnc_d_names,
136         &     'mnc_d_names', indd, myThid)
137    
138  C     Create the dim within the file  C     Create the dim within the file
139        IF (doWrite(1:1) .EQ. 'Y') THEN        IF (doWrite(1:1) .EQ. 'Y') THEN
# Line 117  C     Create the dim within the file Line 147  C     Create the dim within the file
147       &       'dim ''', dname(dnf:dnl), ''' in file ''', fname(1:nf)       &       'dim ''', dname(dnf:dnl), ''' in file ''', fname(1:nf)
148          CALL MNC_HANDLE_ERR(err, msgbuf, myThid)          CALL MNC_HANDLE_ERR(err, msgbuf, myThid)
149    
150    C       Create and write the associated CF-convention
151    C       coordinate variable
152            IF (bi .GT. -1) THEN
153              CALL MNC_CW_WRITE_CVAR(fname, dname(dnf:dnl),
154         &         mnc_f_info(indf,2), idd, bi, bj, myThid)
155            ENDIF
156    
157        ENDIF        ENDIF
158    
159  C     Add to tables  C     Add to tables
# Line 158  C     !LOCAL VARIABLES: Line 195  C     !LOCAL VARIABLES:
195        character*(MAX_LEN_MBUF) msgbuf        character*(MAX_LEN_MBUF) msgbuf
196    
197  C     Functions  C     Functions
198        integer ILNBLNK, IFNBLNK        integer ILNBLNK
199    
200        nf = ILNBLNK(fname)        nf = ILNBLNK(fname)
201    
202  C     Verify that the file exists  C     Verify that the file exists
203        CALL MNC_GET_IND(MNC_MAX_ID, fname, mnc_f_names, indf, myThid)        CALL MNC_GET_IND(MNC_MAX_FID, fname, mnc_f_names, indf, myThid)
204        IF (indf .LT. 1) THEN        IF (indf .LT. 1) THEN
205          write(msgbuf,'(3a)') 'MNC ERROR: file ''', fname(1:nf),          write(msgbuf,'(3a)') 'MNC ERROR: file ''', fname(1:nf),
206       &       ''' does not exist'       &       ''' does not exist'

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22