<div dir="ltr"><div><div>Dear Hoop,<br></div>It seems my datasets are not proper. I think the time dimension. Because I am getting same error messegae. I replaced the <a href="http://sdfopent.gs">sdfopent.gs</a> with new <a href="http://sdfopent2.gs">sdfopent2.gs</a>.<br><br></div>I am getting the following message:<br>sdfopent2 /home/data/pre/01/<a href="http://pre_1995-01-01_00.nc">pre_1995-01-01_00.nc</a> pre_1995-01-01_%<a href="http://h2.nc">h2.nc</a> 24 00z01jan1995 1hr <br>Defaulting optional DDF arg to out.ddf<br>netCDFfile= /home/data/pre/01/<a href="http://pre_1995-01-01_00.nc">pre_1995-01-01_00.nc</a><br>Template= pre_1995-01-01_%<a href="http://h2.nc">h2.nc</a><br>NumTimes= 24<br>Time1= 00z01jan1995<br>Tstep= 1hr<br>DDF= out.ddf<br><span style="color:rgb(255,0,255)"><b>gadsdf: Time dimension time is not an SDF dimension.</b></span><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><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 April 2016 at 13:27, Hoop <span dir="ltr"><<a href="mailto:hoop@colorado.edu" target="_blank">hoop@colorado.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mano,<br>
<br>
Here's another alternative. I've written a different version of<br>
<a href="http://sdfopent.gs" rel="noreferrer" target="_blank">sdfopent.gs</a>, called <a href="http://sdfopent2.gs" rel="noreferrer" target="_blank">sdfopent2.gs</a>, for the one time step per file<br>
case. It takes more arguments:<br>
<br>
sdfopent netCDFpath Template NumTimes FirstTime TimeStepSize [DDF]<br>
Where:<br>
netCDFpath is full path to netcdf file<br>
Template is the template (full path or relative)<br>
NumTimes is the number of timesteps in the netCDF file<br>
FirstTime is the first time value; E.G., 00z01Jan1979<br>
TimeStepSize is the size of the time step, E.G., 1hr or 1dy or 1mo<br>
DDF is optional name of DDF file created.<br>
<br>
I've attached this script.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Hoop</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 04/07/16 18:13, 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 very much for providing a possible solution. I will go into it<br>
and tell you.<br>
<br>
I had tried a lot by changing script and writing descriptor file etc..<br>
But could not solve that. But I had thought to convert each .nc file to<br>
grads form.<br>
<br>
I will come back here soon.<br>
<br>
Thanks and kind regards,<br>
<br>
On Friday 8 April 2016, Hoop <<a href="mailto:hoop@colorado.edu" target="_blank">hoop@colorado.edu</a>> wrote:<br>
<br>
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" rel="noreferrer" 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>
<br>
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" rel="noreferrer" target="_blank">sdfopent.gs</a> script wrote a DDF<br>
(out.ddf, apparently). We<br>
just need to make sure the TDEF line in that file is correct.<br>
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>
<br>
Dear Hoop,<br>
Thank you so much for your prompt reply. I did a mistake<br>
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" rel="noreferrer" target="_blank">pre_1995_01_01_00.nc</a><br>
netcdf <a href="http://pre_1995_01_01_00.nc" rel="noreferrer" 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<br>
+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 href="mailto:hoop@colorado.edu" target="_blank">hoop@colorado.edu</a>> wrote:<br>
<br>
Mano,<br>
<br>
I'm confused. Why does the path to your first file<br>
have a space inside<br>
of it? You have:<br>
<br>
/home/data/pre/1995/01/ <a href="http://pre_1995_01_01.nc" rel="noreferrer" 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" rel="noreferrer" target="_blank">pre_1995_01_01.nc</a><br>
<br>
If that doesn't solve it, please send the output from<br>
running<br>
"ncdump -ht " on the first file. If you are not<br>
familiar with<br>
ncdump, it is part of the standard NetCDF suite from<br>
Unidata:<br>
<br>
<a href="http://www.unidata.ucar.edu/software/netcdf/" rel="noreferrer" 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<br>
2 files after<br>
saving<br>
<a href="http://sdfopent.gs" rel="noreferrer" 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" rel="noreferrer" target="_blank">pre_1995_01_01.nc</a> and<br>
<a href="http://pre_1995_01_02.nc" rel="noreferrer" target="_blank">pre_1995_01_02.nc</a>)<br>
(Kindly Note: each file has only one time data, so<br>
I changed the<br>
deltahr<br>
= 1 in the <a href="http://sdfopent.gs" rel="noreferrer" target="_blank">sdfopent.gs</a> script<br>
at line 150)<br>
<br>
Now I used the following command and got the<br>
subquent messages.<br>
<br>
ga-> sdfopent /home/data/pre/1995/01/<br>
<a href="http://pre_1995_01_01.nc" rel="noreferrer" target="_blank">pre_1995_01_01.nc</a><br>
pre_1995_01_%<a href="http://h2.nc" rel="noreferrer" target="_blank">h2.nc</a> 2<br>
Defaulting optional DDF arg to out.ddf<br>
yr1=1995.<br>
netCDFfile= /home/data/pre/1995/01/<br>
<a href="http://pre_1995_01_01.nc" rel="noreferrer" target="_blank">pre_1995_01_01.nc</a><br>
Template= pre_1995_01_%<a href="http://h2.nc" rel="noreferrer" 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<br>
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<br>
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<br>
help me to sort<br>
this<br>
problem. Thank you so much.<br>
<br>
On 5 April 2016 at 02:23, Hoop <<a href="mailto:hoop@colorado.edu" target="_blank">hoop@colorado.edu</a>><br>
wrote:<br>
<br>
Mano,<br>
<br>
The standard script library:<br>
<br>
<a href="http://cola.gmu.edu/grads/gadoc/library.html" rel="noreferrer" target="_blank">http://cola.gmu.edu/grads/gadoc/library.html</a><br>
<br>
includes the script <a href="http://sdfopent.gs" rel="noreferrer" target="_blank">sdfopent.gs</a>. It<br>
takes two additional<br>
arguments beyond the one for sdfopen. The<br>
second argument<br>
is a template, like "pre_%y4_%m2_%<a href="http://d2.nc" rel="noreferrer" target="_blank">d2.nc</a>",<br>
and the<br>
third is<br>
a count of time steps in the entire series.<br>
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" rel="noreferrer" target="_blank">ftp://cola.gmu.edu/grads/scripts/sdfopent.gs</a><br>
<br>
-Hoop<br>
<br>
On 04/04/16 10:00, <a href="mailto:gradsusr-request@gradsusr.org" target="_blank">gradsusr-request@gradsusr.org</a>><br>
wrote:<br>
> Date: Mon, 4 Apr 2016 18:27:49 +0900<br>
> From: lpasmanoranjan <<a href="mailto:lpasmanoranjan@gmail.com" target="_blank">lpasmanoranjan@gmail.com</a>><br>
> Subject: [gradsusr] How to use template<br>
option for .nc<br>
file (there is<br>
> no .ctl file)<br>
> To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>><br>
><br>
> Dear Users,<br>
> I am having a problem in viewing the<br>
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" rel="noreferrer" target="_blank">pre_1995_01_01.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_02.nc" rel="noreferrer" target="_blank">pre_1995_01_02.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_03.nc" rel="noreferrer" target="_blank">pre_1995_01_03.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_04.nc" rel="noreferrer" target="_blank">pre_1995_01_04.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_05.nc" rel="noreferrer" target="_blank">pre_1995_01_05.nc</a><br>
> 1995/01/<a href="http://pre_1995_01_06.nc" rel="noreferrer" target="_blank">pre_1995_01_06.nc</a><br>
> and so on for 10 years<br>
><br>
> *All individual datasets can be viewed in<br>
grads with<br>
sdfopen command*<br>
><br>
> Can anybody please help me how to use<br>
template option.<br>
><br>
> Thank you for any kind of help or<br>
suggestion in this regard.<br>
><br>
> Kind Regards<br>
> Mano<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" 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>
--<br>
Kind Regards,<br>
Mano<br>
</blockquote>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Kind Regards,<br></div>Mano<br></div></div>
</div>