-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from openmethane/remove-json-scripts
Remove scripts for transforming NetCDF to JSON
- Loading branch information
Showing
6 changed files
with
29 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Remove scripts to transform NetCDF files to JSON which are no longer needed |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import numpy | ||
|
||
def test_domain_attributes(input_domain): | ||
# Check domain matches projection used in calculations | ||
assert type(input_domain.attrs["TRUELAT1"]) == numpy.float32 | ||
assert type(input_domain.attrs["TRUELAT2"]) == numpy.float32 | ||
assert type(input_domain.attrs["MOAD_CEN_LAT"]) == numpy.float32 | ||
assert type(input_domain.attrs["STAND_LON"]) == numpy.float32 | ||
assert type(input_domain.attrs["XCENT"]) == numpy.float64 | ||
assert type(input_domain.attrs["YCENT"]) == numpy.float64 | ||
|
||
assert type(input_domain.attrs['DX']) == numpy.float32 | ||
assert input_domain.attrs['DX'] > 0 | ||
assert type(input_domain.attrs['DX']) == numpy.float32 | ||
assert input_domain.attrs['DY'] > 0 | ||
|
||
# Check domain matches projection used in calculations | ||
def test_domain_projection(config, input_domain): | ||
assert str(input_domain.attrs["TRUELAT1"]) in str(config.crs) | ||
assert str(input_domain.attrs["TRUELAT2"]) in str(config.crs) | ||
assert str(input_domain.attrs["MOAD_CEN_LAT"]) in str(config.crs) | ||
assert str(input_domain.attrs["STAND_LON"]) in str(config.crs) | ||
assert str(input_domain.attrs["XCENT"]) in str(config.crs) | ||
# TODO: is this a problem? | ||
# assert str(input_domain.attrs["YCENT"]) in str(config.crs) | ||
|
||
|
This file was deleted.
Oops, something went wrong.