1. Delete a dimension of size 1 (the dimension name is level):
ncwa -a level directions_qc_amno.nc directions_qc_amno1.nc
2. Copy data from one to the other netcdf file, if possible recognize common dimensions:
ncks file1.nc file2.nc
3. Rename a dimension
ncrename -d rlat,latitude directions_qc_amno.nc
4. permute dimensions(make longitude first and the latitude second):
ncpdq -a longitude,latitude infocell.nc infocell.nc
5. Rename the variable lat to latitude:
ncrename -v lat,latitude infocell.nc
6. Take difference of variable x in 2 files:
ncbo -v x --op_typ='-' infocell.nc infocell_1.nc infocell_diff.nc
7. Operation on variables in a file. Here the values of the variable are changed and the attributes added.
ncap -O -s "air=(air-512.81)/0.01" filename.nc temp.nc ncap -O -s "air=short(air);air@add_offset=512.81;air@scale_factor=0.01" temp.nc filename.nctaken from http://jisao.washington.edu/data/nco/
8. Concantenating netcdf files along the record dimension.
ncrcat runoff_file_name_pattern total_runoff_af.nc
9. Subsetting by index and by coordinate values:
ncks -d lon,0,4 -d lat,2,9,2 in.nc out.nc ncks -d lon,10.,20. -d lat,80.,90. in.nc out.nc
Used data from:
No comments:
Post a Comment