Skip to content
Snippets Groups Projects
Commit c4824763 authored by Evgeny Mortikov's avatar Evgeny Mortikov
Browse files

model setup update

parent 8ccaf9bb
Branches
No related tags found
No related merge requests found
...@@ -98,7 +98,6 @@ program obl_main ...@@ -98,7 +98,6 @@ program obl_main
character(len = 128) :: arg character(len = 128) :: arg
character(len = 128), parameter :: arg_key_help = '--help' character(len = 128), parameter :: arg_key_help = '--help'
character(len = 128), parameter :: arg_key_setup = '--setup'
character(len = 128), parameter :: arg_key_config = "--config" character(len = 128), parameter :: arg_key_config = "--config"
integer :: i, status integer :: i, status
...@@ -143,9 +142,9 @@ program obl_main ...@@ -143,9 +142,9 @@ program obl_main
return return
end if end if
if (trim(arg) == trim(arg_key_setup)) then if (trim(arg) == trim(arg_key_config)) then
if (i == num_args) then if (i == num_args) then
write(*, *) ' FAILURE! > missing setup [key] argument' write(*, *) ' FAILURE! > missing config [key] argument'
ierr = 1 ! signal ERROR ierr = 1 ! signal ERROR
return return
end if end if
...@@ -153,19 +152,8 @@ program obl_main ...@@ -153,19 +152,8 @@ program obl_main
call get_command_argument(i + 1, arg) call get_command_argument(i + 1, arg)
obl_setup = get_setup_id(arg) obl_setup = get_setup_id(arg)
if (obl_setup == -1) then if (obl_setup == -1) then
write(*, *) ' FAILURE! > unknown setup [key]: ', trim(arg)
ierr = 1 ! signal ERROR
return
end if
else if (trim(arg) == trim(arg_key_config)) then
if (i == num_args) then
write(*, *) ' FAILURE! > missing configuration file [key] argument'
ierr = 1 ! signal ERROR
return
end if
call get_command_argument(i + 1, arg)
#ifdef USE_CONFIG_PARSER #ifdef USE_CONFIG_PARSER
!< try reading configuration file
call c_config_run(trim(arg)//C_NULL_CHAR, status) call c_config_run(trim(arg)//C_NULL_CHAR, status)
if (status == 0) then if (status == 0) then
write(*, *) ' FAILURE! > unable to parse configuration file: ', trim(arg) write(*, *) ' FAILURE! > unable to parse configuration file: ', trim(arg)
...@@ -175,8 +163,13 @@ program obl_main ...@@ -175,8 +163,13 @@ program obl_main
!< forcing configuration file setup !< forcing configuration file setup
obl_setup = 999 obl_setup = 999
#else
write(*, *) ' FAILURE! > unknown config [key]: ', trim(arg)
ierr = 1 ! signal ERROR
return
#endif #endif
end if end if
endif
enddo enddo
!< setting grid !< setting grid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment