-
Notifications
You must be signed in to change notification settings - Fork 320
Track and write measurement time for area #3168
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
base: main
Are you sure you want to change the base?
Conversation
Start unit test to track time for the SEVIRI HRIT reader. This is to prepare an implementation of pytroll#3161. There is no implementation yet.
Added a first implementation for SEVIRI per-pixel times in ancillary variables. So far just takes the scanline time for all pixels in the scanline.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3168 +/- ##
==========================================
- Coverage 96.28% 96.27% -0.01%
==========================================
Files 436 438 +2
Lines 57866 58006 +140
==========================================
+ Hits 55715 55848 +133
- Misses 2151 2158 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull Request Test Coverage Report for Build 16744116940Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
To track "valid time" through resampling for geostationary satellite data, I'm trying to think of a good way to approach this. My current thinking is that if the user creates the scene with reader_kwargs={"track_time": True}, the file handler adds per-pixel time information to the variable attributes. By putting it inside ancillary variables, dataset_walker and co ensure it gets sliced and resampled along with the parent dataset, so that at the end, an approximate measurement time can be estimated for the resampled scene. But normally ancillary variables are actual variables available in the data file, they remain text attributes until after segments have been concatenated, and then the file handler is called again for every segment, to replace the text label by actual data in ancillary variables. Therefore, I'm not sure if ancillary variables is the right place to put it, or if time should be stored there at all. |
|
Maybe it fits better in a coordinate variable, but not sure if it's valid to have those be not-unique. |
|
Coordinates can probably be non-unique, but are currently dropped in resampling. In case of nearest neighbour resampling, this is due to |
Add time as a coordinate rather than as an auxiliary variable. Start working on resampling time coordinates, so far with a failing test.
Implement time tracking as a float coordinate for SEVIRI L1B HRIT. Retain this through resampling. Add documentation on how to use this.
Adapt ninjo tag test to account for the novelty of optional dynamic tags.
|
Addressing the CodeScene complaint about I am not able to resolve this as part of this PR. |
Refactor getting the valid time out of the ninjogeotiff writer, so that the functionality is available elsewhere.
|
I find it hard to make sense of the |
Remove code leftover from an earlier implementation attempt, that is no longer needed.
pnuu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments and change requests inline.
Pased on Panus review, renamed get_valid_time to get_mean_time. The tag in the ninjogeotiff writer is still called ValidDateID, pending a decision by NinJo developers. Also renamed some local variables to avoid confusion with conventions for imported module shorthands.
|
Docs still failing: |
Track measurement times such that a representative measurement time can be estimated and written for an area.
To include valid time in the filename:
reader_kwargs: {"track_time": True}toScene.__init__, andresample_coords=TruetoScene.resample, anddynamic_fields={"valid_time"}toScene.save_datasets, and{valid_time}in the filename pattern passing toScene.save_datasets.When storing as
ninjogeotiff, time coordinates will be averaged and stored in theninjo_ValidTimeIDtag.An example is included in the PR under
doc/source/examples/valid_time.rst.The PR also does some refactoring in
Scene._resampled_scene, on top of #3178, which should be merged first.Next steps, either within this PR or within one or more later PRs:
AUTHORS.mdif not there already