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

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

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

revision 1.17 by jmc, Thu Sep 23 16:17:57 2004 UTC revision 1.18 by edhill, Sun Dec 26 15:24:50 2004 UTC
# Line 202  C           Its OK, the variable and gri Line 202  C           Its OK, the variable and gri
202  C     Add the variable definition  C     Add the variable definition
203        CALL MNC_FILE_REDEF(fname, myThid)        CALL MNC_FILE_REDEF(fname, myThid)
204        err = NF_DEF_VAR(fid, vname, vtype, nd, ids, vid)        err = NF_DEF_VAR(fid, vname, vtype, nd, ids, vid)
205        write(msgbuf,'(5a)') 'defining variable ''', vname(1:lenv),        IF ( err .NE. NF_NOERR ) THEN
206            write(msgbuf,'(2a)') 'ERROR:  MNC will not ',
207         &       'overwrite variables in existing NetCDF'
208            CALL PRINT_ERROR( msgBuf, myThid )
209            write(msgbuf,'(2a)') '        files.  Please',
210         &       ' make sure that you are not trying to'
211            CALL PRINT_ERROR( msgBuf, myThid )
212            write(msgbuf,'(2a)') '        overwrite output',
213         &       'files from a previous model run!'
214            CALL PRINT_ERROR( msgBuf, myThid )
215            write(msgbuf,'(5a)') 'defining variable ''', vname(1:lenv),
216       &     ''' in file ''', fname(1:lenf), ''''       &     ''' in file ''', fname(1:lenf), ''''
217        CALL MNC_HANDLE_ERR(err, msgbuf, myThid)          CALL MNC_HANDLE_ERR(err, msgbuf, myThid)
218          ENDIF
219    
220  C     Success, so save the variable info  C     Success, so save the variable info
221        CALL MNC_GET_NEXT_EMPTY_IND(MNC_MAX_ID,mnc_v_names,indv, myThid)        CALL MNC_GET_NEXT_EMPTY_IND(MNC_MAX_ID,mnc_v_names,indv, myThid)

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22