-
Notifications
You must be signed in to change notification settings - Fork 296
PI-3473: Netcdf saving of ancillary variables #3550
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4fa387e
Unify common code in netcdf and support saving of ancillary vars.
pp-mo b03b88a
Small fixes, basic tests working.
pp-mo e15bcad
Stickler tweak.
pp-mo b3c7914
Tweak test so it will still work when cube.copy supports ancils.
pp-mo 005eab0
Rebased to use 'cube_dims' function, and tidied test.
pp-mo 81be7c0
Fix form of cell_measures attribute when saving.
pp-mo d21db1f
Removed spurious comment.
pp-mo f47aabb
Fix + check working, now cube.copy copies ancils.
pp-mo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
54 changes: 54 additions & 0 deletions
54
lib/iris/tests/results/netcdf/TestNetCDFSave__ancillaries/aliases.cdl
This file contains hidden or 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,54 @@ | ||
dimensions: | ||
grid_latitude = 9 ; | ||
grid_longitude = 11 ; | ||
time = 7 ; | ||
variables: | ||
int64 air_potential_temperature(time, grid_latitude, grid_longitude) ; | ||
air_potential_temperature:standard_name = "air_potential_temperature" ; | ||
air_potential_temperature:units = "K" ; | ||
air_potential_temperature:grid_mapping = "rotated_latitude_longitude" ; | ||
air_potential_temperature:coordinates = "air_pressure forecast_period" ; | ||
air_potential_temperature:ancillary_variables = "latlon_refs" ; | ||
int rotated_latitude_longitude ; | ||
rotated_latitude_longitude:grid_mapping_name = "rotated_latitude_longitude" ; | ||
rotated_latitude_longitude:longitude_of_prime_meridian = 0. ; | ||
rotated_latitude_longitude:earth_radius = 6371229. ; | ||
rotated_latitude_longitude:grid_north_pole_latitude = 37.5 ; | ||
rotated_latitude_longitude:grid_north_pole_longitude = 177.5 ; | ||
rotated_latitude_longitude:north_pole_grid_longitude = 0. ; | ||
double time(time) ; | ||
time:axis = "T" ; | ||
time:units = "hours since 1970-01-01 00:00:00" ; | ||
time:standard_name = "time" ; | ||
time:calendar = "gregorian" ; | ||
double grid_latitude(grid_latitude) ; | ||
grid_latitude:axis = "Y" ; | ||
grid_latitude:units = "degrees" ; | ||
grid_latitude:standard_name = "grid_latitude" ; | ||
double grid_longitude(grid_longitude) ; | ||
grid_longitude:axis = "X" ; | ||
grid_longitude:units = "degrees" ; | ||
grid_longitude:standard_name = "grid_longitude" ; | ||
double air_pressure ; | ||
air_pressure:units = "Pa" ; | ||
air_pressure:standard_name = "air_pressure" ; | ||
double forecast_period(time) ; | ||
forecast_period:units = "hours" ; | ||
forecast_period:standard_name = "forecast_period" ; | ||
double latlon_refs(grid_latitude, grid_longitude) ; | ||
latlon_refs:units = "s" ; | ||
latlon_refs:long_name = "latlon_refs" ; | ||
int64 alternate_data(time, grid_latitude, grid_longitude) ; | ||
alternate_data:long_name = "alternate_data" ; | ||
alternate_data:units = "m" ; | ||
alternate_data:grid_mapping = "rotated_latitude_longitude" ; | ||
alternate_data:coordinates = "air_pressure forecast_period" ; | ||
alternate_data:ancillary_variables = "latlon_refs_0" ; | ||
double latlon_refs_0(grid_latitude, grid_longitude) ; | ||
latlon_refs_0:units = "s" ; | ||
latlon_refs_0:long_name = "latlon_refs" ; | ||
|
||
// global attributes: | ||
:source = "Iris test case" ; | ||
:Conventions = "CF-1.7" ; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.