Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Eva Börgens
Regional TWS Uncertainty
Commits
52034e1b
Commit
52034e1b
authored
Jun 02, 2021
by
Eva Börgens
Browse files
Add functionality of time series only output
parent
2269a284
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
52034e1b
...
...
@@ -26,7 +26,7 @@ arguments:
-t, --timeseries Return mean TWS time series. For this option the region grid points have to be on the TWS
grid given in filename
NOTE: Either -m or -u flag has to be set!
NOTE: Either -m or -u
or -t
flag has to be set!
Please see requirements file for the required Python packaged. This package has been tested with the version numbers
listed in the requirement file.
...
...
src/__main__.py
View file @
52034e1b
...
...
@@ -14,13 +14,17 @@ region_coords = read_ascii(region_filename)
grid
,
grid_std
,
lon
,
lat
,
time
=
read_netcdf
(
filename
)
results
=
compute_covariance
(
region_coords
,
grid_std
,
flag_uncertainty
,
flag_matrix
)
timeseries
=
None
if
flag_timeseries
:
timeseries
,
flag_timeseries
=
get_timeseries
(
grid
,
lon
,
lat
,
region_coords
)
results
=
None
if
flag_uncertainty
or
flag_matrix
:
results
=
compute_covariance
(
region_coords
,
grid_std
,
flag_uncertainty
,
flag_matrix
)
save_results
(
out_filename
,
filename
,
results
,
region_coords
,
timeseries
,
flag_uncertainty
,
flag_matrix
,
flag_timeseries
)
save_results
(
out_filename
,
filename
,
results
,
region_coords
,
timeseries
,
flag_uncertainty
,
flag_matrix
,
flag_timeseries
)
...
...
src/input_arguments.py
View file @
52034e1b
...
...
@@ -51,8 +51,8 @@ def arg_parser():
)
args
=
parser
.
parse_args
()
if
not
args
.
matrix
and
not
args
.
uncertainty
:
raise
RuntimeError
(
"Either covariance matrix (-m) or uncertainties (-u) have to be set for the output"
)
if
not
args
.
matrix
and
not
args
.
uncertainty
and
not
args
.
timeseries
:
raise
RuntimeError
(
"Either covariance matrix (-m) or uncertainties (-u)
or timeseries (-t)
have to be set for the output
!
"
)
test_coordiantes
(
args
.
region
.
name
)
return
args
\ No newline at end of file
tws_covariances.sh
deleted
100644 → 0
View file @
2269a284
#!/bin/bash
python3
-m
tws_covariances
"
$@
"
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment