-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add multi-gauge facilitation #10
base: main
Are you sure you want to change the base?
Conversation
- implemented first version of batchprocessing of idgauges.asc file (still buggy, facc values are written although full_like is used)
…pandas dependency, fixed bug when writing basin mask, refactored types of gauge attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments. Let's see what CI says.
@@ -36,15 +37,15 @@ To get a recent version of GDAL, you can use the ppa of [ubuntugis](https://laun | |||
sudo add-apt-repository ppa:ubuntugis/ppa | |||
sudo apt-get update | |||
sudo apt install gdal-bin libgdal-dev | |||
pip install wheel numpy | |||
pip install wheel numpy pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to add pandas here (it's only to install gdal correctly)
pip install GDAL==$(gdal-config --version) | ||
``` | ||
|
||
#### MacOS | ||
GDAL can be installed with [homebrew](https://formulae.brew.sh/formula/gdal): | ||
``` | ||
brew install gdal | ||
pip install wheel numpy | ||
pip install wheel numpy pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to add pandas here (it's only to install gdal correctly)
@@ -60,7 +61,7 @@ pipwin install gdal | |||
It is best to use basinex with conda to have gdal and NetCDF installed properly. | |||
To use the development version of basinex, download this repository and do the following in your conda environment: | |||
|
|||
conda install -y gdal netcdf4 pyyaml cxx-compiler | |||
conda install -y gdal netcdf4 pyyaml cxx-compiler pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here pandas is correct ;-)
- `AREA = N_cells * res_x * ( cos(LAT) * res_y ) * scaling factor^2` | ||
- `matching:` - **Required**: gauge matching parameters | ||
- **Note**: | ||
The gauge matching is based on the flowaccumulation data. The value for | ||
any given cell in the flowaccumulation grid is interpreted as the size | ||
[in cells] of a river basin drainig into the respective cell. | ||
[in cells] of a river basin draining into the respective cell. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
@@ -4,6 +4,9 @@ | |||
|
|||
import numpy as np | |||
|
|||
# precision for rounding to avoid numerical instabilities | |||
PRECISION = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make this an optional input in the config.yaml file?
@@ -89,6 +90,7 @@ def gridBasinMask(gauge): | |||
fill_value=var.fill_value, | |||
cellsize=nc.cellsize, | |||
) | |||
out._fobj = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so strange, but thanks for the fix.
implemented some new features