Closed kieranricardo closed 2 years ago
Merging #53 (57b17a0) into develop (4b2eeb6) will decrease coverage by
0.05%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## develop #53 +/- ##
===========================================
- Coverage 86.60% 86.55% -0.06%
===========================================
Files 26 26
Lines 1836 1844 +8
===========================================
+ Hits 1590 1596 +6
- Misses 246 248 +2
Impacted Files | Coverage Δ | |
---|---|---|
hazimp/raster.py | 98.92% <100.00%> (+0.10%) |
:arrow_up: |
hazimp/misc.py | 93.15% <0.00%> (-1.06%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4b2eeb6...57b17a0. Read the comment docs.
Hazimp already can read netcdf files using the GDAL API. There's a function hazimp.misc.mod_file_list()
that alters the supplied file name to be NETCDF:"<filename>":<variable>
, with both filename
and variable
required in the configuration: file.https://github.com/GeoscienceAustralia/hazimp/blob/ebe22f58a246645189bee12b9e6f4e0eebc4112b/hazimp/misc.py#L89 See also https://github.com/GeoscienceAustralia/hazimp/blob/ebe22f58a246645189bee12b9e6f4e0eebc4112b/hazimp/templates/wind.py#L206 and https://hazimp.readthedocs.io/en/latest/docs/user_guide.html#wind-template With that example configuration on the docs though, you can now use hazard_raster
instead of load_wind
my bad - I didn't realise this functionality already existed!
This PR enables
files_raster_data_at_points
to use netcdf files so thathazimp
can be run with the wind gusts files (without multipliers applied). A limitation is that only the first band is loaded in which is sufficient for this use case, and thetif
processing code does the same thing.