Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wcarthur committed Mar 5, 2023
2 parents e28b5fb + a9be18f commit 34e4aca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 5 additions & 1 deletion ProcessMultipliers/processMultipliers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import numpy as np
import numpy.ma as ma
from botocore.exceptions import ClientError

from osgeo import osr, gdal, gdalconst
from osgeo.gdal_array import BandReadAsArray, CopyDatasetInfo, BandWriteArray
from netCDF4 import Dataset
Expand Down Expand Up @@ -199,7 +200,7 @@ def checkOutputFolders(self, working_dir, type_mapping):
:param dict type_mapping: dict of shielding, terrain, topographic
'''
dir_check = os.path.isdir(working_dir)
if dir_check == False:
if dir_check is False:
os.makedirs(working_dir)
log.info('Creating directories for outputs')
else:
Expand Down Expand Up @@ -977,13 +978,15 @@ def processMultV2(wspd, uu, vv, lon, lat, working_dir, dirns,
m4_max_file_obj = gdal.Open(m4_max_file, gdal.GA_ReadOnly)

gdal.SetConfigOption('GDAL_NUM_THREADS', str(max_working_threads))

reprojectDataset(wind_raster, m4_max_file_obj, wind_prj_file,
warp_memory_limit=warp_memory_limit)
reprojectDataset(bear_raster, m4_max_file_obj, bear_prj_file,
warp_memory_limit=warp_memory_limit,
resampling_method=gdalconst.GRA_NearestNeighbour)

gdal.SetConfigOption('GDAL_NUM_THREADS', '1')

future_requests.append(e.submit(reprojectDataset, uu_raster, m4_max_file_obj, uu_prj_file,
warp_memory_limit=warp_memory_limit,
resampling_method=gdalconst.GRA_NearestNeighbour))
Expand Down Expand Up @@ -1059,6 +1062,7 @@ def call_process_multiplier_segment(segment_queue, source_dir_band, wind_prj, be
while not segment_queue.empty():
processMultiplierSegment(segment_queue.get(), source_dir_band, wind_prj, bear_prj, dst_band)


def processMultiplierSegment(segment, source_dir_band, wind_prj, bear_prj, dst_band):
"""
Calculates local wind multiplier data by image segments
Expand Down
11 changes: 6 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,19 @@ TCRM requires:
Status
======

.. image:: https://github.com/GeoscienceAustralia/tcrm/actions/workflows/tcrm-tests.yml/badge.svg?branch=develop

.. image:: https://github.com/GeoscienceAustralia/tcrm/actions/workflows/tcrm-tests.yml/badge.svg?branch=master
:target: https://github.com/GeoscienceAustralia/tcrm/actions/workflows/tcrm-tests.yml
:alt: Build status


.. image:: https://coveralls.io/repos/GeoscienceAustralia/tcrm/badge.svg?branch=develop
:target: https://coveralls.io/r/GeoscienceAustralia/tcrm?branch=develop
.. image:: https://coveralls.io/repos/GeoscienceAustralia/tcrm/badge.svg?branch=master
:target: https://coveralls.io/r/GeoscienceAustralia/tcrm?branch=master
:alt: Test coverage


.. image:: https://landscape.io/github/GeoscienceAustralia/tcrm/develop/landscape.svg?style=flat
:target: https://landscape.io/github/GeoscienceAustralia/tcrm/develop
.. image:: https://landscape.io/github/GeoscienceAustralia/tcrm/master/landscape.svg?style=flat
:target: https://landscape.io/github/GeoscienceAustralia/tcrm/master
:alt: Code Health

.. image:: https://zenodo.org/badge/10637300.svg
Expand Down

0 comments on commit 34e4aca

Please sign in to comment.