Skip to content

time needs to be a dimension in NetCDF #325

@faronium

Description

@faronium

I've noted when working with NetCDFs from the YNWT data portal that time is incorporated as a data variable rather than a dimension of the NetCDF. Here's the output of ncinfo on a file:

root group (NETCDF3_64BIT_OFFSET data model, file format NETCDF3):
elevation: 242.5
name: CRMP/ECCC
station_id: 2202349
latitude: 67.0667
contact: Faron Anslow [email protected]
longitude: -121.1
version: 0.2
owner: PCIC
station_name: HALDANE RIVER
history: Created dynamically by the Pydap SQL handler, the Pydap PCIC SQL handler, and the PCIC/CRMP database
network: ECCC
dimensions(sizes): station_observations(24045)
variables(dimensions): float64 Temperature(station_observations), float64 Dir_of_Max_Gust(station_observations), float64 Humidity(station_observations), float64 daily_snow_24hr(station_observations), float64 Min_Temp(station_observations), float64 Dew_Point_Temp_degC(station_observations), float64 Wind_Speed(station_observations), float64 Total_Rain(station_observations), float64 Snow_on_Grnd(station_observations), float64 Mean_Temp(station_observations), float64 Wind_direction(station_observations), float32 time(station_observations), float64 Total_Precipitation(station_observations), float64 Spd_of_Max_Gust(station_observations), float64 Max_Temp(station_observations)
groups:

and a print of another dataset as an xarray object:

Image

I don't think this is a strict requirement of CF conventions, but having a time dimension is useful.

https://cfconventions.org/cf-conventions/cf-conventions.html#dimensions

Hopefully this is a quick/easy fix and sorry for the rapidfire issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions