<div dir="ltr">GrADS users,<div><br></div><div>I am trying to compute the standard deviation of each time step, from t=1 to t=434...so I want 434 values to output. I am taking the area-averaged (aave) baseflow data of a shapefile spanning 434 months. </div><div><br></div><div>I know that sqrt<i style="color:rgb(0,0,0)">[(x1-xbar)**2 + (x2-xbar)**2 + (x3-xbar)**2</i><i style="color:rgb(0,0,0)"> +....+ (xN-xbar)**2 ]/(N-1) </i><div>would give me the standard deviation, but I am confused on how to use the 'aave' function along with this formula. In other words, I want the standard deviation of this 'aave' value. So far, I have:</div><div><br></div><div>**************</div><div>'reinit'<br></div><div><br></div><div>*opens file<br></div><div><br></div><div>'sdfopen /data2/control/<a href="http://MERRA2_Mon_BaseFlowFlux_1980_2016.rmp.nc">MERRA2_Mon_BaseFlowFlux_1980_2016.rmp.nc</a>' <br></div><div>'set t 1'<br></div><div><br></div><div><div>it=1</div><div><br></div><div>while (it <=436)</div><div>'set t 'it</div></div><div><br></div><div><div>*opens mask file</div><div><br></div><div></div></div><div>'open /data2/control/Region13_SAm_mask_MERRA2.nc' </div><div><div><br></div><div>*aave of masked area<br></div><div><br></div><div>'d aave(maskout(baseflow.1*86400,lterp(mask.2(time=00Z01JAN1980),baseflow.1)),g)' </div><div>say result</div></div><div><div><br></div><div>it=it+1</div><div>endwhile</div></div><div><br></div><div>******************</div><div><br></div><div>I have tried the following commands to find standard deviation of this area-averaged mask, but I am not sure if they are correct:</div><div><br></div><div>1.</div><div><div>'d sqrt(ave(pow(maskout(baseflow*86400,lterp(mask.2(time=00Z01JAN1980),baseflow.1)),2),t=1,t=434))'</div><div>say result</div></div><div><br></div><div>2. </div><div>'define BaseMed = ave(baseflow*86400,t=1,t=434)'</div><div>say ''result''</div><div>'define BaseStd = sqrt(pow(maskout(baseflow*86400-BaseMed,lterp(mask.2(time=00Z01JAN1980),baseflow.1)),2)/435)'</div><div>'d BaseStd'</div><div>say ''result''</div><div><br></div><div>3.</div><div>'d sqrt(pow(aave(maskout(baseflow.1*86400,lterp(mask.2(time=00Z01JAN1980),baseflow.1)),g)-baseflow.1,2)))'<br></div><div><br></div><div>Are any of these close to being right? How else could I go about finding the Std. Deviation of an area-averaged location?</div><div><br></div><div>-Justin</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-size:12.8px"><span style="font-size:10pt;font-family:"Times New Roman",serif;background-image:initial;background-repeat:initial"><font color="#000000"><b>Justin Hicks</b></font></span></span><br></div><div><i style="font-size:12.8px"><span style="font-size:10pt;font-family:"Times New Roman",serif;background-image:initial;background-repeat:initial"><font color="#000000">Undergraduate<br>Atmospheric Sciences Major</font></span></i></div><div><i style="font-size:12.8px"><span style="font-size:10pt;font-family:"Times New Roman",serif;background-image:initial;background-repeat:initial"><font color="#000000">GIS Minor<br>University of Maryland-College Park</font></span></i><font color="#000000" face="arial, helvetica, sans-serif" size="2"><b><br></b></font></div></div></div></div></div>
</div></div>