<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.<wbr>nc | less<br><div><br>===========================================<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"><strong>filedimdef</strong></a>(fo,"time",-1,True) ; 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.<wbr>nc</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/<wbr>gadoc/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/<wbr>nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>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="HOEnZb"><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">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></div>