Project

General

Profile

cdo sinfov cannot parse all variables in the file

Added by BF Jiao about 2 years ago

There are three variables (latitude, longitude, and t2m) in the file written by xarray.dataset.to_netcdf, cdo sinfov parse two of them.

File format : NetCDF
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name
1 : unknown unknown c instant 1 1 790350 1 F64 : longitude
2 : unknown unknown c instant 1 1 790350 2 F32 : t2m
Grid coordinates :
1 : generic : points=790350 (958x825)
2 : curvilinear : points=790350 (958x825)
Vertical coordinates :
1 : surface : levels=1
cdo sinfon: Processed 2 variables [0.14s 19MB].
t2m.nc (15.1 MB) t2m.nc

Replies (1)

RE: cdo sinfov cannot parse all variables in the file - Added by Karin Meier-Fleischer about 2 years ago

Hi,

the coordinates attribute of the variable t2m is wrong.

t2m:coordinates = "time step heightAboveGround latitude longitude valid_time" 

Set the correct coordinates attribute with NCO's ncatted:

ncatted -a coordinates,t2m,o,c,"latitude longitude" t2m.nc t2m_coordinates.nc
cdo sinfon  t2m_coordinates.nc
   File format : NetCDF
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  unknown  c instant       1   1    790350   1  F32  : t2m           
   Grid coordinates :
     1 : curvilinear              : points=790350 (958x825)
                        longitude : 85.36436 to 128.0278 degrees_east
                         latitude : 31.3147 to 54.54048 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1

-Karin

    (1-1/1)