<div dir="ltr">Hi Arnaitz,<div>I cannot answer how to compute your BS variable, but I can answer your second query. </div><div>Use the where function to set the conditional requirements:<br>BS = where(BS.gt.20,20,BS)</div><div>BS = where(BS.lt.10,0,BS)</div><div>MUCIN = where(MUCIN.gt.-40,-40,MUCIN)</div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml</a><br></div><div>Adam</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 25, 2021 at 3:26 AM Arnaitz Fernández via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.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>Hi. I'm trying to make an NCL script for calculating in a map values of SCP (Supercell Composite Parameter). The definition of this parameter is: <br></div><div>SCP=  (MUCAPE/1000 ) *(BS eff /20 )* (SRH eff /50 ) * (-40/MUCIN), <br></div><div>where BSeff is the Bulk Shear effective and SRH effective Storm relative Shear. <br></div><div><br></div><div>With wrf_user_getvar I can obtain values of MUCAPE, MUCIN and SRH (with some calculations of u and v) but I don't know how to calculate BS.</div><div><br></div><div>Another problem is that there are some values that requires conditionals:</div><div>if BS>20 --> BS = 20</div><div>if BS < 10 --> BS = 0</div><div>if MUCIN > -40 --> MUCIN  =  -40.</div><div><br></div><div>But there are values that change between different points on the map, so I don't know how to do this conditionals for each point of the map. I mean, I can't do: if MUCIN > -40: MUCIN = -40, because this is for all points of the map. So, do you know how to do that??? <br></div><div><br></div><div>Than you.<br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>