[ncl-talk] Doing a rcm2rgrid

Adam Phillips asphilli at ucar.edu
Mon Apr 30 10:42:38 MDT 2018


Hi Sara,
I cannot speak as to why the error message only occurs when analyzing one
WRF file. You can use the printMinMax function to see the range of data
that is being entered into the rcm2grid function. You are correct in that
you can use mask to mask all areas that are equal to zero. I prefer using a
where statement, either setting all areas that are equal to 0 to
_FillValue, or by setting those areas to a very small number:
arr = where(arr.eq.0, 0.0001, arr)   ; set all values that are 0 equal to
.0001, leave other values as is
Note for those values that are now set to .0001 that the resulting division
calculation may end up with very large values.

Hope that helps. If not, please respond to the ncl-talk email list.
Adam

On Sat, Apr 28, 2018 at 12:28 PM, SARA CORNEJO BUENO <sarcorne at ucm.es>
wrote:

> Hi!
> I run my NCL script, and I got an error:
>
> *fatal:divide: Division by 0, Can't continue *
>
> I saw in NCL talk, that one way to avoid this is using the mask function
> to mask the zero values, but why does it only occur in one wrf
> output?Because I use it in minimum pressure calculation and it did't print
> any error, and, to mask means to modify data and then lose consistency in
> the results?
>
> Thank you in advance!
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180430/5e7a3531/attachment.html>


More information about the ncl-talk mailing list