<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'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 = "degrees_east" ;</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 = "degrees_north" ;</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 = "millibars" ;</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 = "days since 2002-1-1" ;</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 = "K" ;</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 = "Temperature" ;</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 = "MARS" ;</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 = "0000" ;</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 = "e4" ;</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 = "pl" ;</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 = "ll" ;</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 = "g" ;</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 = "degrees_east" ;</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 = "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>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 = "degrees_north" ;</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 = "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>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 = "millibar" ;</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 = "Level" ;</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 = "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:units = "minutes since 2012-01-01 00:00" ;</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'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>