test cases/frameworks/26 netcdf/main.f90
raw| 1 | use netcdf |
| 2 | |
| 3 | implicit none |
| 4 | |
| 5 | integer :: ncid |
| 6 | |
| 7 | call check( nf90_create("foo.nc", NF90_CLOBBER, ncid) ) |
| 8 | |
| 9 | call check( nf90_close(ncid) ) |
| 10 | |
| 11 | contains |
| 12 | |
| 13 | subroutine check(status) |
| 14 | integer, intent (in) :: status |
| 15 | |
| 16 | if(status /= nf90_noerr) error stop trim(nf90_strerror(status)) |
| 17 | end subroutine check |
| 18 | |
| 19 | end program |