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
Add reader kwarg to 'ahi_hrit' to disable exact start_time #1986
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1986 +/- ##
==========================================
+ Coverage 93.54% 93.56% +0.02%
==========================================
Files 279 281 +2
Lines 41322 41480 +158
==========================================
+ Hits 38654 38811 +157
- Misses 2668 2669 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
To be clear, this PR does not fix any of the performance issues you ran into right? I know the exact start time should be used by default, but it is too bad for performance that we can't set this new option to |
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.
LGTM, very useful! Just nitpicking...
satpy/readers/hrit_jma.py
Outdated
|
||
def __init__(self, filename, filename_info, filetype_info): | ||
By default, the reader computes the exact start time. As this time is different for every channel, | ||
things like angle calculation (SZA correction) can get very slow. To use approximate times, the user can |
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.
I'd favor "nominal" over "approximate", what do you think?
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.
And I think there are two whitespaces in the beginning of that sentence.
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.
Thanks, I'll use nominal
. And the double whitespace is a leftover reflex from using Emacs, which thinks wrapping works properly only if there are two whitespaces after a comma...
No, but setting
So I should make the nominal time the default? The exact scanline times will any way be available for any scientific users. |
I opted to read Dave's comment so that |
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.
LGTM, I just have a suggestion:
I think use_exact_start_time
is not precise enough. How about use_nominal_time_as_start_time
or use_acquisition_time_as_start_time
?
Changed the kwarg to |
The
'ahi_hrit'
by default takes the exactstart_time
from the data it self. Thestart_time
is down to microsecond level, and is different for every dataset. This will cause for example Sun zenith angle correction to be computed separately for every VIS channel.This PR introduces a reader keyword argument
use_acquisition_time_as_start_time
to control whether nominal (parsed from the filename) or exact acquisition start time will be used. The default, due to significantly better performance, is the nominal time parsed from the filename (reader_kwargs={'use_acquisition_time_as_start_time': False}
).The exact times are always available from the channel coordinates:
The first value represents the exact start time, and the last one the exact end time of the data acquisition.
Another option would've been to ensure all the angle computations were using a rounded time (to closest minute or so), but that might not be desirable for some use cases.