source: LMDZ6/trunk/tools/netcdf95/Datasets/nf95_create.f90 @ 5319

Last change on this file since 5319 was 5084, checked in by Laurent Fairhead, 12 months ago

Reverting to r4065. Updating fortran standard broke too much stuff. Will do it by smaller chunks
AB, LF

File size: 944 bytes
Line 
1module nf95_create_m
2
3  implicit none
4
5contains
6
7  subroutine nf95_create(path, cmode, ncid, initialsize, chunksize, ncerr)
8
9    use nf95_abort_m, only: nf95_abort
10    use netcdf, only: nf90_create
11    use nf95_constants, only: nf95_noerr
12
13    character (len = *), intent(in   ) :: path
14    integer,             intent(in   ) :: cmode
15    integer,             intent(  out) :: ncid
16    integer, optional,   intent(in   ) :: initialsize
17    integer, optional,   intent(inout) :: chunksize
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_create(path, cmode, ncid, initialsize, chunksize)
26
27    if (present(ncerr)) then
28       ncerr = ncerr_not_opt
29    else
30       if (ncerr_not_opt /= nf95_noerr) call &
31            nf95_abort("nf95_create " // path, ncerr_not_opt)
32    end if
33
34  end subroutine nf95_create
35
36end module nf95_create_m
Note: See TracBrowser for help on using the repository browser.