/[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.4 by edhill, Tue Jan 27 05:47:32 2004 UTC revision 1.5 by edhill, Wed Feb 4 05:45:09 2004 UTC
# Line 64  C     Verify that the file exists Line 64  C     Verify that the file exists
64  C     Verify that the dim is not currently defined within the file  C     Verify that the dim is not currently defined within the file
65        n = mnc_f_alld(indf,1)        n = mnc_f_alld(indf,1)
66        DO i = 1,n        DO i = 1,n
         ntmp = ILNBLNK(mnc_d_names(j))  
67          j = mnc_f_alld(indf,i+1)          j = mnc_f_alld(indf,i+1)
68            ntmp = ILNBLNK(mnc_d_names(j))
69          IF ((ntmp .EQ. (dnl-dnf+1))          IF ((ntmp .EQ. (dnl-dnf+1))
70       &       .AND. (dname(dnf:dnl) .EQ. mnc_d_names(j)(1:n))) THEN       &       .AND. (dname(dnf:dnl) .EQ. mnc_d_names(j)(1:ntmp))) THEN
71            write(msgbuf,'(5a)') 'MNC ERROR: dimension ''',            IF (mnc_d_size(j) .NE. dlen) THEN
72       &         dname(dnf:dnl),              IF ((mnc_d_size(j) .GT. 0) .OR. (dlen .GT. 0)) THEN
73       &         ''' already exists within file ''', fname(1:nf),                write(msgbuf,'(5a)') 'MNC ERROR: dimension ''',
74       &         ''' and cannot be re-initalized'       &             dname(dnf:dnl), ''' already exists within file ''',
75            CALL print_error( msgbuf, mythid )       &             fname(1:nf), ''' and its size cannot be changed'
76            stop 'ABNORMAL END: S/R MNC_DIM_INIT'                CALL print_error(msgbuf, mythid)
77                  stop 'ABNORMAL END: S/R MNC_DIM_INIT'
78                ELSE
79    C             Its OK, the names are the same and both are specifying the
80    C             unlimited dimension
81                  RETURN
82                ENDIF
83              ELSE
84    C           Its OK, the names and sizes are identical
85                RETURN
86              ENDIF
87          ENDIF          ENDIF
88        ENDDO        ENDDO
89    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22