Skip to content

Potential issue with "external_variables" #853

@sol1105

Description

@sol1105

When using CMOR to rewrite variables like areacella, volcello, ... and they have cell_measures defined that reference those variables, they are still listed under the external_variables global attribute (while being contained in the file), eg.:

dimensions:
	[...]
variables:
        [...]
	float areacella(rlat, rlon) ;
		areacella:standard_name = "cell_area" ;
		areacella:long_name = "Atmosphere Grid-Cell Area" ;
		areacella:units = "m2" ;
		areacella:cell_methods = "area: sum" ;
		areacella:cell_measures = "area: areacella" ;
		areacella:history = "2025-06-05T12:44:53Z altered by CMOR: replaced missing value flag (-9e+33) and corresponding data with standard missing value (1e+20)." ;
		areacella:missing_value = 1.e+20f ;
		areacella:_FillValue = 1.e+20f ;
		areacella:coordinates = "lat lon" ;
		areacella:grid_mapping = "crs" ;

// global attributes:
		[...]
		:external_variables = "areacella" ;
                [...]
		:cmor_version = "3.9.0" ;

This is the case with cmor 3.9.0 but also older and probably newer versions. If variables are rewritten that are referenced in the cell_measures, they should be omitted from the external_variables attribute (which would mostly but not always result in having no external_variables attribute at all).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions