|
Last change
on this file since 5122 was
5088,
checked in by abarral, 16 months ago
|
|
Remove all managed netcdf77 usage (excluding external: rrtm, ecrad)
Remove call to netcdf.inc
Replace USE lmdz_netcdf by USE netcdf
Replace lmdz_netcdf.F90 by lmdz_netcdf_format.F90
|
|
File size:
805 bytes
|
| Line | |
|---|
| 1 | module nf95_open_m |
|---|
| 2 | |
|---|
| 3 | implicit none |
|---|
| 4 | |
|---|
| 5 | contains |
|---|
| 6 | |
|---|
| 7 | subroutine nf95_open(path, mode, ncid, chunksize, ncerr) |
|---|
| 8 | |
|---|
| 9 | use nf95_abort_m, only: nf95_abort |
|---|
| 10 | use netcdf, only: nf90_open |
|---|
| 11 | use nf95_constants, only: nf95_noerr |
|---|
| 12 | |
|---|
| 13 | character(len=*), intent(in):: path |
|---|
| 14 | integer, intent(in):: mode |
|---|
| 15 | integer, intent(out):: ncid |
|---|
| 16 | integer, intent(inout), optional:: chunksize |
|---|
| 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_open(path, mode, ncid, chunksize) |
|---|
| 25 | |
|---|
| 26 | if (present(ncerr)) then |
|---|
| 27 | ncerr = ncerr_not_opt |
|---|
| 28 | else |
|---|
| 29 | if (ncerr_not_opt /= nf95_noerr) call nf95_abort("nf95_open " // path, & |
|---|
| 30 | ncerr_not_opt) |
|---|
| 31 | end if |
|---|
| 32 | |
|---|
| 33 | end subroutine nf95_open |
|---|
| 34 | |
|---|
| 35 | end module nf95_open_m |
|---|
Note: See
TracBrowser
for help on using the repository browser.