Last change
on this file since 5435 was
5084,
checked in by Laurent Fairhead, 5 months ago
|
Reverting to r4065. Updating fortran standard broke too much stuff. Will do it by smaller chunks
AB, LF
|
File size:
762 bytes
|
Line | |
---|
1 | module nf95_close_m |
---|
2 | |
---|
3 | implicit none |
---|
4 | |
---|
5 | contains |
---|
6 | |
---|
7 | subroutine nf95_close(ncid, ncerr) |
---|
8 | |
---|
9 | ! Note that this procedure is called by nf95_abort, so it cannot |
---|
10 | ! call it. |
---|
11 | |
---|
12 | use netcdf, only: nf90_close, nf90_strerror |
---|
13 | |
---|
14 | use nf95_constants, only: nf95_noerr |
---|
15 | |
---|
16 | integer, intent(in):: ncid |
---|
17 | integer, intent(out), optional:: ncerr |
---|
18 | |
---|
19 | ! Variable local to the procedure: |
---|
20 | integer ncerr_not_opt |
---|
21 | |
---|
22 | !------------------- |
---|
23 | |
---|
24 | ncerr_not_opt = nf90_close(ncid) |
---|
25 | |
---|
26 | if (present(ncerr)) then |
---|
27 | ncerr = ncerr_not_opt |
---|
28 | else |
---|
29 | if (ncerr_not_opt /= nf95_noerr) then |
---|
30 | print *, "nf95_close:" |
---|
31 | print *, trim(nf90_strerror(ncerr_not_opt)) |
---|
32 | stop 1 |
---|
33 | end if |
---|
34 | end if |
---|
35 | |
---|
36 | end subroutine nf95_close |
---|
37 | |
---|
38 | end module nf95_close_m |
---|
Note: See
TracBrowser
for help on using the repository browser.