[ncl-talk] error for nc to text

azizul haque haque.azizul320 at yahoo.com
Tue Sep 16 15:24:12 MDT 2014


Hi Dave,
Thank you very much for your quick reply. Its work but I am getting only string. not value

any suggestion
regards
azizul
ncks: ERROR received 0 filenames; need at least one
ncks Command line options cheatsheet (full details at http://nco.sf.net/nco.html#ncks):
ncks [-3] [-4] [-5] [-6] [-7] [-A] [-a] [-b fl_bnr] [--bfr sz] [-C] [-c] [--cdl] [--cnk_byt sz] [--cnk_dmn nm,sz] [--cnk_map map] [--cnk_plc plc] [--cnk_scl sz] [-D nco_dbg_lvl] [-d ...] [-F] [--fix_rec_dmn dim] [--fl_fmt fmt] [-G grp:lvl] [-g ...] [-H] [-h] [--hdn] [--hdr_pad nbr] [-L lvl] [-l path] [-M] [-m] [--md5_dgs] [--md5_wrt] [--mk_rec_dmn dim] [--msa] [--no_blank] [--no_tmp_fl] [-O] [-o out.nc] [-P] [-p path] [-Q] [-q] [-R] [-r] [--rad] [--ram_all] [-s format] [-u] [--unn] [-v ...] [-X box] [-x] [--xml] [--xml_no_loc] [--xml_spr_chr sng] [--xml_spr_nmr sng] in.nc [[out.nc]]

-3, --3, --fl_fmt=classicOutput file in netCDF3 CLASSIC (32-bit offset) storage format
-4, --4, --netcdf4Output file in netCDF4 (HDF5) storage format
-5, --5, Print alphabetically by group then variable
-6, --6, --64, --fl_fmt=64bitOutput file in netCDF3 64-bit offset storage format
-7, --7, --fl_fmt=netcdf4_classicOutput file in netCDF4 CLASSIC format (3+4=7)
-A, --apn, --appendAppend to existing output file, if any
-a, --abc, --alphabetizeDisable alphabetization of extracted variables
-b, --fl_bnr, --binary-file fl_bnrUnformatted binary file to write
    --bfr_sz, --buffer_size szBuffer size to open files with
-C, --nocoordsAssociated coordinate variables should not be processed
-c, --crd, --coordsCoordinate variables will all be processed
    --cdlPrint CDL (netCDF lingua franca used by ncdump/ncgen)
    --cnk_dmn, --chunk_dimension nm,szChunksize of dimension nm is sz
    --cnk_map, --chunk_map mapChunking map [dmn,lfp,prd,rd1,rew,scl,xpl,xst]
    --cnk_plc, --chunk_policy plcChunking policy [all,g2d,g3d,xpl,xst,uck]
    --cnk_scl, --chunk_scalar szChunksize scalar (for all dimensions)
-D, --dbg_lvl, --debug-level lvlDebug-level is lvl
-d, --dmn, --dimension dim,[min][,[max]][,[stride]] Dimension's limits and stride in hyperslab
-F, --ftn, --fortranFortran indexing conventions (1-based) for I/O
    --fix_rec_dmn dimChange dimension dim (or all) to fixed dimension in output file
    --fl_fmt, --file_format fmtFile format [classic,64bit,netcdf4,netcdf4_classic]
-G, --gpe [grp_nm][:[lvl]]Group Path Editing path, levels to replace
-g, --grp grp1[,grp2[...]] Group(s) to process (regular expressions supported)
-H, --data, --hieronymusToggle printing data
-h, --hst, --historyDo not append to "history" global attribute
    --hdn, --hiddenPrint hidden (aka special) attributes
    --hdr_pad, --header_padPad output header with nbr bytes
-L, --dfl_lvl, --deflate lvlLempel-Ziv deflation (lvl=0..9) for netCDF4 output
-l, --lcl, --local pathLocal storage path for remotely-retrieved files
-M, --Mtd, --MetadataToggle printing global metadata
-m, --mtd, --metadataToggle printing variable metadata
    --mk_rec_dmn dimDefine dim as record dimension in output file
    --no_blankPrint numeric missing values instead of blanks (underscores)
    --no_tmp_flDo not write output to temporary file
-o, --output, --fl_out fl_outOutput file name (or use last positional argument)
-O, --ovr, --overwriteOverwrite existing output file, if any
-P, --prn, --printPrint data, metadata, and units. Abbreviation for -C -H -M -m -u.
-p, --pth, --path pathPath prefix for all input filenames
-Q, Toggle printing of dimension indices and coordinate values
-q, --quietTurn off all printing to screen
-R, --rtn, --retainRetain remotely-retrieved files after use
-r, --revision, --vrs, --versionCompile-time configuration and/or program version
    --orphan, --rph_dmnRetain or print all (including orphaned) dimensions
    --ram_all, --diskless_allOpen netCDF3 files and create output files in RAM
-s, --sng_fmt, --string formatString format for text output
-u, --unitsToggle printing units of variables, if any
    --unn, --unionSelect union of specified groups and variables
-v, --variable var1[,var2[...]] Variable(s) to process (regular expressions supported)
-X, --auxiliary lon_min,lon_max,lat_min,lat_maxAuxiliary coordinate bounding box
-x, --xcl, --excludeExtract all variables EXCEPT those specified with -v
    --xmlPrint XML (NcML, netCDF Markup Language)
    --xml_no_locationOmit NcML location element
    --xml_spr_chr sngSeparator for NcML character types
    --xml_spr_nmr sngSeparator for NcML numeric types
in.ncInput file name
out.ncOutput file name (or use -o switch)

Eight ways to find more help on ncks and/or NCO:
1. Examples:     http://nco.sf.net/nco.html#xmp_ncks
2. Ref. manual:  http://nco.sf.net/nco.html#ncks
3. User's Guide: http://nco.sf.net#RTFM
4. Manual pages: 'man ncks', 'man nco', ...
5. Homepage:     http://nco.sf.net
6. FAQ:          http://nco.sf.net#FAQ
7. Help Forum:   http://sf.net/projects/nco/forums/forum/9830
8. Publications: http://nco.sf.net#pub
Post questions, suggestions, patches at http://sf.net/projects/nco



On Tuesday, 16 September 2014, 14:47, Dave Allured - NOAA Affiliate <dave.allured at noaa.gov> wrote:
 


Azizul,

This command uses Unix output redirection.  You need a "greater than" sign in front of the output file name, like this:

ncks -s '%e \n' -C -v pr_day_cnrm-cm5_mean_sa.nc > pr_day_cnrm-cm5_mean_sa.txt

--Dave


On Tue, Sep 16, 2014 at 2:18 PM, azizul haque <haque.azizul320 at yahoo.com> wrote:
>
> Hi All,
> I am trying to convert nc time dimension to text using
>
>  ***ncks -s '%e \n' -C -v pr_day_cnrm-cm5_mean_sa.nc pr_day_cnrm-cm5_mean_sa.txt***
>
> and getting following error
>
> ***ERROR file pr_day_cnrm-cm5_mean_sa.txt neither exists locally nor matches remote filename patterns***
>
> Appreciated for your kind help
> regards
> Azizul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140916/e8c04da6/attachment.html 


More information about the ncl-talk mailing list