<div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL-experts,</div><div><br></div><div><b>[1] Details</b></div><div>I have three variables dpdx, dpdy, and px2py2 with the following dimensions and sizes:</div><div><i><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">Dimensions and sizes:</span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures;white-space:pre-wrap">   </span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">[time | 124] x [lat | 73] x [lon | 144]</span></i></div><div><font color="#000000" face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures">These variables were derived using spherical harmonics.</span></font></div><div><i><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures"><br></span></i></div><div><font color="#000000" face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures"><b>[2] Problem and what I have done so far</b></span></font></div><div><font color="#000000" face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures"><b><br></b></span></font></div><div>(a) I want to get the dates when any gridpoint in a specified domain satisfies the following conditions: </div><div>dpdx = 0 <b>.and.</b> dpdy = 0 <b>.and. </b>px2py2 <b>.lt.</b> 0</div><div><br></div><div>(b) get the coordinates of these points, if possible. </div><div><br></div><div>I have the following lines in my script:</div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space" style="font-size:11px">  </span><font size="1">latS = 5.0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>latN = 30.0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>lonL = 120.0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>lonR = 160.0</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>dpdx_region=dpdx(:,{latS:latN},{lonL:lonR})</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>dpdx_region=dpdy(:,{latS:latN},{lonL:lonR})</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space" style="">  </span>px2py2_region=px2py2(:,{latS:latN},{lonL:lonR})</font></span></p></div><div><br></div><div>I am stuck here. I dont know what index I should use to get the dates and how to get their coordinates.</div><div><br></div><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1" style=""><font color="#000000">  </font><font color="#ff0000">dpdx_thres<span class="gmail-Apple-converted-space" style="">  </span>= dim_num_n((dpdx_region .eq. 0),(/1,2/))</font></font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1" color="#ff0000"><span class="gmail-Apple-converted-space">  </span>dpdy_thres<span class="gmail-Apple-converted-space">  </span>= dim_num_n((dpdy_region .eq. 0),(/1,2/))</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1" color="#ff0000"><span class="gmail-Apple-converted-space">  px2py2</span>_thres<span class="gmail-Apple-converted-space">  </span>= dim_num_n((px2py2_region .lt. 0),(/1,2/))</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1" style="" color="#ff0000"><span class="gmail-Apple-converted-space" style="">  </span>n_thres<span class="gmail-Apple-converted-space" style="">  </span>= ind(dpdx_thres .gt. 0 .and. dpdy_thres .gt. 0 .and. px2py2_thres .gt. 0 ) ;time indices but i'm not sure if this is correct!</font></span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><font size="1"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>print(n_thres)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>print("=====")</font></span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><font size="1"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></font></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>if(ismissing(nt_thres(0))) then</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">     </span>print("++++++++++++++")</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">     </span>print(" NO values exceed threshold="+threshold)</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">     </span>print("++++++++++++++")</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space">  </span>exit</font></span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><span class="gmail-Apple-converted-space" style="">  </span>end if</font></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><br></font></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><br></font></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><font face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures">I am attaching my script. </span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><font face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures"><br></span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><font face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures">I'll appreciate any help on this!</span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><font face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures"><br></span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><font face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures">Sincerely,</span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><font face="arial, sans-serif"><span style="font-variant-ligatures:no-common-ligatures"><b><i>Lyndz</i></b></span></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font size="1"><br></font></span></p></div></div></div></div></div></div></div></div></div></div></div></div></div>