Download NetCDF User's Guide for Fortran 90

Transcript
Chapter 8: Attributes
integer :: ncid1, status
integer :: RHVarID
! Variable ID
…
status = nf90_open(“foo.nc”, nf90_nowrite, ncid)
if (status /= nf90_noerr) call handle_err(status)
…
! Find the IDs of the variables
status = nf90_inq_varid(ncid, “rh”, RHVarID)
if (status /= nf90_noerr) call handle_err(status)
…
status = nf90_redef(ncid)
! Enter define mode
if (status /= nf90_noerr) call handle_err(status)
status = nf90_del_att(ncid, RHVarID, “Units”)
if (status /= nf90_noerr) call handle_err(status)
status = nf90_enddef(ncid)
if (status /= nf90_noerr) call handle_err(status)
81