Skip to content

Commit

Permalink
Upgrade to Python 3.7 (#18)
Browse files Browse the repository at this point in the history
* Combine the three component multipliers (Ms, Mh and Mt) into a single band, repeated for each wind direction (E, N, NE, NW, S, SE, SW, W). Each band is then stored in a single geotiff file for each tile.
* `mpi_runner.py` creates a Virtual Raster Table (VRT) that allows a virtual GDAL dataset to be composed from other datasets.
* Created dataset dimensions are set by the input dataset dimensions, not fixed
* Handles the case of an empty input file, but not in an ideal way (replace missing file with values of 1)
* PyPar replaced by mpi4py
* TCRM-108: Fixed crash due to fraction indices.
* TCRM-108: Python version change to 3.7
* TCRM-108: Adding test terrain_table data.
* Update for PEP8 conformance test

Co-authored-by: MahmudulHasanGA <[email protected]>
  • Loading branch information
wcarthur and mahmudulhasanGA authored Mar 22, 2021
1 parent 22e643e commit f80e458
Show file tree
Hide file tree
Showing 57 changed files with 1,200 additions and 531 deletions.
26 changes: 14 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,42 @@ branches:
except:
- notebooks
python:
- "2.7"
# install system dependencies
- "3.7"
# install system dependencies
before_install:
- sudo apt-get update -qq
- sudo apt-get install build-essential
- sudo apt-get install libhdf5-serial-dev
- sudo apt-get install libnetcdf-dev
- sudo apt-get install python-dev
- sudo apt-get install libgeos-c1 libgeos-dev
- sudo apt-get install python3-dev
- sudo apt-get install libgeos-c1v5 libgeos-dev
- sudo apt-get install libatlas-base-dev gfortran
- sudo apt-get install libblas3gf
- sudo apt-get install libblas3
- sudo apt-get install libc6
- sudo apt-get install libgcc1
- sudo apt-get install libgfortran3
- sudo apt-get install liblapack3gf
- sudo apt-get install liblapack3
- sudo apt-get install libstdc++6

# install Python dependencies
install:
# - sudo pip install conda
# - sudo conda init
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
-O miniconda.sh; else wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O miniconda.sh; fi
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- deps='pip numpy scipy matplotlib nose coverage numexpr gdal'
- conda create -p $HOME/py --yes $deps "python=$TRAVIS_PYTHON_VERSION"
- conda info -a
- deps='pip numpy scipy nose coverage numexpr gdal mpi4py openssh'
- conda create -p $HOME/py --yes $deps "python=$TRAVIS_PYTHON_VERSION" -c conda-forge
- export PATH=$HOME/py/bin:$PATH
- pip install pycurl
- pip -v install -r requirements.txt
- pip -v install -r requirements.txt
- export PYTHONPATH="${PYTHONPATH}:$HOME:${TRAVIS_BUILD_DIR}/utilities:${TRAVIS_BUILD_DIR}/topographic:${TRAVIS_BUILD_DIR}/tests:${TRAVIS_BUILD_DIR}/tests/test_topographic"
#- echo "${PYTHONPATH}"
#- echo "${TRAVIS_BUILD_DIR}"
branches:
except:
- notebooks
Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
The Wind Multiplier Computation Software
=============================
========================================

This package is used to produce wind multipliers including terrain, shielding and topographic multipliers.

Dependencies
=========
* `Python (2.7 preferred) <https://www.python.org/>`_, `Numpy <http://www.numpy.org/>`_, `Scipy <http://www.scipy.org/>`_, `GDAL <http://www.gdal.org/>`_, `netcdf4-python <https://code.google.com/p/netcdf4-python>`_;
* For parallel execution, `Pypar <http://github.com/daleroberts/pypar>`_ is required;
============
* `Python (3.7 preferred) <https://www.python.org/>`_, `Numpy <http://www.numpy.org/>`_, `Scipy <http://www.scipy.org/>`_, `GDAL <http://www.gdal.org/>`_, `netcdf4-python <https://code.google.com/p/netcdf4-python>`_;
* For parallel execution, `mpi4py <https://github.com/mpi4py/mpi4py>`_ is required;

Usage
====
=====

The script for deriving terrain, shielding and topographic multipliers is
all_multipliers.py that links four modules: terrain, shielding, topographic and utilities.
Expand All @@ -26,7 +26,7 @@ configured. The following options need to be set in the configuration file:

Start to run all_multipliers.py. The results are located under output folder (created automatically during the process) under root directory.

This software implements parallelisation using PyPar for MPI handling. To run it in parallel mode, use
This software implements parallelisation using mpi4py for MPI handling. To run it in parallel mode, use
mpirun -np ncpu python all_mulitpliers.py, while ncpu is the
number of CPUs adopted.

Expand All @@ -43,7 +43,7 @@ The csv file requires the following headings:
Values for these parameters can be found in the following GA Record, `'Local Wind Assessment in Australia: Computation Methodology for Wind Multipliers' <https://ecat.ga.gov.au/geonetwork/srv/eng/search#!d5a59415-611a-4ad5-e044-00144fdd4fa6>`_.

Change log (develop branch)
==========
===========================
* Terrain classification input dataset configuration is no longer hard-coded. A terrain_table is now used
to facilitate ingenstion of the terrain dataset. (May 2017)
* Input file formats no longer fixed. File formats able to be read in with gdal.Open can now be used as the
Expand Down
Loading

0 comments on commit f80e458

Please sign in to comment.