<div style="background-color:rgb(255,255,255)"><font color="#222222" face="arial, sans-serif">I have been struggling manipulate the netcdf file produced from the global model to make it compatible with regional model. I don&#39;t know how to apply <b>scale facto</b>r and <b>add offset</b> to the data to reduce the size of the file.</font></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
required data should have the following.</div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b>dimensions:</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>longitude = 128 ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>latitude = 64 ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>levelist = 10 ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>date = 366 ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><br></b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b>variables:</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>float longitude(longitude) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>longitude:units = &quot;degrees_east&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>float latitude(latitude) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">                </span>latitude:units = &quot;degrees_north&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>int levelist(levelist) ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>levelist:units = &quot;millibars&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>int date(date) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>date:units = &quot;days since 2002-1-1&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>short t(date, levelist, latitude, longitude) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">                </span>t:scale_factor = xxxxxxxxxxxxx ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>t:add_offset = xxxxxxxxxxxxx ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>t:units = &quot;K&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">                </span>t:long_name = &quot;Temperature&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><br></b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b>// global attributes:</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">                </span>:Conventions = &quot;MARS&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>:time = &quot;0000&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>:class = &quot;e4&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">                </span>:levtype = &quot;pl&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>:repres = &quot;ll&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>:domain = &quot;g&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">But, my file from the global of the models is </div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b>dimensions:</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>lon = 128 ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>lat = 64 ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>lev = 10 ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>time = 366 ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b>variables:</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>double lon(lon) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>lon:units = &quot;degrees_east&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>lon:long_name = &quot;Longitude&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>double lat(lat) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>lat:units = &quot;degrees_north&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>lat:long_name = &quot;Latitude&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>double lev(lev) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>lev:units = &quot;millibar&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>lev:long_name = &quot;Level&quot; ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">        </span>double time(time) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>time:long_name = &quot;Time&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">                </span>time:units = &quot;minutes since 2012-01-01 00:00&quot; ;</b></div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><b><span style="white-space:pre-wrap">        </span>double t(time, lev, lat, lon) ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b><span style="white-space:pre-wrap">                </span>t:_FillValue = -999000000. ;</b></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
 I don&#39;t know how to get the variables and global attributes done in the file though I am quite familiar with NCO. Could anyone familiar with help me the code to overcome this problem.</div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">Thank you in advance,</div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">Kishore</div><div><br></div>