<div dir="ltr"><div><div><div><div><div><div><div><div><div>You must look at the variable you wish to write to the netCDF file. <br>Always use printVarSummary(...)<br><br>;***********************************************************<br>; Compute daily climatology: raw and then 'smoothed' <br>;***********************************************************<br> xClmDay = clmDayTLL(x, yyyyddd) ; daily climatology at each grid point<br> printVarSummary(xClmDay)<br><br>Variable: xClmDay<br>Type: float<br>Total Size: 15389568 bytes<br> 3847392 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [year_day | 366] x [lat | 73] x [lon | 144]<br>Coordinates: <br> year_day: [1..366]<br> lat: [90..-90]<br> lon: [ 0..357.5]<br>Number Of Attributes: 4<br> long_name : Daily Climatology: mean Daily U-wind<br> units : m/s<br> information : Raw daily averages across all years<br> smoothing : None<br>======================================================<br><br></div>Note: there is *no* time dimension. Rather than<br><br> dimNames = (/"time", "lat", "lon"/)<br></div>use<br> dimNames = (/"year_day", "lat", "lon"/)<br><br>---<br></div>Change:<br> filevardef(fnc, "time" ,typeof(time),getvardims(time))<br></div>To<br> filevardef(fnc, "year_day" ,typeof(year_day),getvardims(year_day))<br><br>---<br></div>Change<br> filevardef(fnc, "time" ,typeof(time),getvardims(time))<br></div>To<br> filevardef(fnc, "year_day" ,typeof(year_day),getvardims(year_day))<br>---<br></div><div><br></div><div><br></div><div>Change<br></div> filevardef(fnc, varNC ,typeof(xAnom) ,getvardims(xAnom))<br></div>To<br> filevardef(fnc, xClmDay ,typeof(xClmDay) ,getvardims(xClmDay))<br><br>---<br></div>etc<br><br><br><div><br><div><br><div><div><br><div><br><div><div><br></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 21, 2017 at 2:45 AM, Sujata Mandke <span dir="ltr"><<a href="mailto:amin@tropmet.res.in" target="_blank">amin@tropmet.res.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear NCL community,<br>
Greetings!<br>
<br>
I am using NCL script ”mjo_clivar_2.ncl” from application examples<br>
on NCL website. In this example script, netcdf file containing<br>
anomalies is created. Instead of anomalies, i wish to create netcdf file<br>
containing climatology. I had modified the script accordingly.<br>
The error message is as follows:<br>
----------<br>
FileAddVar, in file: NclFile.c, line: 454<br>
fatal:FileAddVar: Dimension (year_day) is not currently defined, can't add variable<br>
fatal:["Execute.c":8128]:<wbr>Execute: Error occurred at or near line 125 in file mjo_clivar_2.dlclm.ncl<br>
--------------<br>
I understand that the error is resulting because leftmost dimension<br>
of daily climatology is “year_day” (=366). While, the leftmost dimension<br>
of anomaly is time (which is same as in input file).<br>
However, I do not know how to modify the script. I have searched the<br>
“NCL-talk archives” extensively, but found none for this error.<br>
I am attaching my script with this mail.<br>
As the error is not caused by the data, the script can be<br>
tested with any data. So, i am not attaching the data file.<br>
<br>
I am using NCL version 6.1.2 on linux machine.<br>
<br>
Please help in this regard.<br>
Any suggestion would be of great help.<br>
Many thanks.<br>
With regards<br>
<span class="HOEnZb"><font color="#888888">Sujata Mandke<br>
<br>
--<br>
Dr. Sujata Mandke<br>
scientist,Indian Institute of Tropical Meteorology<br>
PUNE,INDIA<br>
</font></span><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>