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

SCMI Writer can produce un-ingestable AWIPS files #894

Closed
djhoese opened this issue Sep 3, 2019 · 0 comments
Closed

SCMI Writer can produce un-ingestable AWIPS files #894

djhoese opened this issue Sep 3, 2019 · 0 comments

Comments

@djhoese
Copy link
Member

djhoese commented Sep 3, 2019

Describe the bug

This was reported to me by @spruceboy as part of a Polar2Grid bug. By default, the SCMI writer will use the hostname of the current machine as the "production_location" global attribute in the produced NetCDF4 files. For some systems this value can be really long. AWIPS, the software ingesting these files, has an internal database limit of 31 characters (as far as we know) for this field.

Expected behavior
AWIPS can read any file generated by the SCMI writer.

Actual results
AWIPS ingest fails with an odd error. Note, this can be worked around by specifying the ORGANIZATION environment variable.

Proposed solution
Raise an error if the product_location is longer than 31 characters. The error message should include a mention about the environment variable to override the value.

Other solution would be to just always limit the string to 31 characters, but I think this is a little too magical and could not be what the user wants. It would also be nice if production_location could be provided from the python code (no environment variable needed).

FYI to anyone who fixes this before me, the place to look is satpy/writers/scmi.py:AttributeHelper._global_production_location().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant