Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update unit tests to remove some downloading #565

Merged
merged 13 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+ Fix bug in fillna3D for NaNs at elevations higher than present in the weather model
+ write delays even if they contain nans
+ check that the aoi is contained within HRRR extent
+ streamline some unit tests to remove downloading
+ move the ray building out of the _build_cube_ray and into its own function for cleaner testing
+ update the tests to use the new build_ray function
+ If the processed weather file exists use it; otherwise check if raw exists and covers study area; otherwise download new
Expand Down
9 changes: 0 additions & 9 deletions test/scenario_5/hgt.hdr

This file was deleted.

Binary file removed test/scenario_5/hgt.rdr
Binary file not shown.
23 changes: 0 additions & 23 deletions test/scenario_5/hgt.rdr.aux.xml

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenario_5/lat.hdr

This file was deleted.

Binary file removed test/scenario_5/lat.rdr
Binary file not shown.
23 changes: 0 additions & 23 deletions test/scenario_5/lat.rdr.aux.xml

This file was deleted.

18 changes: 0 additions & 18 deletions test/scenario_5/lat.rdr.vrt

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenario_5/lon.hdr

This file was deleted.

Binary file removed test/scenario_5/lon.rdr
Binary file not shown.
23 changes: 0 additions & 23 deletions test/scenario_5/lon.rdr.aux.xml

This file was deleted.

18 changes: 0 additions & 18 deletions test/scenario_5/lon.rdr.vrt

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenario_5/los.hdr

This file was deleted.

Binary file removed test/scenario_5/los.rdr
Binary file not shown.
16 changes: 0 additions & 16 deletions test/scenario_5/los.rdr.vrt

This file was deleted.

16 changes: 16 additions & 0 deletions test/scenario_5/temp.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can / should this yaml file be created on the fly like the other ones?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, can/should it point to the global testing WM_DIR (RAiDER/test/weather_files)?

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
aoi_group:
bounding_box:
- 28
- 39
- -123
- -112
date_group:
date_end: '20200130'
date_start: '20200124'
date_step: 3
runtime_group:
output_directory: /Users/jlmd9g/software/RAiDER/test/scenario_5
weather_model_directory: /Users/jlmd9g/software/RAiDER/test/scenario_5/weather_files
time_group:
time: 00:00:00
weather_model: GMAO
1 change: 0 additions & 1 deletion test/scenario_5/warpedDEM.dem

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenario_5/warpedDEM.dem.vrt

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenario_5/warpedDEM.hdr

This file was deleted.

2 changes: 0 additions & 2 deletions test/scenario_5/wmtype

This file was deleted.

Binary file removed test/scenario_5/wrfout_d01_2010-06-25
Binary file not shown.
Binary file removed test/scenario_5/wrfplev_d01_2010-06-25
Binary file not shown.
11 changes: 8 additions & 3 deletions test/scenario_6/lat.hdr
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
ENVI
samples = 226
lines = 45
description = {
lat.rdr}
samples = 7
lines = 7
bands = 1
header offset = 0
file type = ENVI Standard
data type = 5
data type = 4
interleave = bsq
byte order = 0
band names = {
Band 1}
data ignore value = -9999
Binary file modified test/scenario_6/lat.rdr
Binary file not shown.
31 changes: 31 additions & 0 deletions test/scenario_6/lat.rdr.aux.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<PAMDataset>
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="INTERLEAVE">BAND</MDI>
</Metadata>
<Metadata>
<MDI key="Band_1">Band 1</MDI>
</Metadata>
<Metadata domain="ENVI">
<MDI key="bands">1</MDI>
<MDI key="band_names">{Band 1}</MDI>
<MDI key="byte_order">0</MDI>
<MDI key="data_ignore_value">-9999</MDI>
<MDI key="data_type">4</MDI>
<MDI key="description">{lat.rdr}</MDI>
<MDI key="file_type">ENVI Standard</MDI>
<MDI key="header_offset">0</MDI>
<MDI key="interleave">bsq</MDI>
<MDI key="lines">7</MDI>
<MDI key="samples">7</MDI>
</Metadata>
<PAMRasterBand band="1">
<NoDataValue>-9.99900000000000E+03</NoDataValue>
<Metadata>
<MDI key="STATISTICS_MAXIMUM">16.536458969116</MDI>
<MDI key="STATISTICS_MEAN">16.150135176522</MDI>
<MDI key="STATISTICS_MINIMUM">15.763768196106</MDI>
<MDI key="STATISTICS_STDDEV">0.25285638219246</MDI>
<MDI key="STATISTICS_VALID_PERCENT">100</MDI>
</Metadata>
</PAMRasterBand>
</PAMDataset>
18 changes: 0 additions & 18 deletions test/scenario_6/lat.rdr.vrt

This file was deleted.

11 changes: 8 additions & 3 deletions test/scenario_6/lon.hdr
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
ENVI
samples = 226
lines = 45
description = {
lon.rdr}
samples = 7
lines = 7
bands = 1
header offset = 0
file type = ENVI Standard
data type = 5
data type = 4
interleave = bsq
byte order = 0
band names = {
Band 1}
data ignore value = -9999
Binary file modified test/scenario_6/lon.rdr
Binary file not shown.
22 changes: 15 additions & 7 deletions test/scenario_6/lon.rdr.aux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@
<Metadata domain="IMAGE_STRUCTURE">
<MDI key="INTERLEAVE">BAND</MDI>
</Metadata>
<Metadata>
<MDI key="Band_1">Band 1</MDI>
</Metadata>
<Metadata domain="ENVI">
<MDI key="bands">1</MDI>
<MDI key="band_names">{Band 1}</MDI>
<MDI key="byte_order">0</MDI>
<MDI key="data_type">5</MDI>
<MDI key="data_ignore_value">-9999</MDI>
<MDI key="data_type">4</MDI>
<MDI key="description">{lon.rdr}</MDI>
<MDI key="file_type">ENVI Standard</MDI>
<MDI key="header_offset">0</MDI>
<MDI key="interleave">bsq</MDI>
<MDI key="lines">45</MDI>
<MDI key="samples">226</MDI>
<MDI key="lines">7</MDI>
<MDI key="samples">7</MDI>
</Metadata>
<PAMRasterBand band="1">
<NoDataValue>-9.99900000000000E+03</NoDataValue>
<Metadata>
<MDI key="STATISTICS_MAXIMUM">0</MDI>
<MDI key="STATISTICS_MEAN">-96.050506796609</MDI>
<MDI key="STATISTICS_MINIMUM">-101.6383676311</MDI>
<MDI key="STATISTICS_STDDEV">19.143507420765</MDI>
<MDI key="STATISTICS_MAXIMUM">-100.44786071777</MDI>
<MDI key="STATISTICS_MEAN">-100.56314943275</MDI>
<MDI key="STATISTICS_MINIMUM">-100.67877960205</MDI>
<MDI key="STATISTICS_STDDEV">0.057789502319966</MDI>
<MDI key="STATISTICS_VALID_PERCENT">100</MDI>
</Metadata>
</PAMRasterBand>
</PAMDataset>
18 changes: 0 additions & 18 deletions test/scenario_6/lon.rdr.vrt

This file was deleted.

4 changes: 4 additions & 0 deletions test/scenario_6/stations.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ID,Lat,Lon,Hgt_m
HOOT,33.10514,-116.78536,617.21204
TORP,33.79780,-118.33060,-5.21643

Binary file removed test/scenario_6/warpedDEM.dem
Binary file not shown.
18 changes: 0 additions & 18 deletions test/scenario_6/warpedDEM.dem.aux.xml

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenario_6/warpedDEM.hdr

This file was deleted.

2 changes: 0 additions & 2 deletions test/scenario_6/wmtype

This file was deleted.

Loading