source: LMDZ6/trunk/tools/netcdf95/Attributes/nf95_inquire_attribute.f90 @ 4918

Last change on this file since 4918 was 4918, checked in by Laurent Fairhead, 4 weeks ago

Reintegrated NetCDF95 in LMDZ so that it is compiled and made available by the makelmdz_fcm script.
The makelmdz_fcm creates the libnetcdf95 library and copies it in the tools/netcdf/lib directory, copying
the mod files in the tools/netcdf/include library.

File size: 1003 bytes
Line 
1module nf95_inquire_attribute_m
2
3  implicit none
4
5contains
6
7
8  subroutine nf95_inquire_attribute(ncid, varid, name, xtype, nclen, attnum, &
9       ncerr)
10
11    use nf95_abort_m, only: nf95_abort
12    use netcdf, only: nf90_inquire_attribute
13    use nf95_constants, only: nf95_noerr
14
15    integer,             intent( in)           :: ncid, varid
16    character (len = *), intent( in)           :: name
17    integer,             intent(out), optional :: xtype, nclen, attnum
18    integer, intent(out), optional:: ncerr
19
20    ! Variable local to the procedure:
21    integer ncerr_not_opt
22
23    !-------------------
24
25    ncerr_not_opt = nf90_inquire_attribute(ncid, varid, name, xtype, nclen, &
26         attnum)
27    if (present(ncerr)) then
28       ncerr = ncerr_not_opt
29    else
30       if (ncerr_not_opt /= nf95_noerr) call &
31            nf95_abort("nf95_inquire_attribute " // name, ncerr_not_opt, &
32            ncid, varid)
33    end if
34
35  end subroutine nf95_inquire_attribute
36
37end module nf95_inquire_attribute_m
Note: See TracBrowser for help on using the repository browser.