<div dir="ltr">Azizul,<br><br>We can not tell what kind of time coordinates are in your data file.  Your solution will depend on the kind of time coordinates.<br><br>However, let&#39;s assume that you are starting with a Netcdf file with CF time coordinates.  Please see example time_2.ncl on the NCL Time Coordinates application example page, for how to read CF time coordinates from a Netcdf file, and how to use the cd_calendar function to convert the CF time coordinates to year, month, day, hour, etc.<br><br>Please see the NCL Output ascii application examples page, for how to write a text file with columns of numbers.<br><br>You should not use ncks to first convert your Netcdf data to text.  This is much more complicated than reading precipitation directly from the original Netcdf file, using NCL.<br><br>--Dave<br><br>On Wed, Sep 17, 2014 at 12:20 PM, Md.Azizul Haque &lt;<a href="mailto:haque.azizul320@yahoo.com">haque.azizul320@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt;<br>&gt; Hi Dave,<br>&gt;<br>&gt; Thanks and it now works. I got only precipitation value but I need the txt file like this. <br>&gt; pls help me<br>&gt; Regards<br>&gt; Azizul<br>&gt; year                                    month                day            precipitation<br>&gt; 2006 1 1 0.00E+00<br>&gt; 2006 1 2 4.77E-04<br>&gt; 2006 1 3 4.41E-02<br>&gt; 2006 1 4 3.92E-03<br>&gt; 2006 1 5 0.00E+00<br>&gt; 2006 1 6 0.00E+00<br>&gt; 2006 1 7 1.47E-04<br>&gt; 2006 1 8 2.41E-01<br>&gt; 2006 1 9 3.96E-01<br>&gt; 2006 1 10 7.78E-02<br>&gt; 2006 1 11 4.74E-04<br>&gt; 2006 1 12 8.51E-04<br>&gt; 2006 1 13 6.12E-04<br>&gt; 2006 1 14 0.00E+00<br>&gt; 2006 1 15 0.00E+00<br>&gt; 2006 1 16 0.00E+00<br>&gt; 2006 1 17 0.00E+00<br>&gt; 2006 1 18 0.00E+00<br>&gt; 2006 1 19 0.00E+00<br>&gt; 2006 1 20 0.00E+00<br>&gt; 2006 1 21 0.00E+00<br>&gt; 2006 1 22 0.00E+00<br>&gt;<br>&gt;<br>&gt; On Tuesday, 16 September 2014, 15:52, Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>&gt; wrote:<br>&gt;<br>&gt; Azizul,<br>&gt;<br>&gt; Okay, I see another error in the command.  The -v option needs a variable name following it.  You have only -v directly followed by a file name.  This will confuse ncks into thinking that &quot;pr_...nc&quot; is a variable name, and there is no input file.<br>&gt;<br>&gt; Simply insert the missing variable name such as &quot;pr&quot; after -v, and I think it should work.  Or else, remove -v if you want to convert all variables in the file.  Sorry I did not catch this before.<br>&gt;<br>&gt; --Dave<br>&gt;<br>&gt; On Tue, Sep 16, 2014 at 3:24 PM, azizul haque &lt;<a href="mailto:haque.azizul320@yahoo.com">haque.azizul320@yahoo.com</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; Hi Dave,<br>&gt; &gt; Thank you very much for your quick reply. Its work but I am getting only string. not value<br>&gt; &gt;<br>&gt; &gt; any suggestion<br>&gt; &gt; regards<br>&gt; &gt; azizul<br>&gt; &gt; ncks: ERROR received 0 filenames; need at least one<br>&gt; &gt; ncks Command line options cheatsheet (full details at <a href="http://nco.sf.net/nco.html#ncks">http://nco.sf.net/nco.html#ncks</a>):<br><br>&lt;snip&gt;<br><br>&gt; &gt; On Tuesday, 16 September 2014, 14:47, Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; Azizul,<br>&gt; &gt;<br>&gt; &gt; This command uses Unix output redirection.  You need a &quot;greater than&quot; sign in front of the output file name, like this:<br>&gt; &gt;<br>&gt; &gt; ncks -s &#39;%e \n&#39; -C -v <a href="http://pr_day_cnrm-cm5_mean_sa.nc">pr_day_cnrm-cm5_mean_sa.nc</a> &gt; pr_day_cnrm-cm5_mean_sa.txt<br>&gt; &gt;<br>&gt; &gt; --Dave<br>&gt; &gt;<br>&gt; &gt; On Tue, Sep 16, 2014 at 2:18 PM, azizul haque &lt;<a href="mailto:haque.azizul320@yahoo.com">haque.azizul320@yahoo.com</a>&gt; wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Hi All,<br>&gt; &gt; &gt; I am trying to convert nc time dimension to text using<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;  ***ncks -s &#39;%e \n&#39; -C -v <a href="http://pr_day_cnrm-cm5_mean_sa.nc">pr_day_cnrm-cm5_mean_sa.nc</a> pr_day_cnrm-cm5_mean_sa.txt***<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; and getting following error<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; ***ERROR file pr_day_cnrm-cm5_mean_sa.txt neither exists locally nor matches remote filename patterns***<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Appreciated for your kind help<br>&gt; &gt; &gt; regards<br>&gt; &gt; &gt; Azizul<br><br></div>