Skip to content

Latest commit

 

History

History
173 lines (139 loc) · 10.7 KB

installation.md

File metadata and controls

173 lines (139 loc) · 10.7 KB

Installation

Setting up Python Environment

  1. On the UMD cluster, first load the anaconda module and create a clone environment by typing the following commands on the terminal:
    module load python/3.8/anaconda
    conda create -n UMD --clone=/apps/python/3.8/anaconda

    On a non-UMD cluster or local machine, download and install the latest anaconda package wget -c https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
    bash Anaconda3-2022.05-Linux-x86_64.sh

  2. Next copy-paste the following commands into the terminal:
    conda init bash
    conda activate UMD
    conda update anaconda
    conda install gdal
    conda install rasterio
    conda install numpy
    conda install pandas
    conda install geopandas
    conda install scikit-learn
    conda install jupyterlab
    conda install matplotlib
    conda install seaborn
    conda install xarray
    conda install rasterstats
    conda install tqdm
    conda install pytest
    conda install sqlalchemy
    conda install scikit-image
    conda install scipy
    conda install pysal
    conda install beautifulsoup4
    conda install boto3
    conda install cython
    conda install statsmodels
    conda install future
    conda install graphviz
    conda install pylint
    conda install mlxtend
    conda install line_profiler
    conda install nodejs
    conda install sphinx
    conda install nbsphinx
    conda install catboost
    conda install arrow
    conda install contextily
    conda install openpyxl
    conda install -c conda-forge eemont
    conda install -c conda-forge logzero
    conda install -c conda-forge tinydb
    conda install -c anaconda netcdf4
    conda install -c conda-forge cachetools
    conda install -c conda-forge pygeoprocessing
    conda install -c conda-forge pygmt
    conda install -c conda-forge dataset
    conda install -c conda-forge pyresample
    conda install -c conda-forge cartopy
    conda install -c conda-forge eli5
    conda install -c conda-forge lime
    conda install -c conda-forge skrebate
    conda install -c conda-forge neptune-client
    conda install -c conda-forge xgboost
    conda install -c conda-forge pandas-profiling
    conda install -c conda-forge bottleneck
    conda install -c conda-forge chardet
    conda install -c conda-forge sentinelhub
    conda install -c conda-forge pygam
    conda install -c conda-forge watchdog
    conda install -c conda-forge retrying
    conda install -c conda-forge fiona
    conda install -c conda-forge tpot
    conda install -c conda-forge cdsapi
    conda install -c conda-forge scikit-garden
    conda install -c conda-forge neptune-client
    conda install -c conda-forge urllib3
    conda install -c ncar pynio
    conda install -c conda-forge mpi4py
    conda install -c conda-forge scikit-optimize
    conda install -c conda-forge requests
    pip install --upgrade git+https://github.com/ritviksahajpal/pygeoutil.git
    pip install merf tsfresh pyshp palettable geopy geocoder palettable forestci pangres sklearn-contrib-lightning wget pangres pycountry matplotlib-scalebar
    pip install git+https://github.com/GeoscienceAustralia/uncover-ml.git

MODIS NDVI

  1. Create an account on the NASA LAADS DAAC website

  2. Follow the instructions here to request a token for your account.

    • Login by going to Profile -> Earthdata Login
    profile
    • Enter your login credentials or register
    login
    • Select Profile -> Generate Token from the top menu generate token

    • Copy the token from this window and store it somewhere safe and secure token

  3. On your local machine/cluster, iIf not already installed, install octvi: https://pypi.org/project/octvi/

  4. On the command prompt type octviconfig and at the place it asks for a token, paste the token you copied earlier.

AgERA5

  1. Create an account on the CDS website

  2. Follow the instructions here to install the CDS API key on your local machine/cluster

  3. Follow these instructions to install the CDS API Key on your local machine/cluster

    1. For Windows users:

    (i)Login to CDS
    CDSLogin

    (ii)Copy a 2 line code, which shows a url and your own uid:API key details as followed:

    A.For CDS users, Go to this page and copy the 2 line code displayed in the black box in the "Install the CDS API key" section as shown below:
    CDSurl

    B.For ADS users, Go to thispage and copy the 2 line code displayed in the black box in the "Install the CDS API key" section as shown below:
    ADSurl

    (iii)Paste the 2 line code into a %USERPROFILE%.cdsapirc file, where in your windows environment, %USERPROFILE% is usually located at C:\Users\Username folder). The CDS API expects to find the .cdsapirc file in your home directory.

    (iv)Install the CDS API client by running the following command in a Command Prompt window: a. pip install cdsapi # for Python 2.7
    b. pip3 install cdsapi # for Python 3
    installcds

    (v)Once the CDS API client is installed, it can be used to request data from the datasets listed in the CDS and ADS catalogues. It is necessary to agree to the Terms of Use of every datasets that you intend to download. Attached to each dataset download form, the "Show API request" button displays the python code to be used.

    2. For Mac users:

    (i)Login to CDS CDSLogin

    (ii)Copy a 2 line code, which shows a url and your own uid:API key details as followed:

    A.For CDS users, Go to this page and copy the 2 line code displayed in the black box in the "Install the CDS API key" section as shown below:CDSurl

    B.For ADS users, Go to thispage and copy the 2 line code displayed in the black box in the "Install the CDS API key" section as shown below:ADSurl

    (iii)Create your key file in your home directory in your Terminal window as follows: touch ~/.cdsapirc

    (iv)Edit your key file and paste the two lines you copied in Step 2 above to your .cdsapirc key file.

    (v)Install the CDS API client using pip, by running the following command in your Terminal window: pip install cdsapi

    (vi)Once the CDS API client is installed, it can be used to request data from the datasets listed in the CDS and ADS catalogues. It is necessary to agree to the Terms of Use of every datasets that you intend to download. Attached to each dataset download form, the "Show API request" button displays the python code to be used.

    3. For Linux users:

    Install the API Key

    (i)If you don't have an account, please self register at the CDS registration page

    (ii)If you are not logged, please login and go to the step below.

    (iii)Copy the code displayed into HOME/.cdsapirc file (in your Unix/Linux environment).ADSurl

    Install the API Client

    (i)The CDS API client is a python based library. It provides support for both Python 2.7.x and Python 3.You can Install the CDS API client via the package management system pip, by running on Unix/Linux the command shown in the box beside ADSurl

    Use the CDS API client for data access

    (i)Once the CDS API client is installed, it can be used to request data from the datasets listed in the CDS catalogue. It is necessary to agree to the Terms of Use of every datasets that you intend to download.

    (ii)Attached to each dataset download form, the following button[show API Request]displays the python code to be used. The request can be formatted using the interactive form. The api call must follow the syntax:ADSurl

  4. If not already installed, install the cdsapi python library by typing pip install cdsapi in the command prompt.