<div dir="ltr">That did the trick Dennis, thanks!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 4, 2020 at 11:07 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> Possibly:</div><div><br></div><div> <br></div><div> fgrb = <b>addfiles(</b>...)<br></div><div> prcType = fgrb[:]->RAIN <br></div><div> work = fgrb[:]->FREEZE_RAIN</div><div> prcType = <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml" target="_blank"><b>where</b></a>(work.ne.0, 2, prcType)</div><div><div> work = fgrb[:]->ICE</div><div> prcType = where(work.ne.0, 3, prcType)</div><div><div> work = fgrb[:]->SNOW</div><div> prcType = where(work.ne.0, 4, prcType)</div></div></div><div> <br></div><div>Cheers</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 4, 2020 at 8:53 AM Micah Sklut via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Using GFS data, there are 4 different precipitation category variables: </div><div>rain, freezing rain, ice, snow</div><div><br></div><div>Each of these variables has a boolean 0 or 1 value for each grid point. I'd like to combine these 4 variables into 1 variable, such that each grid point has a value of:</div><div>no precip = 0</div><div>rain = 1</div><div>freezing rain = 2</div><div>ice = 3</div><div>snow = 4</div><div><div><br></div><div>Is looping through all of the grid points in space and time, the approach that needs to be taken here? Or is there a more efficient NCL function approach that can be taken? </div><div><br></div><div>Thanks, </div><div><br></div>-- <br><div dir="ltr">Micah Sklut<br><br></div></div></div>
_______________________________________________<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/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Micah Sklut<br><br></div>