Skip to content

Repository files navigation

fierpy

Python: 3.8License: MITSERVIR: Global

Python implementation of the Forecasting Inundation Extents using REOF method

Based off of the methods from Chang et al., 2020

Installation

$ conda create -n fier -c conda-forge python=3.8 netcdf4 qt pyqt rioxarray numpy scipy xarray pandas scikit-learn eofs geoglows
$ conda activate fier
$ pip install git+https://github.com/servir/fierpy.git

To Install in OpenSARlab:

$ conda create --prefix /home/jovyan/.local/envs/fier python=3.8 netcdf4 qt pyqt rioxarray numpy scipy xarray pandas scikit-learn eofs geoglows jupyter kernda
$ conda activate fier
$ pip install git+https://github.com/servir/fierpy.git
$ /home/jovyan/.local/envs/fier/bin/python -m ipykernel install --user --name fier
$ conda run -n fier kernda /home/jovyan/.local/share/jupyter/kernels/fier/kernel.json --env-dir /home/jovyan/.local/envs/fier -o

Requirements

  • numpy
  • xarray
  • pandas
  • eofs
  • geoglows
  • scikit-learn
  • rasterio

Example use

importxarrayasxrimportfierpy# read sentinel1 time series imageryds=xr.open_dataset("sentine1.nc")
# apply rotated eof processreof_ds=fierpy.reof(ds.VV,n_modes=4)
# get streamflow data from GeoGLOWS# select the days we have observationslat,lon=11.7122,104.9653q=fierpy.get_streamflow(lat,lon)
q_sel=fierpy.match_dates(q,ds.time)
# apply polynomial to different modes to find best statsfit_test=fierpy.find_fits(reof_ds,q_sel,ds)

License and Distribution

fierpy is distributed by SERVIR under the terms of the MIT License. See LICENSE in this directory for more information.

Privacy & Terms of Use

fierpy abides to all of SERVIR's privacy and terms of use as described at https://servirglobal.net/Privacy-Terms-of-Use.

About

Python implementation of the Forecasting Inundation Extents using REOF

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages