Package: ismn
Readers for the data from the International Soil Moisture Database (ISMN).DocumentationThe full documentation is available athttps://ismn.readthedocs.ioand includes
a tutorial on reading ISMN data in python after downloading it fromhttps://ismn.earthThe followingtutorialsare also available as ipython notebooksdocs/examples:ISMN reader basic functionalityAdding custom metadata readersData used in the tutorials isnotprovided in this package. Please create an account atismn.earthto download the required files.CitationIf you use the software in a publication then please cite it using the Zenodo DOI.
Be aware that this badge links to the latest package version.Please select your specific version athttps://doi.org/10.5281/zenodo.855308to get the DOI of that version.
You should normally always use the DOI for the specific version of your record in citations.
This is to ensure that other researchers can access the exact research artefact you used for reproducibility.You can find additional information regarding DOI versioning athttp://help.zenodo.org/#versioningInstallationThis package should be installable through pip:pip install ismnOptional dependenciesThecartopyandmatplotlibpackages are only needed when creating data visualisations.
They can be installed separately with:conda install -c conda-forge matplotlib
conda install -c conda-forge cartopyExample installation scriptThe following script will install miniconda and setup the environment on a UNIX
like system. Miniconda will be installed into$HOME/miniconda.wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
git clone git@github.com:TUW-GEO/ismn.git ismn
cd ismn
conda env create -f environment.yml
source activate ismnThis script adds$HOME/miniconda/bintemporarily to thePATHto do this
permanently addexportPATH="$HOME/miniconda/bin:$PATH"to your.bashrcor.zshrcThe second to last line in the example activates theismnenvironment.After that you should be able to run:pytestto run the test suite.DescriptionISMN data can be downloaded for free after creating an account on theISMN WebsiteISMN data can be downloaded in two different formats:Variables stored in separate files (CEOP formatted)this format is supported 100% and should work with all examplesVariables stored in separate files (Header+values)this format is supported 100% and should work with all examplesIf you downloaded ISMN data in one of the supported formats in the past it can
be that station names are not recognized correctly because they contained the
‘_’ character which is supposed to be the separator. If you experience problems
because of this please download new data from the ISMN since this issue should
be fixed.Landcover ClassificationThe ISMN data comes with information about landcover classification from the
ESA CCI land cover project (years 2000, 2005 and 2010) as well as from in-situ
measurements. To use ESA CCI land cover variables for filtering the data in the get_dataset_ids
function, set the keyword parameters (landcover_2000, landcover_2005 or landcover_2010)
to the corresponding integer values (e.g. 10) in the list below. To get a list of
possible values for filtering by in-situ values (keyword parameter: “landcover_insitu”),
call the get_landcover_types method of your ISMN_Interface object and set landcover=’landcover_insitu’.10: Cropland, rainfed11: Cropland, rainfed / Herbaceous cover12: Cropland, rainfed / Tree or shrub cover,20: Cropland, irrigated or post-flooding,30: Mosaic cropland (>50%) / natural vegetation (tree, shrub, herbaceous,40: Mosaic natural vegetation (tree, shrub, herbaceous cover) (>50%) / cropland (<50%),50: Tree cover, broadleaved, evergreen, Closed to open (>15%),60: Tree cover, broadleaved, deciduous, Closed to open (>15%),61: Tree cover, broadleaved, deciduous, Closed (>40%),62: Tree cover, broadleaved, deciduous, Open (15-40%),70: Tree cover, needleleaved, evergreen, closed to open (>15%),71: Tree cover, needleleaved, evergreen, closed (>40%),72: Tree cover, needleleaved, evergreen, open (15-40%),80: Tree cover, needleleaved, deciduous, closed to open (>15%),81: Tree cover, needleleaved, deciduous, closed (>40%),82: Tree cover, needleleaved, deciduous, open (15-40%),90: Tree cover, mixed leaf type (broadleaved and needleleaved),100: Mosaic tree and shrub (>50%) / herbaceous cover (<50%),110: Mosaic herbaceous cover (>50%) / tree and shrub (<50%),120: Shrubland,121: Shrubland / Evergreen Shrubland,122: Shrubland / Deciduous Shrubland,130: Grassland,140: Lichens and mosses,150: Sparse vegetation (tree, shrub, herbaceous cover) (<15%),152: Sparse vegetation (tree, shrub, herbaceous cover) (<15%) / Sparse shrub (<15%),153: Sparse vegetation (tree, shrub, herbaceous cover) (<15%) / Sparse herbaceous cover (<15%),160: Tree cover, flooded, fresh or brakish water,170: Tree cover, flooded, saline water,180: Shrub or herbaceous cover, flooded, fresh/saline/brakish water,190: Urban areas,200: Bare areas,201: Consolidated bare areas,202: Unconsolidated bare areas,210: Water,220: Permanent snow and ice,Climate ClassificationThe ISMN data comes with information about climate classification from the Koeppen-Geiger
Climate Classification (2007) as well as in-situ measurements. To use
Koeppen-Geiger variable for filtering the data in the get_dataset_ids function, set the
keyword parameter “climate” to the corresponding keys (e.g. ‘Af’) in the list below. To get a list of
possible values for filtering by in-situ values (keyword parameter: “climate_insitu”), call the
get_climate_types method of your ISMN_Interface object and set climate=’climate_insitu’.Af: Tropical RainforestAm: Tropical MonsoonAs: Tropical Savanna DryAw: Tropical Savanna WetBWk: Arid Desert ColdBWh: Arid Desert HotBWn: Arid Desert With Frequent FogBSk: Arid Steppe ColdBSh: Arid Steppe HotBSn: Arid Steppe With Frequent FogCsa: Temperate Dry Hot SummerCsb: Temperate Dry Warm SummerCsc: Temperate Dry Cold SummerCwa: Temperate Dry Winter, Hot SummerCwb: Temperate Dry Winter, Warm SummerCwc: Temperate Dry Winter, Cold SummerCfa: Temperate Without Dry Season, Hot SummerCfb: Temperate Without Dry Season, Warm SummerCfc: Temperate Without Dry Season, Cold SummerDsa: Cold Dry Summer, Hot SummerDsb: Cold Dry Summer, Warm SummerDsc: Cold Dry Summer, Cold SummerDsd: Cold Dry Summer, Very Cold WinterDwa: Cold Dry Winter, Hot SummerDwb: Cold Dry Winter, Warm SummerDwc: Cold Dry Winter, Cold SummerDwd: Cold Dry Winter, Very Cold WinterDfa: Cold Dry Without Dry Season, Hot SummerDfb: Cold Dry Without Dry Season, Warm SummerDfc: Cold Dry Without Dry Season, Cold SummerDfd: Cold Dry Without Dry Season, Very Cold WinterET: Polar TundraEF: Polar Eternal WinterW: WaterContributeWe are happy if you want to contribute. Please raise an issue explaining what
is missing or if you find a bug. We will also gladly accept pull requests
against our master branch for new features or bug fixes.Development setupFor Development we also recommend acondaenvironment. You can create one
including test dependencies and debugger by runningconda env create-fenvironment.yml. This will create a newismnenvironment which you can activate by usingconda activate ismn.GuidelinesIf you want to contribute please follow these steps:Fork the ismn repository to your accountClone the repositorymake a new feature branch from the ismn master branchAdd your featurePlease include tests for your contributions in one of the test directories.
We use pytest so a simple function called test_my_feature is enoughsubmit a pull request to our master branchCode FormattingTo apply pep8 conform styling to any changed files [we useyapf](https://github.com/google/yapf). The correct
settings are already set insetup.cfg. Therefore the following command
should be enough:yapf file.py –in-placeRelease new versionTo release a new version of this package, make sure all tests are passing on the
master branch and the CHANGELOG.rst is up-to-date, with changes for the new version
at the top.Then draft a new release athttps://github.com/TUW-GEO/ismn/releases.
Create a version tag following thev{MAJOR}.{MINOR}.{PATCH}pattern.
This will trigger a new build on GitHub and should push the packages to pypi after
all tests have passed.If this does not work (tests pass but upload fails) you can download thewhlanddistpackages for each workflow run fromhttps://github.com/TUW-GEO/ismn/actions(Artifacts) and push them manually tohttps://pypi.org/project/ismn/(you need to be a package maintainer on pypi for that).In any case,pip install ismnshould download the newest version afterwards.