Dear Hoop,<div>Thank you very much for providing a possible solution. I will go into it and tell you. </div><div><br></div><div>I had tried a lot by changing script and writing descriptor file etc.. But could not solve that. But I had thought to convert each .nc file to grads form. </div><div><br></div><div>I will come back here soon. </div><div><br></div><div>Thanks and kind regards,<span></span><br><br>On Friday 8 April 2016, Hoop <<a href="mailto:hoop@colorado.edu">hoop@colorado.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've not heard back from Mano, but an outside-of-GrADS solution<br>
has occurred to me, although I'm unsure of its practicality. One<br>
could use the ncrcat command from the NetCDF operators (<a href="http://nco.sf.net" target="_blank">nco.sf.net</a>)<br>
to combine the files into one for GrADS.<br>
<br>
-Hoop<br>
<br>
On 04/05/16 00:08, Hoop wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Mano,<br>
<br>
I'm not sure, but I think it might be the one time step in each file<br>
thing. If I recall correctly (and it hasn't changed), GrADS kind of<br>
depends (at least, in the sdfopen case) on there being at least two<br>
time steps in each file. It reads (or read, at least) the first two<br>
time steps in a file to learn what time step size is. But, there's<br>
hope, even it turns out I'm right about this point.<br>
<br>
So, the <a href="http://sdfopent.gs" target="_blank">sdfopent.gs</a> script wrote a DDF (out.ddf, apparently). We<br>
just need to make sure the TDEF line in that file is correct. Please<br>
share that part of out.ddf, and I may need to suggest a modification<br>
to it. If that's the case, then you could just re-start GrADS after<br>
modifying it, and then entering "xdfopen out.ddf" at the initial<br>
GrADS prompt.<br>
<br>
Thanks,<br>
-Hoop<br>
<br>
On 04/04/16 21:09, lpasmanoranjan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Hoop,<br>
Thank you so much for your prompt reply. I did a mistake when I copied<br>
to gmail. But the message was same. ncdump gives the following<br>
<br>
ga-> !ncdump -h /home/data/pre/1995/01/<a href="http://pre_1995_01_01_00.nc" target="_blank">pre_1995_01_01_00.nc</a><br>
netcdf <a href="http://pre_1995_01_01_00.nc" target="_blank">pre_1995_01_01_00.nc</a> {<br>
dimensions:<br>
LON = 3223 ;<br>
LAT = 4943 ;<br>
TIME = 1 ;<br>
variables:<br>
double LON(LON) ;<br>
LON:units = "degrees_east" ;<br>
LON:long_name = "Longitude" ;<br>
double LAT(LAT) ;<br>
LAT:units = "degrees_north" ;<br>
LAT:long_name = "Latitude" ;<br>
double TIME(TIME) ;<br>
TIME:units = "seconds since 1970-01-01 00:00:00 +0:00" ;<br>
TIME:long_name = "Time" ;<br>
short PRE(TIME, LAT, LON) ;<br>
PRE:long_name = "60-minutes precipitation" ;<br>
PRE:units = "1e-3 meter" ;<br>
PRE:missing_value = -32768s ;<br>
PRE:scale_factor = 0.01f ;<br>
PRE:add_offset = 0.f ;<br>
<br>
<br>
On 5 April 2016 at 11:48, Hoop <<a>hoop@colorado.edu</a>> wrote:<br>
<br>
Mano,<br>
<br>
I'm confused. Why does the path to your first file have a space inside<br>
of it? You have:<br>
<br>
/home/data/pre/1995/01/ <a href="http://pre_1995_01_01.nc" target="_blank">pre_1995_01_01.nc</a><br>
<br>
Shouldn't it be:<br>
<br>
/home/data/pre/1995/01/<a href="http://pre_1995_01_01.nc" target="_blank">pre_1995_01_01.nc</a><br>
<br>
If that doesn't solve it, please send the output from running<br>
"ncdump -ht " on the first file. If you are not familiar with<br>
ncdump, it is part of the standard NetCDF suite from Unidata:<br>
<br>
<a href="http://www.unidata.ucar.edu/software/netcdf/" target="_blank">http://www.unidata.ucar.edu/software/netcdf/</a><br>
<br>
Thanks,<br>
-Hoop<br>
<br>
<br>
On 04/04/16 20:20, lpasmanoranjan wrote:<br>
<br>
Dear Hoop,<br>
Thank you very much for your reply. I tried it for 2 files after<br>
saving<br>
<a href="http://sdfopent.gs" target="_blank">sdfopent.gs</a> in my scripts directory. But<br>
getting<br>
the following error.<br>
<br>
<br>
My data directory: /home/data/pre/1995/01/<br>
Number of Times: 2 (<a href="http://pre_1995_01_01.nc" target="_blank">pre_1995_01_01.nc</a> and<br>
<a href="http://pre_1995_01_02.nc" target="_blank">pre_1995_01_02.nc</a>)<br>
(Kindly Note: each file has only one time data, so I changed the<br>
deltahr<br>
= 1 in the <a href="http://sdfopent.gs" target="_blank">sdfopent.gs</a> script at line 150)<br>
<br>
Now I used the following command and got the subquent messages.<br>
<br>
ga-> sdfopent /home/data/pre/1995/01/ <a href="http://pre_1995_01_01.nc" target="_blank">pre_1995_01_01.nc</a><br>
pre_1995_01_%<a href="http://h2.nc" target="_blank">h2.nc</a> 2<br>
Defaulting optional DDF arg to out.ddf<br>
yr1=1995.<br>
netCDFfile= /home/data/pre/1995/01/ <a href="http://pre_1995_01_01.nc" target="_blank">pre_1995_01_01.nc</a><br>
Template= pre_1995_01_%<a href="http://h2.nc" target="_blank">h2.nc</a><br>
NumTimes= 2<br>
Time1= 00Z01JAN1995<br>
Tstep= 1hr<br>
DDF= out.ddf<br>
gadsdf: Time dimension time is not an SDF dimension.<br>
SDF Descriptor file out.ddf was not successfully opened & parsed.<br>
Scanning Descriptor File: out.ddf<br>
gadsdf: Time dimension time is not an SDF dimension.<br>
SDF Descriptor file out.ddf was not successfully opened & parsed.<br>
<br>
SET Error: No files open yet<br>
SET Error: No files open yet<br>
<br>
I must be doing some mistake, can anybody please help me to sort<br>
this<br>
problem. Thank you so much.<br>
<br>
On 5 April 2016 at 02:23, Hoop <<a>hoop@colorado.edu</a>> wrote:<br>
<br>
Mano,<br>
<br>
The standard script library:<br>
<br>
<a href="http://cola.gmu.edu/grads/gadoc/library.html" target="_blank">http://cola.gmu.edu/grads/gadoc/library.html</a><br>
<br>
includes the script <a href="http://sdfopent.gs" target="_blank">sdfopent.gs</a>. It<br>
takes two additional<br>
arguments beyond the one for sdfopen. The second argument<br>
is a template, like "pre_%y4_%m2_%<a href="http://d2.nc" target="_blank">d2.nc</a>",<br>
and the<br>
third is<br>
a count of time steps in the entire series. The first argument<br>
would be the first path in the time series. See:<br>
<br>
<a href="ftp://cola.gmu.edu/grads/scripts/sdfopent.gs" target="_blank">ftp://cola.gmu.edu/grads/scripts/sdfopent.gs</a><br>
<br>
-Hoop<br>
<br>
On 04/04/16 10:00, <a>gradsusr-request@gradsusr.org</a>><br>
wrote:<br>
> Date: Mon, 4 Apr 2016 18:27:49 +0900<br>
> From: lpasmanoranjan <<a>lpasmanoranjan@gmail.com</a>><br>
> Subject: [gradsusr] How to use template option for .nc<br>
file (there is<br>
> no .ctl file)<br>
> To: GrADS Users Forum <<a>gradsusr@gradsusr.org</a>><br>
><br>
> Dear Users,<br>
> I am having a problem in viewing the following dataset as<br>
template option.<br>
> I have hourly dataset in .nc as following:<br>
><br>
> 1995/01/<a href="http://pre_1995_01_01.nc" target="_blank">pre_1995_01_01.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_02.nc" target="_blank">pre_1995_01_02.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_03.nc" target="_blank">pre_1995_01_03.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_04.nc" target="_blank">pre_1995_01_04.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_05.nc" target="_blank">pre_1995_01_05.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_06.nc" target="_blank">pre_1995_01_06.nc</a><br>
> and so on for 10 years<br>
><br>
> *All individual datasets can be viewed in grads with<br>
sdfopen command*<br>
><br>
> Can anybody please help me how to use template option.<br>
><br>
> Thank you for any kind of help or suggestion in this regard.<br>
><br>
> Kind Regards<br>
> Mano<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a>gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
--<br>
Kind Regards,<br>
Mano<br>
--<br>
Kind Regards,<br>
Mano<br>
--<br>
Kind Regards,<br>
Mano<br>
</blockquote></blockquote>
</blockquote></div><br><br>-- <br><div dir="ltr"><div>Kind Regards,<br></div>Mano<br></div><br>