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

Add message to suggest creation of directory SHPC

parent bee92321
No related branches found
No related tags found
No related merge requests found
module config_m module config_m
use, intrinsic:: ISO_FORTRAN_ENV
implicit none implicit none
real, protected:: min_amp = 0.001 real, protected:: min_amp = 0.001
...@@ -23,8 +25,9 @@ contains ...@@ -23,8 +25,9 @@ contains
! Local: ! Local:
logical exist logical exist
integer unit integer unit, iostat
namelist /config_nml/ min_amp, max_radius_deg, min_radius namelist /config_nml/ min_amp, max_radius_deg, min_radius
character(len = 1000) iomsg
!---------------------------------------------------------------------- !----------------------------------------------------------------------
...@@ -44,7 +47,14 @@ contains ...@@ -44,7 +47,14 @@ contains
read(unit, nml = config_nml) read(unit, nml = config_nml)
close(unit) close(unit)
open(unit, file = "SHPC/used_config_nml.txt", status = "replace", & open(unit, file = "SHPC/used_config_nml.txt", status = "replace", &
action = "write") action = "write", iostat = iostat, iomsg = iomsg)
if (iostat /= 0) then
write(error_unit, fmt = *) "Have you created directory SHPC?"
write(error_unit, fmt = *) trim(iomsg)
stop 1
end if
write(unit, nml = config_nml) write(unit, nml = config_nml)
close(unit) close(unit)
end if end if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment