[ncl-talk] query

Kevin Hallock hallock at ucar.edu
Thu Oct 5 17:05:16 MDT 2017


Hi Saurabh,

I have attached a modified version of your script, “depth_trend_line_mod.ncl”. One major change is that it now checks the output of the regline_stats() function to make sure the result is not a missing value.

The issue I found was that during the first iteration of your loop (i=0), the value returned by regline_stats() contained a missing value and did not have the “b95” attribute.

Also, I chose to explicitly declare temp (“temp = new(1, double)”) before the loop, instead of implicitly declaring it inside the loop (“temp = regline_stats(time,ts(i,:))”). When regline_stats() experiences an error, the value returned is a float instead of a double, which causes issues in later iterations of the loop (with an error such as “fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be coerced to type of left hand side”).

I hope this helps!
Kevin

> On Oct 4, 2017, at 1:15 AM, saurabh rathore <rohitsrb2020 at gmail.com> wrote:
> 
> Dear NCL users,
> 
> I am trying to save the regression coefficient value from a 2d variable which is in depth and time and also its 95% confidence interval i.e. b95 in regliine_stat function. I want to save the upper and lower bound value of b95 but somehow the function is not working. Please help me out for this. I am attaching the data file and the code that I am using.
> 
> regards, saurabh
> 
> -- 
> 
> 
> REGARDS
> 
> Saurabh Rathore
> Research Scholar (PhD.)
> Centre For Oceans, Rivers, Atmosphere & Land Science Technology
> Indian Institute Of Technology, Kharagpur
> contact :- 91- 8345984434
> <depth_trend_line.ncl><heat_gd1.nc>_______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171005/b583e5c7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: depth_trend_line_mod.ncl
Type: application/octet-stream
Size: 2269 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171005/b583e5c7/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171005/b583e5c7/attachment-0001.html>


More information about the ncl-talk mailing list