Skip to content
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

Support more dx and dy resolution options #83

Open
zxdawn opened this issue Jul 7, 2021 · 0 comments
Open

Support more dx and dy resolution options #83

zxdawn opened this issue Jul 7, 2021 · 0 comments

Comments

@zxdawn
Copy link

zxdawn commented Jul 7, 2021

The dx or dy in the doc is 2km and the default value is 10km. I tested 20km and found the resolution is limited to 10 km.

This is caused by:

def nearest_resolution(args):
""" Uses args.dx to find the closest resolution specified by the
GOES-R PUG. Returns something like "10.0km" that can be used as the
resolution argument to get_GOESR_grid.
"""
goes_resln_options = np.asarray([0.5, 1.0, 2.0, 4.0, 8.0, 10.0])
resln_idx = np.argmin(np.abs(goes_resln_options - args.dx))
closest_resln = goes_resln_options[resln_idx]
resln = '{0:4.1f}km'.format(closest_resln).replace(' ', '')
return resln

And that is related to the pre-defined goesr_resolutions in lmatools:
https://github.com/deeplycloudy/lmatools/blob/731a330494544bf80c7f6752bae67d8f35cb806a/lmatools/grid/fixed.py#L58-L66

So, if I need 20 km, then I have to add the support of 20km in lmatools first:

goesr_resolutions = {
    '0.5km': 14e-6,
    '1.0km': 28e-6,
    '2.0km': 56e-6,
    '4.0km': 112e-6, 
    '8.0km': 224e-6, # not technically in the spec, but SYMMETRY.
    '10.0km': 280e-6, 
    '20.0km': 560e-6, 
    '100.0km': 2800e-6,
}

then, add 20 km to the .py script:

def nearest_resolution(args):
    """ Uses args.dx to find the closest resolution specified by the
    GOES-R PUG. Returns something like "10.0km" that can be used as the
    resolution argument to get_GOESR_grid.
    """
    goes_resln_options = np.asarray([0.5, 1.0, 2.0, 4.0, 8.0, 10.0, 20.0])
@zxdawn zxdawn changed the title Supporting more dx and dy resolution options Support more dx and dy resolution options Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant