<div dir="ltr">Hi SB,<div>Dennis is correct, in that this type of question would be better posed to the GrADS user forum. However, I have some limited experience with GrADS, and in my experience GrADS will not open a file unless there is a X (latitude) and Y (longitude) array present. The arrays do not have to have anything to do with your tasmax array. Thus, I would recommend writing some random latitude/longitude arrays to your file along with your tasmax array.</div><div><br></div><div>If that advice does not help, I would suggest posing your query to the GrADS user forum.</div><div>Adam</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 5, 2017 at 4:57 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>In my view, this question should be sent to the GrADS User forum not ncl-talk.<br><br></div>Did you look at the created nc file?<br><br></div>%> ncdump tas_aave_Asia_bandpass30-100.n<wbr>c | less<br><div><br>==============================<wbr>=============<br></div><div>Maybe try making the 'time' dimension unlimited.<br><br><br></div><div><div> filo = "tas_aave_Asia_bandpass30-100.<wbr>nc"</div><div> system ("/bin/rm "+filo) ; remove any pre-existing file</div><div> fo = addfile(filo , "c") ; open output file<br> <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/filedimdef.shtml" target="_blank"><strong>filedimdef</strong></a>(fo,"time",-1,True) <wbr> ; make 'time' unlimited<br></div><div> tasmax = xBPF<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 5, 2017 at 10:13 AM, S Br <span dir="ltr"><<a href="mailto:sbr.climate@gmail.com" target="_blank">sbr.climate@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div>I have applied bandpass filter to my one dimentional NetCDF file. I have written the output to a NetCDF file but this output file is not opening in GrADS. I get the following error.</div><div><br></div><div>ga-> sdfopen tas_aave_Asia_bandpass30-100.n<wbr>c</div><div><div>Scanning self-describing file: tas_aave_Asia_bandpass30-100.<wbr>nc</div><div>gadsdf: SDF file has no discernable X coordinate.</div><div> To open this file with GrADS, use a descriptor file with an XDEF entry.</div><div> Documentation is at <a href="http://cola.gmu.edu/grads/gadoc/SDFdescriptorfile.html" target="_blank">http://cola.gmu.edu/grads/gado<wbr>c/SDFdescriptorfile.html</a></div></div><div><br></div><div>Could you please suggest if I am doing somewhere wrong in my NCL script . The input file is perfectly fine with GrADS.<br></div><div><br></div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscri<wbr>pts/csm/contributed.ncl"</div><div>begin</div><div><br></div><div> fn = "tas_aave_Asia.nc" ; define filename</div><div> in = addfile(fn,"r") ; open netcdf file</div><div> x = in->tasmask(:,0,0) ; get data</div><div><br></div><div>; ******************************<wbr>*****************</div><div>; create the filter weights and apply</div><div>; ******************************<wbr>*****************</div><div><br></div><div> ihp = 2 ; band pass</div><div> sigma = 1.0 ; Lanczos sigma</div><div><br></div><div> nWgt = 201 ; loose 100 each end</div><div> fca = 1./100. ; start freq</div><div> fcb = 1./30. ; last freq</div><div> wgt = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )</div><div> xBPF = wgt_runave ( x, wgt, 0 ) ; 30-100 days</div><div><br></div><div> copy_VarMeta(x,xBPF)</div><div> dNames= getvardims(xBPF)</div><div> dSIZES=dimsizes(xBPF)</div><div> print (dNames)</div><div> print (dSIZES)</div><div><br></div><div>; ******************************<wbr>*****************</div><div>; create new date array for use on the plot</div><div>; ******************************<wbr>*****************</div><div> filo = "tas_aave_Asia_bandpass30-100.<wbr>nc"</div><div> system ("/bin/rm "+filo) ; remove any pre-existing file</div><div> fo = addfile(filo , "c") ; open output file</div><div> tasmax=xBPF(:)</div><div> fo->tasmax = tasmax ; write ud to a file</div><div>end</div></div><div><br></div><div><br></div><div>Thanks.</div><span class="m_-6603637538672453442HOEnZb"><font color="#888888"><div>SB</div><div><br></div><div><br></div></font></span></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>