简体   繁体   中英

How add standard_name to attributes NetCDF file in NCO

How can add variable name and units to NetCDF attribute in NCO.

dimensions:
lat = UNLIMITED ; // (34 currently)
lon = 42 ;
time = 360 ;

float precip(lat,lon,time) ;
  precip:_FillValue = 1.e+20f ;
  precip:missing_value = 1.e+20f ;
  precip:cell_methods = "time: sum" ;

C:\nco>ncatted -a units,'precip',c,c,'mm day-1' nclimgrid_lowres_prcp_ncpdq5.nc ncatted: overwrite nclimgrid_lowres_prcp_ncpdq5.nc (y/n)? y The system cannot find the path specified. ncatted: ERROR File contains no variables or groups that match name 'precip' so attribute units cannot be changed

Your command looks correct. Too bad it does not work:) Add -O to automatically overwrite the output file. Single quotes only needed around the whitespace. I have no Windows machine to test on, but try this and post any error messages:

ncatted -O -a units,precip,c,c,'mm day-1' nclimgrid_lowres_prcp_ncpdq5.nc

If that does not work try this

ncatted -O -a units,precip,c,c,'mm day-1' nclimgrid_lowres_prcp_ncpdq5.nc out.nc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM