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