source: LMDZ6/branches/cirrus/tools/netcdf95/Datasets/nf95_enddef.f90 @ 5209

Last change on this file since 5209 was 4918, checked in by Laurent Fairhead, 7 months 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: 819 bytes
Line 
1module nf95_enddef_m
2
3  implicit none
4
5contains
6
7  subroutine nf95_enddef(ncid, h_minfree, v_align, v_minfree, r_align, ncerr)
8
9    use nf95_abort_m, only: nf95_abort
10    use netcdf, only: nf90_enddef
11    use nf95_constants, only: nf95_noerr
12
13    integer,           intent( in) :: ncid
14    integer, optional, intent( in) :: h_minfree, v_align, v_minfree, r_align
15    integer, intent(out), optional :: ncerr
16
17    ! Variable local to the procedure:
18    integer ncerr_not_opt
19
20    !-------------------
21
22    ncerr_not_opt = nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
23
24    if (present(ncerr)) then
25       ncerr = ncerr_not_opt
26    else
27       if (ncerr_not_opt /= nf95_noerr) call nf95_abort("nf95_enddef", &
28            ncerr_not_opt, ncid)
29    end if
30
31  end subroutine nf95_enddef
32
33end module nf95_enddef_m
Note: See TracBrowser for help on using the repository browser.