Changes between Version 1 and Version 2 of Users/SetupNewConfiguration/Data-utilities-with-netcdf
- Timestamp:
- 2017-03-30T01:27:58+02:00 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Users/SetupNewConfiguration/Data-utilities-with-netcdf
v1 v2 1 '''Data utilities with netcdf''' 1 = Data utilities with netcdf 2 2 3 3 You can find here an example of bash script to manipulate netcdf files (in this example forcing core2 files). … … 7 7 This is necessary because "npdq" command change all variables, but in this case we don't want to have glamt, gphit, time "short" type. 8 8 9 10 {{{ 9 {{{#!sh 11 10 # remove useless variable from file 12 11 ncks -O -x -v V_10.15JUNE2009_orca2.nc v_10.15JUNE2009_orca2.nc 13 12 14 }}}15 16 {{{17 18 13 # exctracting coordinates variables from file, put in output file (grid_orca2.nc) 19 14 ncks -v glamt,gphit,time v_10.15JUNE2009_orca2.nc grid_orca2.nc 20 }}}21 15 22 23 24 {{{25 16 # exctracting variables from file 26 17 ncks -O -C -v V_10_MOD v_10.15JUNE2009_orca2.nc v_10.15JUNE2009_orca2.nc 27 }}}28 18 29 30 31 {{{32 19 # compress all variables of v_10.15JUNE2009_orca2.nc file, 33 20 # now variables of v_10.15JUNE2009_orca2.nc are "short" type 34 21 # (add offset and scale factor) 35 22 ncpdq -O -C -P all_xst v_10.15JUNE2009_orca2.nc v_10.15JUNE2009_orca2.nc 36 }}}37 38 23 39 40 {{{41 24 # append grid_orca2.nc file to v_10.15JUNE2009_orca2.nc file to have initial file 42 25 # with variable V_10_MOD "short" type and coordinates variables unchanged