[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Revised NetCDF module for f90
- Subject: Re: Revised NetCDF module for f90
- Date: Fri, 07 Nov 1997 13:38:16 -0700
Hi Takeshi,
>
> I was pleased to see your email in a www archive about fortran90
> modules for netCDF 3.3 yesterday. This is exactly what I wanted.
>
> There are minor problems in the module, however, so I tried to
> fix them (attached below).
>
> Bug:
> Interfaces for *_PUT_VAR_*, *_GET_VAR_* treat arrays as scalars.
>
> Not a bug but may cause troubles:
> Many (all, as far as I know) fortran90 compilers distinguish
> a scalar and an array of length 1. Thus, it causes a compiler
> error to give a scalar to ivals etc. of NF_GET|PUT_ATT_type.
> This is the case for 0 dimensional variables for _PUT|GET_VAR_
>
> To settle the latter problem, I wrote interfacing functions in
> which a scalar is substituted in an array of length 1. Then, they
> are interfaced to the original name.
>
> I checked the revised module by a Fortran90 compiler on a DEC
> alpha machine, but I have not checked it in a executable
> program yet. Thus, there might be some problems induced by me. I
> appreciate it if you or someone else use the revised version and
> find possible bugs.
Thanks for sending this. Earlier, Robert Pincus also sent me mail
recommending that I change the "dimension(:)" declarations to
"dimension(*)" instead, since our functions were really written for
Fortran77 rather than Fortran90, and thus don't know what to do with the
shape information passed in when "dimension(:)" is used.
There are apparently still problems if we try to use the result to
specify interfaces in which the user may pass multidimensional arrays
instead of just vectors. Currently, we have no expertise or resources
to finish adapting netCDF to Fortran 90. We're trying to recruit
someone from NCAR's Scientific Computing Division to help with that.
I'll archive your message, in case we find someone who is able to adapt
netCDF-3 to Fortran 90.
Thanks again for your fixes.
--Russ
_____________________________________________________________________
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
!------------------------------------------------------------------------
! Forran90 Interface definition for netCDF 3.3
! History:
! Original -- See below
! Revision -- T. Horinouchi 1997/11/05
! Debug (put_var/get_var family)
! Scalar - one-element array compatibility problem
! Encapsulation of netCDF-3 API parameters and interface blocks.
module netcdf
!
! External netCDF data types:
!
integer, parameter :: &
NF_BYTE = 1, NF_INT1 = NF_BYTE, NF_CHAR = 2, NF_SHORT = 3, &
NF_INT2 = NF_SHORT, NF_INT = 4, NF_FLOAT = 5, &
NF_REAL = NF_FLOAT, NF_DOUBLE = 6
!
! Default fill values:
!
integer, parameter :: &
NF_FILL_BYTE = -127, NF_FILL_INT1 = NF_FILL_BYTE, &
NF_FILL_CHAR = 0, NF_FILL_SHORT = -32767, &
NF_FILL_INT2 = NF_FILL_SHORT, NF_FILL_INT = -2147483647
real, parameter :: &
NF_FILL_FLOAT = 9.9692099683868690e+36, &
NF_FILL_REAL = NF_FILL_FLOAT
doubleprecision, parameter :: &
NF_FILL_DOUBLE = 9.9692099683868690e+36
!
! Mode flags for opening and creating a netCDF dataset:
!
integer, parameter :: &
NF_NOWRITE = 0, NF_WRITE = 1, NF_CLOBBER = 0, NF_NOCLOBBER = 4, &
NF_FILL = 0, NF_NOFILL = 256, NF_LOCK = 1024, NF_SHARE = 2048
!
! Size argument for defining an unlimited dimension:
!
integer, parameter :: &
NF_UNLIMITED = 0
!
! Global Attribute ID:
!
integer, parameter :: &
NF_GLOBAL = 0
!
! Implementation limits:
!
integer, parameter :: &
NF_MAX_DIMS = 100, NF_MAX_ATTRS = 2000, NF_MAX_VARS = 2000, &
NF_MAX_NAME = 128, NF_MAX_VAR_DIMS = NF_MAX_DIMS
!
! Error codes:
!
integer, parameter :: &
NF_NOERR = 0, NF_EBADID = -33, NF_EEXIST = -35, NF_EINVAL = -36, &
NF_EPERM = -37, NF_ENOTINDEFINE = -38, NF_EINDEFINE = -39, &
NF_EINVALCOORDS = -40, NF_EMAXDIMS = -41, NF_ENAMEINUSE = -42, &
NF_ENOTATT = -43, NF_EMAXATTS = -44, NF_EBADTYPE = -45, &
NF_EBADDIM = -46, NF_EUNLIMPOS = -47, NF_EMAXVARS = -48, &
NF_ENOTVAR = -49, NF_EGLOBAL = -50, NF_ENOTNC = -51, &
NF_ESTS = -52, NF_EMAXNAME = -53, NF_EUNLIMIT = -54, &
NF_ENORECVARS = -55, NF_ECHAR = -56, NF_EEDGE = -57, &
NF_ESTRIDE = -58, NF_EBADNAME = -59, NF_ERANGE = -60
integer, parameter :: &
NF_FATAL = 1, NF_VERBOSE = 2
interface
CHARACTER*80 FUNCTION NF_INQ_LIBVERS()
end function NF_INQ_LIBVERS
CHARACTER*80 FUNCTION NF_STRERROR (NCERR)
integer, intent ( in) :: NCERR
end function NF_STRERROR
INTEGER FUNCTION NF_CREATE (PATH, CMODE, ncid)
character (len = *), intent ( in) :: PATH
integer, intent ( in) :: CMODE
integer, intent (out) :: ncid
end function NF_CREATE
INTEGER FUNCTION NF_OPEN (PATH, MODE, ncid)
character (len = *), intent ( in) :: PATH
integer, intent ( in) :: MODE
integer, intent (out) :: ncid
end function NF_OPEN
INTEGER FUNCTION NF_SET_FILL (NCID, FILLMODE, old_mode)
integer, intent ( in) :: NCID
integer, intent ( in) :: FILLMODE
integer, intent (out) :: old_mode
end function NF_SET_FILL
INTEGER FUNCTION NF_REDEF (NCID)
integer, intent ( in) :: NCID
end function NF_REDEF
INTEGER FUNCTION NF_ENDDEF (NCID)
integer, intent ( in) :: NCID
end function NF_ENDDEF
INTEGER FUNCTION NF_SYNC (NCID)
integer, intent ( in) :: NCID
end function NF_SYNC
INTEGER FUNCTION NF_ABORT (NCID)
integer, intent ( in) :: NCID
end function NF_ABORT
INTEGER FUNCTION NF_CLOSE (NCID)
integer, intent ( in) :: NCID
end function NF_CLOSE
INTEGER FUNCTION NF_INQ (NCID, ndims, nvars, ngatts,&
unlimdimid)
integer, intent ( in) :: NCID
integer, intent (out) :: ndims
integer, intent (out) :: nvars
integer, intent (out) :: ngatts
integer, intent (out) :: unlimdimid
end function NF_INQ
INTEGER FUNCTION NF_INQ_NDIMS (NCID, ndims)
integer, intent ( in) :: NCID
integer, intent (out) :: ndims
end function NF_INQ_NDIMS
INTEGER FUNCTION NF_INQ_NVARS (NCID, nvars)
integer, intent ( in) :: NCID
integer, intent (out) :: nvars
end function NF_INQ_NVARS
INTEGER FUNCTION NF_INQ_NATTS (NCID, ngatts)
integer, intent ( in) :: NCID
integer, intent (out) :: ngatts
end function NF_INQ_NATTS
INTEGER FUNCTION NF_INQ_UNLIMDIM (NCID, unlimdimid)
integer, intent ( in) :: NCID
integer, intent (out) :: unlimdimid
end function NF_INQ_UNLIMDIM
INTEGER FUNCTION NF_DEF_DIM (NCID, NAME, LEN, dimid)
integer, intent ( in) :: NCID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: LEN
integer, intent (out) :: dimid
end function NF_DEF_DIM
INTEGER FUNCTION NF_INQ_DIMID (NCID, NAME, dimid)
integer, intent ( in) :: NCID
character (len = *), intent ( in) :: NAME
integer, intent (out) :: dimid
end function NF_INQ_DIMID
INTEGER FUNCTION NF_INQ_DIM (NCID, DIMID, name, len)
integer, intent ( in) :: NCID
integer, intent ( in) :: DIMID
character (len = *), intent (out) :: name
integer, intent (out) :: len
end function NF_INQ_DIM
INTEGER FUNCTION NF_INQ_DIMNAME (NCID, DIMID, name)
integer, intent ( in) :: NCID
integer, intent ( in) :: DIMID
character (len = *), intent (out) :: name
end function NF_INQ_DIMNAME
INTEGER FUNCTION NF_INQ_DIMLEN (NCID, DIMID, len)
integer, intent ( in) :: NCID
integer, intent ( in) :: DIMID
integer, intent (out) :: len
end function NF_INQ_DIMLEN
INTEGER FUNCTION NF_RENAME_DIM (NCID, DIMID, NAME)
integer, intent ( in) :: NCID
integer, intent ( in) :: DIMID
character (len = *), intent ( in) :: NAME
end function NF_RENAME_DIM
INTEGER FUNCTION NF_DEF_VAR (NCID, NAME, XTYPE, NDIMS, &
DIMIDS, varid)
integer, intent ( in) :: NCID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: NDIMS
integer, dimension(:), intent ( in) :: DIMIDS
integer, intent (out) :: varid
end function NF_DEF_VAR
INTEGER FUNCTION NF_INQ_VAR (NCID, VARID, name, xtype, &
ndims, dimids, natts)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent (out) :: name
integer, intent (out) :: xtype
integer, intent (out) :: ndims
integer, dimension(:), intent (out) :: dimids
integer, intent (out) :: natts
end function NF_INQ_VAR
INTEGER FUNCTION NF_INQ_VARID (NCID, NAME, varid)
integer, intent ( in) :: NCID
character (len = *), intent ( in) :: NAME
integer, intent (out) :: varid
end function NF_INQ_VARID
INTEGER FUNCTION NF_INQ_VARNAME (NCID, VARID, name)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent (out) :: name
end function NF_INQ_VARNAME
INTEGER FUNCTION NF_INQ_VARTYPE (NCID, VARID, xtype)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, intent (out) :: xtype
end function NF_INQ_VARTYPE
INTEGER FUNCTION NF_INQ_VARNDIMS (NCID, VARID, ndims)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, intent (out) :: ndims
end function NF_INQ_VARNDIMS
INTEGER FUNCTION NF_INQ_VARDIMID (NCID, VARID, dimids)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent (out) :: dimids
end function NF_INQ_VARDIMID
INTEGER FUNCTION NF_INQ_VARNATTS (NCID, VARID, natts)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, intent (out) :: natts
end function NF_INQ_VARNATTS
INTEGER FUNCTION NF_RENAME_VAR (NCID, VARID, NAME)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
end function NF_RENAME_VAR
INTEGER FUNCTION NF_PUT_VAR_TEXT (NCID, VARID, TEXT)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: TEXT
end function NF_PUT_VAR_TEXT
INTEGER FUNCTION NF_GET_VAR_TEXT (NCID, VARID, text)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent (out) :: text
end function NF_GET_VAR_TEXT
end interface
interface NF_PUT_VAR_INT1
INTEGER FUNCTION NF_PUT_VAR_INT1 (NCID, VARID, I1VAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*1, dimension(:), intent ( in) :: I1VAL
end function NF_PUT_VAR_INT1
end interface
interface NF_GET_VAR_INT1
INTEGER FUNCTION NF_GET_VAR_INT1 (NCID, VARID, i1val)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*1, dimension(:), intent (out) :: i1val
end function NF_GET_VAR_INT1
end interface
interface NF_PUT_VAR_INT2
INTEGER FUNCTION NF_PUT_VAR_INT2 (NCID, VARID, I2VAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*2, dimension(:), intent ( in) :: I2VAL
end function NF_PUT_VAR_INT2
end interface
interface NF_GET_VAR_INT2
INTEGER FUNCTION NF_GET_VAR_INT2 (NCID, VARID, i2val)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*2, dimension(:), intent (out) :: i2val
end function NF_GET_VAR_INT2
end interface
interface NF_PUT_VAR_INT
INTEGER FUNCTION NF_PUT_VAR_INT (NCID, VARID, IVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: IVAL
end function NF_PUT_VAR_INT
end interface
interface NF_GET_VAR_INT
INTEGER FUNCTION NF_GET_VAR_INT (NCID, VARID, ival)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent (out) :: ival
end function NF_GET_VAR_INT
end interface
interface NF_PUT_VAR_REAL
INTEGER FUNCTION NF_PUT_VAR_REAL (NCID, VARID, RVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
real, dimension(:), intent ( in) :: RVAL
end function NF_PUT_VAR_REAL
end interface
interface NF_GET_VAR_REAL
INTEGER FUNCTION NF_GET_VAR_REAL (NCID, VARID, rval)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
real, dimension(:), intent (out) :: rval
end function NF_GET_VAR_REAL
end interface
interface NF_PUT_VAR_DOUBLE
INTEGER FUNCTION NF_PUT_VAR_DOUBLE (NCID, VARID, DVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
doubleprecision, dimension(:), intent ( in) :: DVAL
end function NF_PUT_VAR_DOUBLE
end interface
interface NF_GET_VAR_DOUBLE
INTEGER FUNCTION NF_GET_VAR_DOUBLE (NCID, VARID, dval)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
doubleprecision, dimension(:), intent (out) :: dval
end function NF_GET_VAR_DOUBLE
end interface
interface NF_PUT_VAR_INT1
MODULE PROCEDURE NF_PUT_VAR_INT1_SC
end interface
interface NF_GET_VAR_INT1
MODULE PROCEDURE NF_GET_VAR_INT1_SC
end interface
interface NF_PUT_VAR_INT2
MODULE PROCEDURE NF_PUT_VAR_INT2_SC
end interface
interface NF_GET_VAR_INT2
MODULE PROCEDURE NF_GET_VAR_INT2_SC
end interface
interface NF_PUT_VAR_INT
MODULE PROCEDURE NF_PUT_VAR_INT_SC
end interface
interface NF_GET_VAR_INT
MODULE PROCEDURE NF_GET_VAR_INT_SC
end interface
interface NF_PUT_VAR_REAL
MODULE PROCEDURE NF_PUT_VAR_REAL_SC
end interface
interface NF_GET_VAR_REAL
MODULE PROCEDURE NF_GET_VAR_REAL_SC
end interface
interface NF_PUT_VAR_DOUBLE
MODULE PROCEDURE NF_PUT_VAR_DOUBLE_SC
end interface
interface NF_GET_VAR_DOUBLE
MODULE PROCEDURE NF_GET_VAR_DOUBLE_SC
end interface
interface
INTEGER FUNCTION NF_PUT_VAR1_TEXT (NCID, VARID, INDEX, TEXT)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
character (len = *), intent ( in) :: TEXT
end function NF_PUT_VAR1_TEXT
INTEGER FUNCTION NF_GET_VAR1_TEXT (NCID, VARID, INDEX, text)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
character (len = *), intent (out) :: text
end function NF_GET_VAR1_TEXT
INTEGER FUNCTION NF_PUT_VAR1_INT1 (NCID, VARID, INDEX, I1VAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
integer*1, intent ( in) :: I1VAL
end function NF_PUT_VAR1_INT1
INTEGER FUNCTION NF_GET_VAR1_INT1 (NCID, VARID, INDEX, i1val)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
integer*1, intent (out) :: i1val
end function NF_GET_VAR1_INT1
INTEGER FUNCTION NF_PUT_VAR1_INT2 (NCID, VARID, INDEX, I2VAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
integer*2, intent ( in) :: I2VAL
end function NF_PUT_VAR1_INT2
INTEGER FUNCTION NF_GET_VAR1_INT2 (NCID, VARID, INDEX, i2val)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
integer*2, intent (out) :: i2val
end function NF_GET_VAR1_INT2
INTEGER FUNCTION NF_PUT_VAR1_INT (NCID, VARID, INDEX, IVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
integer, intent ( in) :: IVAL
end function NF_PUT_VAR1_INT
INTEGER FUNCTION NF_GET_VAR1_INT (NCID, VARID, INDEX, ival)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
integer, intent (out) :: ival
end function NF_GET_VAR1_INT
INTEGER FUNCTION NF_PUT_VAR1_REAL (NCID, VARID, INDEX, RVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
real, intent ( in) :: RVAL
end function NF_PUT_VAR1_REAL
INTEGER FUNCTION NF_GET_VAR1_REAL (NCID, VARID, INDEX, rval)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
real, intent (out) :: rval
end function NF_GET_VAR1_REAL
INTEGER FUNCTION NF_PUT_VAR1_DOUBLE(NCID, VARID, INDEX, DVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
doubleprecision, intent ( in) :: DVAL
end function NF_PUT_VAR1_DOUBLE
INTEGER FUNCTION NF_GET_VAR1_DOUBLE(NCID, VARID, INDEX, dval)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: INDEX
doubleprecision, intent (out) :: dval
end function NF_GET_VAR1_DOUBLE
INTEGER FUNCTION NF_PUT_VARA_TEXT (NCID, VARID, START, COUNT, &
TEXT)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
character (len = *), intent ( in) :: TEXT
end function NF_PUT_VARA_TEXT
INTEGER FUNCTION NF_GET_VARA_TEXT (NCID, VARID, START, COUNT, &
text)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
character (len = *), intent (out) :: text
end function NF_GET_VARA_TEXT
INTEGER FUNCTION NF_PUT_VARA_INT1 (NCID, VARID, START, COUNT, &
I1VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer*1, dimension(:), intent ( in) :: I1VALS
end function NF_PUT_VARA_INT1
INTEGER FUNCTION NF_GET_VARA_INT1 (NCID, VARID, START, COUNT, &
i1vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer*1, dimension(:), intent (out) :: i1vals
end function NF_GET_VARA_INT1
INTEGER FUNCTION NF_PUT_VARA_INT2 (NCID, VARID, START, COUNT, &
I2VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer*2, dimension(:), intent ( in) :: I2VALS
end function NF_PUT_VARA_INT2
INTEGER FUNCTION NF_GET_VARA_INT2 (NCID, VARID, START, COUNT, &
i2vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer*2, dimension(:), intent (out) :: i2vals
end function NF_GET_VARA_INT2
INTEGER FUNCTION NF_PUT_VARA_INT (NCID, VARID, START, COUNT, &
IVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: IVALS
end function NF_PUT_VARA_INT
INTEGER FUNCTION NF_GET_VARA_INT (NCID, VARID, START, COUNT, &
ivals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent (out) :: ivals
end function NF_GET_VARA_INT
INTEGER FUNCTION NF_PUT_VARA_REAL (NCID, VARID, START, COUNT, &
RVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
real, dimension(:), intent ( in) :: RVALS
end function NF_PUT_VARA_REAL
INTEGER FUNCTION NF_GET_VARA_REAL (NCID, VARID, START, COUNT, &
rvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
real, dimension(:), intent (out):: rvals
end function NF_GET_VARA_REAL
INTEGER FUNCTION NF_PUT_VARA_DOUBLE(NCID, VARID, START, COUNT, &
DVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
doubleprecision, dimension(:), intent ( in) :: DVALS
end function NF_PUT_VARA_DOUBLE
INTEGER FUNCTION NF_GET_VARA_DOUBLE(NCID, VARID, START, COUNT, &
dvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
doubleprecision, dimension(:), intent (out) :: dvals
end function NF_GET_VARA_DOUBLE
INTEGER FUNCTION NF_PUT_VARS_TEXT (NCID, VARID, START, COUNT, &
STRIDE, TEXT)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
character (len = *), intent ( in) :: TEXT
end function NF_PUT_VARS_TEXT
INTEGER FUNCTION NF_GET_VARS_TEXT (NCID, VARID, START, COUNT, &
STRIDE, text)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
character (len = *), intent (out) :: text
end function NF_GET_VARS_TEXT
INTEGER FUNCTION NF_PUT_VARS_INT1 (NCID, VARID, START, COUNT, &
STRIDE, I1VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer*1, dimension(:), intent ( in) :: I1VALS
end function NF_PUT_VARS_INT1
INTEGER FUNCTION NF_GET_VARS_INT1 (NCID, VARID, START, COUNT, &
STRIDE, i1vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer*1, dimension(:), intent (out) :: i1vals
end function NF_GET_VARS_INT1
INTEGER FUNCTION NF_PUT_VARS_INT2 (NCID, VARID, START, COUNT, &
STRIDE, I2VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer*2, dimension(:), intent ( in) :: I2VALS
end function NF_PUT_VARS_INT2
INTEGER FUNCTION NF_GET_VARS_INT2 (NCID, VARID, START, COUNT, &
STRIDE, i2vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer*2, dimension(:), intent (out) :: i2vals
end function NF_GET_VARS_INT2
INTEGER FUNCTION NF_PUT_VARS_INT (NCID, VARID, START, COUNT, &
STRIDE, IVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IVALS
end function NF_PUT_VARS_INT
INTEGER FUNCTION NF_GET_VARS_INT (NCID, VARID, START, COUNT, &
STRIDE, ivals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent (out) :: ivals
end function NF_GET_VARS_INT
INTEGER FUNCTION NF_PUT_VARS_REAL (NCID, VARID, START, COUNT, &
STRIDE, RVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
real, dimension(:), intent ( in) :: RVALS
end function NF_PUT_VARS_REAL
INTEGER FUNCTION NF_GET_VARS_REAL (NCID, VARID, START, COUNT, &
STRIDE, rvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
real, dimension(:), intent (out) :: rvals
end function NF_GET_VARS_REAL
INTEGER FUNCTION NF_PUT_VARS_DOUBLE(NCID, VARID, START, COUNT, &
STRIDE, DVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
doubleprecision, dimension(:), intent ( in) :: DVALS
end function NF_PUT_VARS_DOUBLE
INTEGER FUNCTION NF_GET_VARS_DOUBLE(NCID, VARID, START, COUNT, &
STRIDE, dvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
doubleprecision, dimension(:), intent (out) :: dvals
end function NF_GET_VARS_DOUBLE
INTEGER FUNCTION NF_PUT_VARM_TEXT (NCID, VARID, START, COUNT, &
STRIDE, IMAP, TEXT)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
character (len = *), intent ( in) :: TEXT
end function NF_PUT_VARM_TEXT
INTEGER FUNCTION NF_GET_VARM_TEXT (NCID, VARID, START, COUNT, &
STRIDE, IMAP, text)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
character (len = *), intent (out) :: text
end function NF_GET_VARM_TEXT
INTEGER FUNCTION NF_PUT_VARM_INT1 (NCID, VARID, START, COUNT, &
STRIDE, IMAP, I1VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
integer*1, dimension(:), intent ( in) :: I1VALS
end function NF_PUT_VARM_INT1
INTEGER FUNCTION NF_GET_VARM_INT1 (NCID, VARID, START, COUNT, &
STRIDE, IMAP, i1vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
integer*1, dimension(:), intent (out) :: i1vals
end function NF_GET_VARM_INT1
INTEGER FUNCTION NF_PUT_VARM_INT2 (NCID, VARID, START, COUNT, &
STRIDE, IMAP, I2VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
integer*2, dimension(:), intent ( in) :: I2VALS
end function NF_PUT_VARM_INT2
INTEGER FUNCTION NF_GET_VARM_INT2 (NCID, VARID, START, COUNT, &
STRIDE, IMAP, i2vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
integer*2, dimension(:), intent (out) :: i2vals
end function NF_GET_VARM_INT2
INTEGER FUNCTION NF_PUT_VARM_INT (NCID, VARID, START, COUNT, &
STRIDE, IMAP, IVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
integer, dimension(:), intent ( in) :: IVALS
end function NF_PUT_VARM_INT
INTEGER FUNCTION NF_GET_VARM_INT (NCID, VARID, START, COUNT, &
STRIDE, IMAP, ivals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
integer, dimension(:), intent (out) :: ivals
end function NF_GET_VARM_INT
INTEGER FUNCTION NF_PUT_VARM_REAL (NCID, VARID, START, COUNT, &
STRIDE, IMAP, RVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
real, dimension(:), intent ( in) :: RVALS
end function NF_PUT_VARM_REAL
INTEGER FUNCTION NF_GET_VARM_REAL (NCID, VARID, START, COUNT, &
STRIDE, IMAP, rvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
real, dimension(:), intent (out) :: rvals
end function NF_GET_VARM_REAL
INTEGER FUNCTION NF_PUT_VARM_DOUBLE(NCID, VARID, START, COUNT, &
STRIDE, IMAP, DVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
doubleprecision, dimension(:), intent ( in) :: DVALS
end function NF_PUT_VARM_DOUBLE
INTEGER FUNCTION NF_GET_VARM_DOUBLE(NCID, VARID, START, COUNT, &
STRIDE, IMAP, dvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, dimension(:), intent ( in) :: START
integer, dimension(:), intent ( in) :: COUNT
integer, dimension(:), intent ( in) :: STRIDE
integer, dimension(:), intent ( in) :: IMAP
doubleprecision, dimension(:), intent (out) :: dvals
end function NF_GET_VARM_DOUBLE
INTEGER FUNCTION NF_INQ_ATT (NCID, VARID, NAME, xtype, &
len)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent (out) :: xtype
integer, intent (out) :: len
end function NF_INQ_ATT
INTEGER FUNCTION NF_INQ_ATTID (NCID, VARID, NAME, attnum)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent (out) :: attnum
end function NF_INQ_ATTID
INTEGER FUNCTION NF_INQ_ATTTYPE (NCID, VARID, NAME, xtype)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent (out) :: xtype
end function NF_INQ_ATTTYPE
INTEGER FUNCTION NF_INQ_ATTLEN (NCID, VARID, NAME, len)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent (out) :: len
end function NF_INQ_ATTLEN
INTEGER FUNCTION NF_INQ_ATTNAME (NCID, VARID, ATTNUM, name)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, intent (out) :: ATTNUM
character (len = *), intent (out) :: name
end function NF_INQ_ATTNAME
INTEGER FUNCTION NF_COPY_ATT (NCID_IN, VARID_IN, NAME, &
NCID_OUT, VARID_OUT)
integer, intent ( in) :: NCID_IN
integer, intent ( in) :: VARID_IN
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: NCID_OUT
integer, intent ( in) :: VARID_OUT
end function NF_COPY_ATT
INTEGER FUNCTION NF_RENAME_ATT (NCID, VARID, CURNAME, &
NEWNAME)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: CURNAME
character (len = *), intent ( in) :: NEWNAME
end function NF_RENAME_ATT
INTEGER FUNCTION NF_DEL_ATT (NCID, VARID, NAME)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
end function NF_DEL_ATT
INTEGER FUNCTION NF_PUT_ATT_TEXT (NCID, VARID, NAME, LEN, TEXT)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: LEN
character (len = *), intent ( in) :: TEXT
end function NF_PUT_ATT_TEXT
INTEGER FUNCTION NF_GET_ATT_TEXT (NCID, VARID, NAME, text)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
character (len = *), intent (out) :: text
end function NF_GET_ATT_TEXT
end interface
interface NF_PUT_ATT_INT1
INTEGER FUNCTION NF_PUT_ATT_INT1 (NCID, VARID, NAME, XTYPE, &
LEN, I1VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
integer*1, dimension(:), intent ( in) :: I1VALS
end function NF_PUT_ATT_INT1
end interface
interface NF_GET_ATT_INT1
INTEGER FUNCTION NF_GET_ATT_INT1 (NCID, VARID, NAME, i1vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer*1, dimension(:), intent (out) :: i1vals
end function NF_GET_ATT_INT1
end interface
interface NF_PUT_ATT_INT2
INTEGER FUNCTION NF_PUT_ATT_INT2 (NCID, VARID, NAME, XTYPE, &
LEN, I2VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
integer*2, dimension(:), intent ( in) :: I2VALS
end function NF_PUT_ATT_INT2
end interface
interface NF_GET_ATT_INT2
INTEGER FUNCTION NF_GET_ATT_INT2 (NCID, VARID, NAME, i2vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer*2, dimension(:), intent (out) :: i2vals
end function NF_GET_ATT_INT2
end interface
interface NF_PUT_ATT_INT
INTEGER FUNCTION NF_PUT_ATT_INT (NCID, VARID, NAME, XTYPE, &
LEN, IVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
integer, dimension(:), intent ( in) :: IVALS
end function NF_PUT_ATT_INT
end interface
interface NF_GET_ATT_INT
INTEGER FUNCTION NF_GET_ATT_INT (NCID, VARID, NAME, ivals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, dimension(:), intent (out) :: ivals
end function NF_GET_ATT_INT
end interface
interface NF_PUT_ATT_REAL
INTEGER FUNCTION NF_PUT_ATT_REAL (NCID, VARID, NAME, XTYPE, &
LEN, RVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
real, dimension(:), intent ( in) :: RVALS
end function NF_PUT_ATT_REAL
end interface
interface NF_GET_ATT_REAL
INTEGER FUNCTION NF_GET_ATT_REAL (NCID, VARID, NAME, rvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
real, dimension(:), intent (out) :: rvals
end function NF_GET_ATT_REAL
end interface
interface NF_PUT_ATT_DOUBLE
INTEGER FUNCTION NF_PUT_ATT_DOUBLE (NCID, VARID, NAME, XTYPE, &
LEN, DVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
doubleprecision, dimension(:), intent ( in) :: DVALS
end function NF_PUT_ATT_DOUBLE
end interface
interface NF_GET_ATT_DOUBLE
INTEGER FUNCTION NF_GET_ATT_DOUBLE (NCID, VARID, NAME, dvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
doubleprecision, dimension(:), intent (out) :: dvals
end function NF_GET_ATT_DOUBLE
end interface
interface NF_PUT_ATT_INT1
module procedure NF_PUT_ATT_INT1_SC
end interface
interface NF_GET_ATT_INT1
module procedure NF_GET_ATT_INT1_SC
end interface
interface NF_PUT_ATT_INT2
module procedure NF_PUT_ATT_INT2_SC
end interface
interface NF_GET_ATT_INT2
module procedure NF_GET_ATT_INT2_SC
end interface
interface NF_PUT_ATT_INT
module procedure NF_PUT_ATT_INT_SC
end interface
interface NF_GET_ATT_INT
module procedure NF_GET_ATT_INT_SC
end interface
interface NF_PUT_ATT_REAL
module procedure NF_PUT_ATT_REAL_SC
end interface
interface NF_GET_ATT_REAL
module procedure NF_GET_ATT_REAL_SC
end interface
interface NF_PUT_ATT_DOUBLE
module procedure NF_PUT_ATT_DOUBLE_SC
end interface
interface NF_GET_ATT_DOUBLE
module procedure NF_GET_ATT_DOUBLE_SC
end interface
contains ! interfaces to eqivalence a scalar and an array of size 1
! PUT_VAR/GET_VAR
INTEGER FUNCTION NF_PUT_VAR_INT1_SC (NCID, VARID, I1VAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*1, intent ( in) :: I1VAL
integer*1, dimension(1) :: I1VAL_A
I1VAL_A=I1VAL
NF_PUT_VAR_INT1_SC=NF_PUT_VAR_INT1 (NCID, VARID, I1VAL_A)
end function NF_PUT_VAR_INT1_SC
INTEGER FUNCTION NF_GET_VAR_INT1_SC (NCID, VARID, i1val)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*1, intent (out) :: i1val
integer*1, dimension(1) :: i1val_A
NF_GET_VAR_INT1_SC=NF_GET_VAR_INT1 (NCID, VARID, i1val_A)
i1val=i1val_A(1)
end function NF_GET_VAR_INT1_SC
INTEGER FUNCTION NF_PUT_VAR_INT2_SC (NCID, VARID, I2VAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*2, intent ( in) :: I2VAL
integer*2, dimension(1) :: I2VAL_A
I2VAL_A=I2VAL
NF_PUT_VAR_INT2_SC=NF_PUT_VAR_INT2 (NCID, VARID, I2VAL_A)
end function NF_PUT_VAR_INT2_SC
INTEGER FUNCTION NF_GET_VAR_INT2_SC (NCID, VARID, i2val)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer*2, intent (out) :: i2val
integer*2, dimension(1) :: i2val_A
NF_GET_VAR_INT2_SC=NF_GET_VAR_INT2 (NCID, VARID, i2val_A)
i2val=i2val_A(1)
end function NF_GET_VAR_INT2_SC
INTEGER FUNCTION NF_PUT_VAR_INT_SC (NCID, VARID, IVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, intent ( in) :: IVAL
integer, dimension(1) :: IVAL_A
IVAL_A=IVAL
NF_PUT_VAR_INT_SC=NF_PUT_VAR_INT (NCID, VARID, IVAL_A)
end function NF_PUT_VAR_INT_SC
INTEGER FUNCTION NF_GET_VAR_INT_SC (NCID, VARID, ival)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
integer, intent (out) :: ival
integer, dimension(1) :: ival_A
NF_GET_VAR_INT_SC=NF_GET_VAR_INT (NCID, VARID, ival_A)
ival=ival_A(1)
end function NF_GET_VAR_INT_SC
INTEGER FUNCTION NF_PUT_VAR_REAL_SC (NCID, VARID, RVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
real, intent ( in) :: RVAL
real, dimension(1) :: RVAL_A
RVAL_A=RVAL
NF_PUT_VAR_REAL_SC=NF_PUT_VAR_REAL (NCID, VARID, RVAL_A)
end function NF_PUT_VAR_REAL_SC
INTEGER FUNCTION NF_GET_VAR_REAL_SC (NCID, VARID, rval)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
real, intent (out) :: rval
real, dimension(1) :: rval_A
NF_GET_VAR_REAL_SC=NF_GET_VAR_REAL (NCID, VARID, rval_A)
rval=rval_A(1)
end function NF_GET_VAR_REAL_SC
INTEGER FUNCTION NF_PUT_VAR_DOUBLE_SC (NCID, VARID, DVAL)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
doubleprecision, intent ( in) :: DVAL
doubleprecision, dimension(1) :: DVAL_A
DVAL_A=DVAL
NF_PUT_VAR_DOUBLE_SC=NF_PUT_VAR_DOUBLE (NCID, VARID, DVAL_A)
end function NF_PUT_VAR_DOUBLE_SC
INTEGER FUNCTION NF_GET_VAR_DOUBLE_SC (NCID, VARID, dval)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
doubleprecision, intent (out) :: dval
doubleprecision, dimension(1) :: dval_A
NF_GET_VAR_DOUBLE_SC=NF_GET_VAR_DOUBLE (NCID, VARID, dval_A)
dval=dval_A(1)
end function NF_GET_VAR_DOUBLE_SC
! PUT_ATT/GET_ATT
INTEGER FUNCTION NF_PUT_ATT_INT1_SC (NCID, VARID, NAME, XTYPE, &
LEN, I1VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
integer*1, intent ( in) :: I1VALS
integer*1, dimension(1) :: I1VALS_A
I1VALS_A=I1VALS
NF_PUT_ATT_INT1_SC=NF_PUT_ATT_INT1 (NCID, VARID, NAME, XTYPE, &
LEN, I1VALS_A)
end function NF_PUT_ATT_INT1_SC
INTEGER FUNCTION NF_GET_ATT_INT1_SC (NCID, VARID, NAME, i1vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer*1, intent (out) :: i1vals
integer*1, dimension(1) :: i1vals_A
NF_GET_ATT_INT1_SC=NF_GET_ATT_INT1 (NCID, VARID, NAME, i1vals_A)
i1vals=i1vals_A(1)
end function NF_GET_ATT_INT1_SC
INTEGER FUNCTION NF_PUT_ATT_INT2_SC (NCID, VARID, NAME, XTYPE, &
LEN, I2VALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
integer*2, intent ( in) :: I2VALS
integer*2, dimension(1) :: I2VALS_A
I2VALS_A=I2VALS
NF_PUT_ATT_INT2_SC=NF_PUT_ATT_INT2 (NCID, VARID, NAME, XTYPE, &
LEN, I2VALS_A)
end function NF_PUT_ATT_INT2_SC
INTEGER FUNCTION NF_GET_ATT_INT2_SC (NCID, VARID, NAME, i2vals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer*2, intent (out) :: i2vals
integer*2, dimension(1) :: i2vals_A
NF_GET_ATT_INT2_SC=NF_GET_ATT_INT2 (NCID, VARID, NAME, i2vals_A)
i2vals=i2vals_A(1)
end function NF_GET_ATT_INT2_SC
INTEGER FUNCTION NF_PUT_ATT_INT_SC (NCID, VARID, NAME, XTYPE, &
LEN, IVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
integer, intent ( in) :: IVALS
integer, dimension(1) :: IVALS_A
IVALS_A=IVALS
NF_PUT_ATT_INT_SC=NF_PUT_ATT_INT (NCID, VARID, NAME, XTYPE, &
LEN, IVALS_A)
end function NF_PUT_ATT_INT_SC
INTEGER FUNCTION NF_GET_ATT_INT_SC (NCID, VARID, NAME, ivals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent (out) :: ivals
integer, dimension(1) :: ivals_A
NF_GET_ATT_INT_SC=NF_GET_ATT_INT (NCID, VARID, NAME, ivals_A)
ivals=ivals_A(1)
end function NF_GET_ATT_INT_SC
INTEGER FUNCTION NF_PUT_ATT_REAL_SC (NCID, VARID, NAME, XTYPE, &
LEN, RVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
real, intent ( in) :: RVALS
real, dimension(1) :: RVALS_A
RVALS_A=RVALS
NF_PUT_ATT_REAL_SC=NF_PUT_ATT_REAL (NCID, VARID, NAME, XTYPE, &
LEN, RVALS_A)
end function NF_PUT_ATT_REAL_SC
INTEGER FUNCTION NF_GET_ATT_REAL_SC (NCID, VARID, NAME, rvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
real, intent (out) :: rvals
real, dimension(1) :: rvals_A
NF_GET_ATT_REAL_SC=NF_GET_ATT_REAL (NCID, VARID, NAME, rvals_A)
rvals=rvals_A(1)
end function NF_GET_ATT_REAL_SC
INTEGER FUNCTION NF_PUT_ATT_DOUBLE_SC (NCID, VARID, NAME, XTYPE, &
LEN, DVALS)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
integer, intent ( in) :: XTYPE
integer, intent ( in) :: LEN
doubleprecision, intent ( in) :: DVALS
doubleprecision, dimension(1) :: DVALS_A
DVALS_A=DVALS
NF_PUT_ATT_DOUBLE_SC=NF_PUT_ATT_DOUBLE (NCID, VARID, NAME, XTYPE, &
LEN, DVALS_A)
end function NF_PUT_ATT_DOUBLE_SC
INTEGER FUNCTION NF_GET_ATT_DOUBLE_SC (NCID, VARID, NAME, dvals)
integer, intent ( in) :: NCID
integer, intent ( in) :: VARID
character (len = *), intent ( in) :: NAME
doubleprecision, intent (out) :: dvals
doubleprecision, dimension(1) :: dvals_A
NF_GET_ATT_DOUBLE_SC=NF_GET_ATT_DOUBLE (NCID, VARID, NAME, dvals_A)
dvals=dvals_A(1)
end function NF_GET_ATT_DOUBLE_SC
end module netcdf