<div dir="ltr">Hello,<div><br></div><div>I am working on reading in precipitation data that corresponds to a radius of a 500km around a tropical cyclone. I have a variable that contains precipitation over the Eastern US and into the Atlantic Ocean. Below is some of my code. </div><div><br></div><div>;Snippet of code </div><div><br></div><div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">obtracks = addfile("<a href="http://Allstorms.ibtracs_wmo.v03r05.nc">Allstorms.ibtracs_wmo.v03r05.nc</a>","r") ;Read in IBTrACS</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">lat_wmo = short2flt(obtracks->lat_wmo) ;(storm,time)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">lon_wmo = short2flt(obtracks->lon_wmo) ;(storm,time)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><br><span style="font-variant-ligatures:no-common-ligatures"></span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">; Read in Precipitation Files</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><br><span style="font-variant-ligatures:no-common-ligatures"></span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">precipfile = addfile("TRMMdata.nc","r")</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">AvgYearlyTRMM = precipfile->AvgYearlyTRMM ;(time,lat,lon)</span></p></div><div><br></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">clat = new(61,float)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">clon = new(61,float)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">radius = 5.0</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">lat_location = lat_wmo(0,0) ; location for 1st TC and time step<br><span style="font-variant-ligatures:no-common-ligatures"></span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">lon_location = lon_wmo(0,0) ; location for 1st TC and time step</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">nggcog(lat_location,lon_location,radius,clat,clon) ;calculate circle</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">min_lat = min(clat)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">max_lat = max(clat)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">min_lon = min(clon)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">max_lon = max(clon)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><br><span style="font-variant-ligatures:no-common-ligatures"></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">newTRMMyearly = AvgYearlyTRMM(0,{min_lat:max_lat},{min_lon:max_lon}) ;reads in square of data</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><span style="font-family:arial,sans-serif;font-size:small">So the above reads in the data correctly but gives me a square of data instead of the circle that I create with the nggcog function above since I'm using the min/max of the circle.</span><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></p><p style="margin:0px;line-height:normal">I was wanting to know if anyone knows of a way to read in the clat/clon from my AvgYearlyTRMM dataset. I have attempted some indexing of the clat/clon varibles to put the index into AvgYearlyTRMM, but then the lat/lon arrays are no longer monotonic so trying to use gsn_csm_contour_map doesn't work. <br></p><br><p style="margin:0px;line-height:normal"><br></p><p style="margin:0px;line-height:normal">Thanks for any help.</p><p style="margin:0px;line-height:normal">Jake</p><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> </span></p></div></div>