cf-convention / vocabularies

Issues and source files for CF controlled vocabularies
3 stars 1 forks source link

Standard names: Multiple variables with same standard_name `quality_flag` ? #162

Closed Aptychus closed 1 year ago

Aptychus commented 1 year ago

Hello, Is it possible to have for example two different variables in a file that own the quality_flag standard_name ? I am not sure to find in the various X_quality_flag the right ones that correspond to the ones concerned. Moreover, one quality_flag is linked to a variable that is not present into the file but applies to a variable inside.

JonathanGregory commented 1 year ago

Dear @Aptychus

Yes, there may be more than one data variable in the file with any given standard name, including quality_flag. The convention is that the data variable should identify its quality flag variable using the ancillary_variables attribute (section 3.4 of the CF standard). I don't fully understand your second question.

Best wishes

Jonathan

Aptychus commented 1 year ago

Dear @JonathanGregory ,

Thanks for your answer. Currently we are trying to work on these flags variables to make them as simpliest as possible. For the second point, I was wondering if you can put in one file (_fileB.nc for instance), a quality flag variable that depends on a variable in another file (_fileA.nc), in case of this quality flag apply on a variable in _fileB.nc . Sorry if it is not clear, don't hesitate to tell me.

Best regards, Jérémie

JonathanGregory commented 1 year ago

Dear Jérémie @Aptychus

No, at the moment it isn't allowed to have an ancillary variable in a different file from the data variable which points to it. Any variable named in an ancillary_variables attribute must be found in the same file. For cell_methods variables we have a convention which permits them to be stored in a different file (section 2.6.3 on "External variables"). Maybe this convention could be allowed for ancillary variables too, if it's a common use case.

Best wishes

Jonathan

Aptychus commented 1 year ago

Thanks a lot @JonathanGregory,

Jérémie