-
Notifications
You must be signed in to change notification settings - Fork 73
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 script to get SNOs for two platforms #51
base: main
Are you sure you want to change the base?
Conversation
…ager satellite Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
I have added the SNO script, it works on my laptop, I have a bit of unittests (though they are kind of system-tests) and some documentation. I was considering if we should/could merge it and then I could continue doing refactoring and making the tests more like real unittests, etc? |
Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
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.
Few comments, and one change request (the addition of main()
). Otherwise looks good to me.
bin/get_snos.py
Outdated
return args | ||
|
||
|
||
if __name__ == "__main__": |
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.
Encapsulate all this in main()
function, and in if __name__ == "__main__":
block call that. Can save some time later on when hunting a bug that is caused by polluted namespace.
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.
Done!
TLE_SATNAME = {'Suomi-NPP': 'SUOMI NPP', | ||
'NOAA-20': 'NOAA 20', | ||
'EOS-Aqua': 'AQUA', | ||
'Metop-B': 'METOP-B', | ||
'NOAA-19': 'NOAA 19', | ||
'NOAA-18': 'NOAA 18'} |
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.
How about finding the platforms by satellite ID number? The platform names might not always be in the TLE data, but the ID is.
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.
@pnuu Does pyorbital know how to do that, thought it required a name?
Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
…ml template Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
Signed-off-by: Adam Dybbroe <Adam.Dybbroe@smhi.se>
@adybbroe where are we at with this PR ? |
@adybbroe I tested this with one day's TLE file which contains CALIPSO (29108) and Sentinel-5P (42969). TLE filetle-20200102.txt
snos.yaml
Terminal run
As the intersect time is around 2020-01-02 13:46, I downloaded two data files:
However, I plotted the Sentinel-5P swath and CALIPSO lines: Datetime in both datasets:CALIPSO:
Sentinel-5P:
13:46 is in the time period of the CALIPSO data, but not for the Sentinel-5P data. DebugI tried to output some variables for debugging: Here's the (coord_start, coord_end) in the
It seems the first one (ref_pltfrm: CALIPSO) runs so fast. Could that be the problem? |
We hade som problems that this script is not accurate enough as the approximation of the path is not exact enought and done with only one arc. I made a more accurate version with several smaller arcs (see below). It takes more time but better finds the SNOs.
|
...typically Calipso and an Imager satellite like Metop/NOAA
Signed-off-by: Adam Dybbroe Adam.Dybbroe@smhi.se
flake8 pyorbital