README.md 1.63 KB
Newer Older
Eva Börgens's avatar
Eva Börgens committed
1
2
# Regional TWS Uncertainty

Eva Börgens's avatar
Eva Börgens committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Python tool box, which allows the user to calculate mean TWS time series, 
their uncertainties, and regional covariance matrices for arbitrary regions.
## usage: 
sh tws_covariances.sh [-h] -f FILENAME -r REGION -o OUTPUT [-m] [-u] [-t]

arguments:

  -h, --help            show this help message and exit

  -f FILENAME, --filename FILENAME  Filename of the netcdf TWS input file, as downloaded from gravis.gfz-potsdam.de
  
-r REGION, --region REGION
                        Filename of the ascii file defining the requested region. List of coordinates lon, lat,
                        each line one coordinate. Coordinates have to be on an even spaced grid. Comment lines have to
                        start with '#'
  
-o OUTPUT, --output OUTPUT
                        Filename of the netcdf output file
  
-m, --matrix          Return full covariance matrix
  
-u, --uncertainty     Return time series of standard deviations for mean TWS time series
  
-t, --timeseries      Return mean TWS time series. For this option the region grid points have to be on the TWS
                        grid given in filename

29
NOTE: Either -m or -u or -t flag has to be set!
Eva Börgens's avatar
Eva Börgens committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43

Please see requirements file for the required Python packaged. This package has been tested with the version numbers
listed in the requirement file.

## Examples: 
How to get the region file:

From gridded mask stored in netcdf (region=1, else=0), requires cdo:

    cdo gmtxyz region.nc | awk '$3 ~ /1/ { print $0 }' | cut -f 1,2 > region.gmt

From outline polygone, requires cdo and GMT :

    cdo gmtxyz FILENAME| gmt select -Fpolygone.txt | cut -f 1,2> region.gmt