<div dir="ltr">GrADS users,<div><br></div><div>I want to output data to a text file; I have a variety of masks that I am using to get data from specific regions. I am running an area average of monthly data from 1980-2016 using the &#39;maskout&#39; function. </div><div><br></div><div>I want my data to output into 5 columns: &#39;Region&#39;   &#39;Month/Year(Date)&#39;   &#39;Precip(Data)&#39;   &#39;Max Value&#39;   &#39;Min Value&#39;. I want these all to be in the same row with their results underneath. So far, I only have part of a script:</div><div><br></div><div><div>&#39;reinit&#39;</div><div>&#39;open Region00_WLD_mask_TEST.nc&#39;</div><div>&#39;set t 13 last&#39;</div><div>&#39;set dfile 1&#39;</div><div>&#39;set lon -179.5 179.5&#39;</div><div>&#39;set lat -89.5 89.5&#39;</div><div>&#39;open /data2/control/MERRA2_PRECIP</div><div>&#39;set dfile 2&#39;</div><div>&#39;set lon -179.5 179.5&#39;</div><div>&#39;set lat -89.5 89.5&#39;</div><div>&#39;set time 00Z01JAN1980 00Z01APR2016&#39;</div><div>&#39;set dfile 1&#39;</div><div>&#39;d aave(maskout(VAR.2,mask.1(time=00Z01JAN1980)),lon=-179.5,lon=179.5,lat=-89.5,lat=89.5)&#39;</div><div>&#39;set gxout print&#39;</div><div>&#39;set prnopts %6.2f 1 1&#39;</div><div>write(&#39;MERRA2_MASK_DATA.txt&#39;, &#39;WLD   Mon/Yr   Precip   Max    Min&#39;)</div></div><div><br></div><div><br></div><div>I assume that there is no way to display the region unless you put it in lat/lon coordinates, but how could I go about outputting the date, the precipitation data, and the max/min data for each month? Also, this text file will be added to with other masked variables, and I know I must use the command &#39;apprend&#39; somewhere.</div><div><br></div><div>-Justin</div></div>