Re: [netcdfgroup] Edit netcdf file to change date in met_em file (WRF)

ncap2 -s 'Times[dimension_name]="2016-05-11_06:00:00   "' in.nc out.nc

For netCDF3 character arrays, pad the value to the size of the
underlying character dimension_name (shown by spaces above).
netCDF4 strings have no such restriction and this will work:

ncap2 -4 -s 'Times="2016-05-11_06:00:00"s' in.nc out.nc

Note the "s" for "string" after the end-quote.

Post followups, if any, here: http://sf.net/p/nco/discussion/9830

cz
--
Charlie Zender, Earth System Sci. & Computer Sci.
University of California, Irvine 949-891-2429 )'(



  • 2017 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: