Project

General

Profile

error message on select "coordinate variable can't be assigned"

Added by Noam Chomsky about 4 years ago

I am doing a select operation

cdo -select,name=var1,var2,var3,etc... in.nc out.nc

The operation seems successful but I'm getting these warnings and can't find any information on the board. Should I worry about this? The output file seems ok.

Warning (find_time_vars): Found more than one time variable, skipped variable time_centered!
Warning (cdfInqContents): Coordinates variable time_centered can't be assigned!

File format : NetCDF4
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter ID
1 : unknown unknown v instant 13 1 16200 1 F32 : -1
2 : unknown unknown v instant 13 1 16200 1 F32 : -2
3 : unknown unknown v instant 13 1 16200 1 F32 : -3
4 : unknown unknown v instant 13 1 16200 1 F32 : -4
3 : unknown unknown v instant 1 2 16200 1 F32 : -13
14 : unknown unknown v instant 13 1 16200 1 F32 : -14
15 : unknown unknown v instant 13 1 16200 1 F32 : -15
Grid coordinates :
1 : lonlat : points=16200 (180x90)
lon : -179 to 179 by 2 degrees_east circular
lat : 89 to -89 by -2 degrees_north
Vertical coordinates :
1 : generic : levels=13
veget : 1 to 13 by 1 1
2 : surface : levels=1
Time coordinate : 365 steps
RefTime = 1901-01-01 00:00:00 Units = seconds Calendar = 365_day Bounds = true
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
1901-01-01 12:00:00 1901-01-02 12:00:00 1901-01-03 12:00:00 1901-01-04 12:00:00


Replies (3)

RE: error message on select "coordinate variable can't be assigned" - Added by Karin Meier-Fleischer about 4 years ago

Hi Noam,

does your in.nc file have two time variables (time and time_centered)?
Can you send the 'ncdump -h in.nc' output or upload in.nc?

-Karin

RE: error message on select "coordinate variable can't be assigned" - Added by SAMANTHA BARBARA DE CRUZ about 4 years ago

Hello!
I have a similar problema while merging nc files from hycom model.

The command I used was: cdo copy HYCOM_surf_el_2002-01-01.nc ...._surf_el_2002-12-01.nc HYCOM_z_2002.nc

And I received this warning:
Warning (cdfInqContents): Coordinates variable time can't be assigned!
cdo copy: 8%Warning (cdfInqContents): Coordinates variable time can't be assigned!
16%Warning (cdfInqContents): Coordinates variable time can't be assigned!

Here is the output of ncdump:

ncdump -h HYCOM_surf_el_2002-03-01.nc
netcdf HYCOM_surf_el_2002-03-01 {
dimensions:
time = 30 ;
lat = 76 ;
lon = 201 ;
variables:
short surf_el(time, lat, lon) ;
surf_el:long_name = "Water Surface Elevation" ;
surf_el:standard_name = "sea_surface_elevation" ;
surf_el:units = "m" ;
surf_el:_FillValue = -30000s ;
surf_el:missing_value = -30000s ;
surf_el:scale_factor = 0.001f ;
surf_el:add_offset = 0.f ;
surf_el:NAVO_code = 32 ;
surf_el:coordinates = "time lat lon lat lon" ;
double time(time) ;
time:long_name = "Valid Time" ;
time:units = "hours since 2000-01-01 00:00:00" ;
time:time_origin = "2000-01-01 00:00:00" ;
time:calendar = "gregorian" ;
time:axis = "T" ;
time:NAVO_code = 13 ;
time:_CoordinateAxisType = "Time" ;
double lat(lat) ;
lat:long_name = "Latitude" ;
lat:standard_name = "latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
lat:NAVO_code = 1 ;
lat:_CoordinateAxisType = "Lat" ;
double lon(lon) ;
lon:long_name = "Longitude" ;
lon:standard_name = "longitude" ;
lon:units = "degrees_east" ;
lon:point_spacing = "even" ;
lon:modulo = "360 degrees" ;
lon:axis = "X" ;
lon:NAVO_code = 2 ;
lon:_CoordinateAxisType = "Lon" ;

// global attributes:
:classification_level = "UNCLASSIFIED" ;
:distribution_statement = "Approved for public release. Distribution unlimited." ;
:downgrade_date = "not applicable" ;
:classification_authority = "not applicable" ;
:institution = "Naval Oceanographic Office" ;
:source = "HYCOM archive file" ;
:history = "archv2ncdf3z" ;
:field_type = "instantaneous" ;
:Conventions = "CF-1.6 NAVO_netcdf_v1.1" ;
:History = "Translated to CF-1.0 Conventions by Netcdf-Java CDM (CFGridWriter2)\n",
"Original Dataset = GLBv0.08/expt_53.X/data/2002; Translation Date = 2020-04-16T07:20:34.731Z" ;
:geospatial_lat_min = -24. ;
:geospatial_lat_max = -18. ;
:geospatial_lon_min = -44. ;
:geospatial_lon_max = -28. ;

RE: error message on select "coordinate variable can't be assigned" - Added by Uwe Schulzweida about 4 years ago

You can ignore this warning message, the result is correct!
The file contains redundant information in the coordinates attribute:

 short surf_el(time, lat, lon) ;
 surf_el:coordinates = "time lat lon lat lon" ;
This is confusing CDO when scanning the inventory. In principle, the information in the coordinates attribute is not correct and this attribute should be removed.

    (1-3/3)