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

Nesting of ancillary_variables attribute? #174

Open
frankeye opened this issue Aug 31, 2022 · 1 comment
Open

Nesting of ancillary_variables attribute? #174

frankeye opened this issue Aug 31, 2022 · 1 comment
Labels
question Further information is requested or discussion invited

Comments

@frankeye
Copy link

Is this supported, or a good idea, i.e.

var a:ancillary_variables = "var_b"

var b:ancillary_variables = "var_c var_d

Moreover, if the var_b and var_c, var_d are 'quality_flag's ?

@frankeye frankeye added the question Further information is requested or discussion invited label Aug 31, 2022
@davidhassell
Copy link
Collaborator

Hello @frankeye,

This is not currently supported by the cf data model. In the data model diagram, the FieldAncillary construct is synonomous with a CF-netCDF ancillary variable, and we can see that only a Field construct (i.e. CF-metCDF data variable) can contain it.

That's not the end of the story, though ... Any variable in a CF-netCDF file can always be viewed as a data variable in addition to any metadata role it may have, simply by choosing to ignore any other variables that may reference it.

So in the wholly legal following:

    float var_a ;
        var_a:ancillary_variables = "var_b" ;
    float var_b ;
        var_b:ancillary_variables = "var_c var_d" ;
        var_b:foo = "bar" ;

when we read var_a as a data variable, var_b is designated an ancillary variable and so the var_b:ancillary_variables attribute is "ignored" - rather, it is retained, but only with the same non-standardised status enjoyed by var_b:foo.

However, when we read var_b as a data variable, var_b:ancillary_variables is now standardised and var_c and var_d are read as ancillary variables.

But what we can't currently do is let var_b relate to var_a whilst simultaneously var_c and var_d relate to var_b.

I would be very interested in the use case you have for this, to understand if there is a case for extending CF in this direction.

Thanks,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested or discussion invited
Projects
None yet
Development

No branches or pull requests

2 participants