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

minor setup update

parent 6d2c8445
No related branches found
No related tags found
No related merge requests found
...@@ -111,7 +111,7 @@ program sfx_main ...@@ -111,7 +111,7 @@ program sfx_main
write(*, *) ' --dataset [key]' write(*, *) ' --dataset [key]'
write(*, *) ' key = mosaic (default) || irgason || sheba' write(*, *) ' key = mosaic (default) || irgason || sheba'
write(*, *) ' = lake || papa || toga || user [files]' write(*, *) ' = lake || papa || toga || user [files]'
write(*, *) ' files = in-common-file in-file out-file' write(*, *) ' files = in-common-file in-file'
write(*, *) ' --output [file]' write(*, *) ' --output [file]'
write(*, *) ' set output filename ' write(*, *) ' set output filename '
write(*, *) ' --nmax [value]' write(*, *) ' --nmax [value]'
...@@ -123,6 +123,7 @@ program sfx_main ...@@ -123,6 +123,7 @@ program sfx_main
write(*, *) ' FAILURE! > missing model [key] argument' write(*, *) ' FAILURE! > missing model [key] argument'
stop stop
end if end if
call get_command_argument(i + 1, arg) call get_command_argument(i + 1, arg)
model_id = get_model_id(arg) model_id = get_model_id(arg)
if (model_id == -1) then if (model_id == -1) then
...@@ -135,6 +136,7 @@ program sfx_main ...@@ -135,6 +136,7 @@ program sfx_main
write(*, *) ' FAILURE! > missing dataset [key] argument' write(*, *) ' FAILURE! > missing dataset [key] argument'
stop stop
end if end if
call get_command_argument(i + 1, arg) call get_command_argument(i + 1, arg)
dataset_id = get_dataset_id(arg) dataset_id = get_dataset_id(arg)
if (dataset_id == -1) then if (dataset_id == -1) then
...@@ -143,22 +145,21 @@ program sfx_main ...@@ -143,22 +145,21 @@ program sfx_main
end if end if
if (dataset_id == dataset_user) then if (dataset_id == dataset_user) then
if (i + 4 > num_args) then if (i + 3 > num_args) then
write(*, *) ' FAILURE! > incorrect arguments for [user] dataset' write(*, *) ' FAILURE! > incorrect arguments for [user] dataset'
stop stop
end if end if
call get_command_argument(i + 2, filename_in_common) call get_command_argument(i + 2, filename_in_common)
call get_command_argument(i + 3, filename_in) call get_command_argument(i + 3, filename_in)
call get_command_argument(i + 4, filename_out)
end if end if
end if end if
if (trim(arg) == trim(arg_key_output)) then if (trim(arg) == trim(arg_key_output)) then
if (i == num_args) then if (i == num_args) then
write(*, *) ' FAILURE! > missing dataset [key] argument' write(*, *) ' FAILURE! > missing output [key] argument'
stop stop
end if end if
is_output_set = 1
call get_command_argument(i + 1, filename_out) call get_command_argument(i + 1, filename_out)
is_output_set = 1
end if end if
if (trim(arg) == trim(arg_key_nmax)) then if (trim(arg) == trim(arg_key_nmax)) then
if (i == num_args) then if (i == num_args) then
...@@ -251,33 +252,28 @@ program sfx_main ...@@ -251,33 +252,28 @@ program sfx_main
if (dataset_id == dataset_mosaic) then if (dataset_id == dataset_mosaic) then
filename_in_common = 'data/MOSAiC_zh.txt' filename_in_common = 'data/MOSAiC_zh.txt'
filename_in = 'data/MOSAiC.txt' filename_in = 'data/MOSAiC.txt'
if (is_output_set == 0) filename_out = 'out_MOSAiC.txt'
else if (dataset_id == dataset_irgason) then else if (dataset_id == dataset_irgason) then
filename_in_common = 'data/IRGASON_zh.txt' filename_in_common = 'data/IRGASON_zh.txt'
filename_in = 'data/Irgason1.txt' filename_in = 'data/Irgason1.txt'
if (is_output_set == 0) filename_out = 'out_IRGASON1.txt'
else if (dataset_id == dataset_sheba) then else if (dataset_id == dataset_sheba) then
filename_in_common = 'data/Sheba1_zh.txt' filename_in_common = 'data/Sheba1_zh.txt'
filename_in = 'data/Sheba1.txt' filename_in = 'data/Sheba1.txt'
if (is_output_set == 0) filename_out = 'out_Sheba.txt'
else if (dataset_id == dataset_lake) then else if (dataset_id == dataset_lake) then
filename_in_common = 'data/Kuivajarvi_zh.txt' filename_in_common = 'data/Kuivajarvi_zh.txt'
filename_in = 'data/Kuivajarvi.txt' filename_in = 'data/Kuivajarvi.txt'
if (is_output_set == 0) filename_out = 'out_Kuivajarvi.txt'
else if (dataset_id == dataset_papa) then else if (dataset_id == dataset_papa) then
filename_in_common = 'data/Papa_zh.txt' filename_in_common = 'data/Papa_zh.txt'
filename_in = 'data/Papa.txt' filename_in = 'data/Papa.txt'
if (is_output_set == 0) filename_out = 'out_Papa.txt'
else if (dataset_id == dataset_toga) then else if (dataset_id == dataset_toga) then
filename_in_common = 'data/Toga_zh.txt' filename_in_common = 'data/Toga_zh.txt'
filename_in = 'data/Toga.txt' filename_in = 'data/Toga.txt'
if (is_output_set == 0) filename_out = 'out_Toga.txt'
else if (dataset_id == dataset_user) then else if (dataset_id == dataset_user) then
! ---> skipping ! ---> skipping
else else
write(*, *) ' FAILURE! > unknown dataset id: ', dataset_id write(*, *) ' FAILURE! > unknown dataset id: ', dataset_id
stop stop
end if end if
if (is_output_set == 0) filename_out = 'output-' // trim(dataset_name) // '.txt'
write(*, *) ' Running SFX model' write(*, *) ' Running SFX model'
write(*, *) ' model = ', trim(model_name) write(*, *) ' model = ', trim(model_name)
......
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