Skip to content
Snippets Groups Projects
Commit 102616e3 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Open with iostat instead of inquiring

parent d3e44a88
No related branches found
No related tags found
No related merge requests found
......@@ -15,22 +15,17 @@ program test_write_eddy
implicit none
TYPE(shpc_slice_handler) hshpc
integer i, ishape
integer i, ishape, iostat
integer:: n_eddies = 50000
logical exist
logical:: mixed = .true.
namelist /main_nml/ n_eddies, mixed
!--------------------------------------------------------------
inquire(file = "SHPC_cyclo/extremum.shp", exist = exist)
if (exist) then
call shpc_open(hshpc, shpc_dir = "SHPC_cyclo", pszaccess = "rb+")
else
call shpc_create(hshpc, shpc_dir = "SHPC_cyclo", cyclone = .true.)
end if
call shpc_open(hshpc, shpc_dir = "SHPC_cyclo", pszaccess = "rb+", &
iostat = iostat)
if (iostat /= 0) call shpc_create(hshpc, shpc_dir = "SHPC_cyclo", &
cyclone = .true.)
print *, "Enter namelist main_nml."
read(unit = *, nml = main_nml)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment