<div dir="ltr"><div><div>Hi guys, <br><br></div>I am working on changing the smois values within my wrfinput_d01 file so that we can examine the various effects of soil moisture on different atmospheric parameters. I have an ncl script that does this for all the values in the CONUS, but I need to change only a small subset of the actual values that&#39;s roughly the size of Colorado. I have never written an ncl script and am stumped currently. Are there any built-in functions that might make this easier or do I need to go another route? My current code is below.<br><br></div><div>Thanks!<br><br></div><div>-Andrew<br><br>=======================================================================<br><br>;=============<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl&quot;<br>;=============<br><br>;---Open file to rewrite<br>  f = addfile(&quot;wrfinput_d01&quot;,&quot;w&quot;)<br><br>;---Read data<br>  data_read = f-&gt;SMOIS(:,:,:,:)<br>  print(&quot;==================================================================&quot;)<br>  printVarSummary(data_read)<br>  print(&quot;min/max data_read = &quot; + min(data_read) + &quot;/&quot; + max(data_read))<br><br>  data_new = data_read * 1.3<br><br>  print(&quot;==================================================================&quot;)<br>  printVarSummary(data_new)<br>  print(&quot;min/max data_read = &quot; + min(data_new) + &quot;/&quot; + max(data_new))<br><br>  print(&quot;==================================================================&quot;)<br>  print(&quot;================= Outputting Data to File ========================&quot;)<br>  print(&quot;==================================================================&quot;)<br><br><br>;---Write out new data<br>  f-&gt;SMOIS = data_new<br><br>;---Close file.<br>  delete(f)<br><br></div></div>