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 for single string attributes in read #453

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

graziano-giuliani
Copy link

Partial modification to allow netCDF Fortran library able to read single string attributes from a netCDF4 CF-1.9 compliant using string type for attributes.
It overloads the nf90_get_att_text function returning a single string attribute (note the nlen == 1 in the patch) as if it is a character attributes.
What is not implemented are multidimensional strings, and the capability to write string attributes, because of the lack of string type in Fortran standard. This patch would allow reading netCDF files like the one created from the Copernicus cds-beta site for ECMWF ERA5 model. See reference to this in issue #181 "string attributes are not supported yet?"

…gle string attributes from a netCDF4 CF-1.9 compliant using string type for attributes. It overloads the nf90_get_att_text function returning single string (note nlen == 1) as if they are character attributes. What is not implemented are multidimensional strings, and the capability to write string attributes, because of the lack of string type in Fortran standard. This patch would allow reading netCDF files like the one created from the Copernicus cds-beta site for ECMWF ERA5 model. See reference to this in issue Unidata#181 "string attributes are not supported yet?"
@CLAassistant
Copy link

CLAassistant commented Oct 17, 2024

CLA assistant check
All committers have signed the CLA.

@WardF
Copy link
Member

WardF commented Oct 23, 2024

Thank you!

@edwardhartnett
Copy link
Contributor

Can you add a test or two as well?

@WardF WardF self-assigned this Oct 28, 2024
@WardF
Copy link
Member

WardF commented Nov 13, 2024

@graziano-giuliani Is there any chance you could help us by adding a test for this as well?

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

Successfully merging this pull request may close these issues.

4 participants