<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Consolas",serif;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Hello Dennis,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thank you for the wonderful guide and help all in all to solve my problem. You are amazing! God bless you.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">I agree with you that I should use ncl syntax. Thank you.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Kemal.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Dennis Shea <shea@ucar.edu>
<br>
<b>Sent:</b> Thursday, October 22, 2020 8:38 PM<br>
<b>To:</b> Gurer, Kemal@ARB <kemal.gurer@arb.ca.gov><br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] netcdf file creation and order of dimensions<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:solid #9C6500 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<p class="MsoNormal" style="line-height:12.0pt;background:#FFEB9C"><b><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:#9C6500">CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless
you recognize the sender and know the content is safe.</span></b><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">
<o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">You csn use functions/procedures but I prefer using NCL syntax:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">See: <a href="https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ncl.ucar.edu%2FApplications%2Fmethod_1.shtml&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018890535%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Fumx2Di7g2V0scEQSTi3qkuQPCJymhxRb3HVlfbfzEA%3D&reserved=0">
<b>https://www.ncl.ucar.edu/Applications/method_1.shtml</b></a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">zmid(latitude,longitude,levz_mid)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">========<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> work = zmid(levz_mid|:,latitude|:,longitude|:) ; reorder via NCL syntax: sizes: (klev,nlat,mlon)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> printVarSummary(work)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> print("=====")<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> ntim = 1 ; 0 1 2 3<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> WORK = <a href="https://gcc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FBuilt-in%2Fconform_dims.shtml&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018890535%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=yUZSomE45tysTe8G4gWTplWWkEfiwca97L8CGg3tpis%3D&reserved=0">
<b>conform_dims</b></a>((/ntim,klev,nlat,mlon/), work, (/1,2,3/)) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> printVarSummary(WORK) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> print("=====")<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> copy_VarMeta(x, WORK(0,:,:,:)) ; coordinates and attributes<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> WORK!0 = "time" ; name dimension<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">;; WORK&time = (/...../) ; add time coordinate
<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> printVarSummary(WORK) <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> print("=====")<o:p></o:p></p>
<pre> <a href="https://gcc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FBuilt-in%2Fsetfileoption.shtml&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018900499%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RmcczTdNTT8N5ldCjvd%2Fmq0n7QUFS1cDS%2Fa3JcinNjY%3D&reserved=0"><strong><span style="font-family:"Courier New"">setfileoption</span></strong></a>("nc","Format","NetCDF4Classic") <o:p></o:p></pre>
<pre> diro = "./"<br> filo = "SampleFile_KemalGurer.nc"<br> ptho = doro+filo<br> fo = <a href="https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FBuilt-in%2Faddfile.shtml&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018900499%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5iOSVh80lc3By61vc9zhVv0qI%2BiO3C%2FLsIFR2ftiFGg%3D&reserved=0"><strong><span style="font-family:"Courier New"">addfile</span></strong></a>(ptho,"c")<br><br>;===================================================================<br>; create global attributes of the file (optional)<o:p></o:p></pre>
<pre>;===================================================================<o:p></o:p></pre>
<pre> fAtt = True ; assign file attributes<o:p></o:p></pre>
<pre> fAtt@title = "NCL netCDF Creation: Kemal Gurer"<o:p></o:p></pre>
<pre> fAtt@source_file = "<a href="https://gcc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Foriginal-file.nc%2F&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018910425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PiPXCZDt1Kg9hcPc8q412O%2BPQPZeqlA5lF3YtljjnFQ%3D&reserved=0">original-file.nc</a>"<o:p></o:p></pre>
<pre> fAtt@Conventions = "None"<o:p></o:p></pre>
<pre> fAtt@creation_date = <a href="https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FBuilt-in%2Fsystemfunc.shtml&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018910425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ReKQ3RCn5i1UHKqLv1P1GDgEABzdb2w2W26tKmyorWg%3D&reserved=0"><strong><span style="font-family:"Courier New"">systemfunc</span></strong></a> ("date")<o:p></o:p></pre>
<pre> <a href="https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FBuilt-in%2Ffileattdef.shtml&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018920403%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=W8MBM%2FN3VHaXMciobkngnbZh5Uf6%2BcVNYdMbweBkJoE%3D&reserved=0"><strong><span style="font-family:"Courier New"">fileattdef</span></strong></a>( fo, fAtt ) ; copy file attributes<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>;===================================================================<o:p></o:p></pre>
<pre>; make time an <b>UNLIMITED</b> dimension; recommended for most applications<o:p></o:p></pre>
<pre>;===================================================================<o:p></o:p></pre>
<pre> <a href="https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FBuilt-in%2Ffiledimdef.shtml&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018920403%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qA7mVMgMoeOh0oW18Flz6OoSMGvlAj88JVoAUsBlUcs%3D&reserved=0"><strong><span style="font-family:"Courier New"">filedimdef</span></strong></a>(fo,"time",-1,True) <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>;===================================================================<o:p></o:p></pre>
<pre>; output variables directly; NCL will call appropriate functions<o:p></o:p></pre>
<pre>; to write the meta data associated with each variable<o:p></o:p></pre>
<pre>;===================================================================<o:p></o:p></pre>
<pre> fo->ZMID = WORK ; 4D <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</div>
<p class="MsoNormal"> ==========<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">After file is created, examine file contents<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> %> <b>ncdump</b> -h SampleFile_KemalGurer.nc<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">or <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> %> <b>ncl_filedump</b> SampleFile_KemalGurer.nc<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Oct 22, 2020 at 5:28 PM Gurer, Kemal@ARB via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hello,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am writing some variables into a netcdf file, but for my problem, let me show one variable here, zmid, with the netcdf name ZH, using the following netcdf commands:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">filevardef(f,"ZH","float",(/"TSTEP","LAY","ROW","COL"/))<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH_atts = 0.0<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH_atts@long_name = "ZH"<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH_atts@var_desc = "mid-layer height above ground"<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH_atts@units = "M"<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH_atts@_FillValue = 1e32<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">filevarattdef(f,"ZH",ZH_atts)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH = new((/nlev, nlat, nlon/), "float", ZH_atts@_FillValue)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">do n = 0, ntim-1<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> f->ZH(n,:,:,:) = (/zmid/)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">end do<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Here, TSTEP is Time, LAY is levels, ROW is latitude, and COL is longitude with the exact dimensions of the dimensions given in the original data.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">printVarSummary(zmid) gives the following information:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-----------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Variable: zmid<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Type: float<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Total Size: 2328480 bytes<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 582120 values<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Number of Dimensions: 3<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dimensions and sizes: [latitude | 98] x [longitude | 108] x [levz_mid | 55]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Coordinates:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> latitude: [31.6178..42.50189]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> longitude: [-129.0292..-113.0208]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Number Of Attributes: 2<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> units : m MSL<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> long_name : Geometric height of mid-levels<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">(0)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">(0) Geometric height of mid-levels (m MSL) : min=-64.3161 max=29608.8<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-----------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Since I need to write the variable “zmid” as well as other variables into the netcdf file with the following order of dimensions:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">("Time","nVertLevels","latitude","longitude") with the dimension names
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I reorder “zmid” via:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">zmid_reorder = zmid(levz_mid|:,latitude|:,longitude|:)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">printVarSummary(zmid_reorder),<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">which gives the following output:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-----------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Variable: zmid_reorder<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Type: float<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Total Size: 2328480 bytes<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 582120 values<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Number of Dimensions: 3<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dimensions and sizes: [levz_mid | 55] x [latitude | 98] x [longitude | 108]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Coordinates:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> latitude: [31.6178..42.50189]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> longitude: [-129.0292..-113.0208]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">(0) min=-64.3161 max=29608.8<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-----------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">However, the reordered zmid output in netcdf file is wrong. The output of zmid without reordering of dimensions is:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> float ZH(Time, LAY, ROW, COL) ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> ZH:_FillValue = 1.e+32f ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string ZH:units = "M" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string ZH:var_desc = "mid-layer height above ground" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string ZH:long_name = "ZH" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">data:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH =<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 9.999999, 32, 58.4, 90.09999, 128.1, 173.7, 228.45, 294.15, 373, 467.6,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 581.1, 717.3, 880.75, 1076.9, 1312.3, 1594.75, 1933.7, 2340.45, 2828.55,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 3414.3, 4108.8, 4858.8, 5608.799, 6358.8, 7108.8, 7858.8, 8608.8, 9358.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 10108.8, 10858.8, 11608.8, 12358.8, 13108.8, 13858.8, 14608.8, 15358.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 16108.8, 16858.8, 17608.8, 18358.8, 19108.8, 19858.8, 20608.8, 21358.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 22108.8, 22858.8, 23608.8, 24358.8, 25108.8, 25858.8, 26608.8, 27358.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 28108.8, 28858.8, 29608.8, 10, 32, 58.4, 90.10001, 128.1, 173.7, 228.45,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 294.15, 373, 467.6, 581.1, 717.3, 880.75, 1076.9, 1312.3, 1594.75,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 1933.7, 2340.45, 2828.55, 3414.3, 4108.8, 4858.8, 5608.8, 6358.8, 7108.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 7858.8, 8608.8, 9358.8, 10108.8, 10858.8, 11608.8, 12358.8, 13108.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 13858.8, 14608.8, 15358.8, 16108.8, 16858.8, 17608.8, 18358.8, 19108.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 19858.8, 20608.8, 21358.8, 22108.8, 22858.8, 23608.8, 24358.8, 25108.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 25858.8, 26608.8, 27358.8, 28108.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 28858.8, 29608.8,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">----------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The netcdf output of zmid_reorder with netcdf variable name ZH1 as test is:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> float ZH1(TSTEP, LAY, ROW, COL) ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> ZH1:_FillValue = 1.e+32f ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string ZH1:units = "M" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string ZH1:var_desc = "mid-layer height above ground" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string ZH1:long_name = "ZH1" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">data:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ZH1 =<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 9.999999, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9.999999, 10, 10, 10, 10, 10,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 10, 10, 10, 9.999999, 10, 10, 10, 9.999999, 10, 10, 10, 10, 10, 10, 10,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 423.6477,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 378.6578, 662.8945, 1097.154, 1152.52, 1072.004, 1299.672, 1005.835,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 592.6567, 270.4732, 318.5765, 13.87211, 13.37675, 10, 10, 49.30841,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 48.51982, 38.2547, 10.43509, 20.66064, 89.90919, 139.163, 114.4501,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 201.582, 276.1719,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 10, 10, 10, 10, 10, 10, 10,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">---------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">As another example of for the impact of variable reordering on the output, here is the information about code to read potential temperature and reordering it as well as its results:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> tk1 = a->theta<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">; copy_VarMeta(a->theta,tk1)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">; tk1@units = ""<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> printVarSummary(tk1)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> printMinMax(tk1,0)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> tk = tk1(Time|:,nVertLevels|:,latitude|:,longitude|:)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> printVarSummary(tk)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> printMinMax(tk,0)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">--------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Variable: tk1<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Type: float<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Total Size: 55883520 bytes<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 13970880 values<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Number of Dimensions: 4<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dimensions and sizes: [Time | 24] x [latitude | 98] x [longitude | 108] x [nVertLevels | 55]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Coordinates:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> latitude: [31.6178..42.50189]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> longitude: [-129.0292..-113.0208]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Number Of Attributes: 2<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> units : K<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> long_name : Potential temperature<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">(0) Potential temperature (K) : min=282.766 max=797.725<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">data:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">TK1 =<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.8131, 290.7571, 290.7412, 290.7352, 290.734, 290.7361, 290.7417,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.7557, 290.9228, 293.661, 296.6131, 298.7729, 301.4621, 303.3734,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 305.5786, 307.7134, 309.639, 311.1685, 312.9564, 315.1082, 317.7267,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 320.5912, 323.4933, 326.3149, 329.7065, 333.1702, 337.303, 339.9579,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 341.5059, 344.3701, 347.8319, 354.1167, 358.0386, 360.7633, 364.5301,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 372.0264, 381.8416, 392.6732, 410.2569, 427.9963, 446.3387, 469.1274,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 492.7356, 513.7944, 534.12, 553.8484, 575.1737, 600.4743, 628.2712,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 658.1637, 681.6721, 702.9726, 730.4858, 756.6381, 787.6335, 290.8405,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.7827, 290.7664, 290.7603, 290.7591, 290.7614, 290.7675, 290.7849,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.9932, 293.7723, 296.4947, 298.9371, 301.5804, 303.4898, 305.7006,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 307.7661, 309.706, 311.2367, 313.1123, 315.1071, 317.8082, 320.5843,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 323.5288, 326.2887, 329.711, 333.046, 337.2808, 339.8705, 341.3407,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 344.2988, 348.018, 354.2007, 357.992, 360.691, 364.6261, 371.9153,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 381.6589, 392.6092, 410.5144, 428.3927, 446.4816, 469.0464, 491.7896,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 513.2549, 534.1764, 555.1635, 576.1888, 599.7042, 626.2191, 656.9671,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 681.5657, 704.613, 733.2448,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-----------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Variable: tk<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Type: float<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Total Size: 55883520 bytes<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 13970880 values<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Number of Dimensions: 4<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Dimensions and sizes: [Time | 24] x [nVertLevels | 55] x [latitude | 98] x [longitude | 108]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Coordinates:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> latitude: [31.6178..42.50189]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> longitude: [-129.0292..-113.0208]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Number Of Attributes: 2<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> long_name : Reordered potential temperature<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> units : K<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">(0) Potential temperature (K) : min=282.766 max=797.725<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">data:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">TK =<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.8131, 290.8405, 290.8532, 290.874, 290.8821, 290.8575, 290.9009,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.9425, 290.9517, 290.9512, 290.9521, 290.9454, 290.9456, 290.9441,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.9357, 290.9396, 290.9547, 290.9457, 290.9522, 290.9639, 290.9545,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.9518, 290.9407, 290.9241, 290.9189, 290.9194, 290.8954, 290.8531,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.8095, 290.7653, 290.6684, 290.5908, 290.5103, 290.4197, 290.3355,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.2524, 290.0889, 289.9354, 289.8426, 289.769, 289.7196, 289.5693,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 289.5384, 289.5408, 289.3453, 289.1881, 289.1, 289.0808, 289.054,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 289.0443, 289.0854, 288.9913, 289.123, 289.17, 289.3506, 289.4048,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 289.4511, 289.4771, 289.5936, 289.642, 289.163, 289.2242, 289.2056,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 289.2532, 289.3674, 289.5267, 289.6508, 289.8015, 289.9764, 290.2227,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 290.4557, 290.7174, 290.9393, 291.1483, 291.4482, 291.6609, 291.8963,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 292.1499, 292.4067, 292.6108, 292.777, 292.8965, 293.0784, 299.2768,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 299.7407, 305.4052, 313.3188, 313.5712, 314.6627, 313.7572, 313.2654,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 312.6786, 311.9484, 311.588, 311.4529, 308.0678, 307.5142, 307.9211,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 308.1941, 309.1768, 309.8638, 310.4225, 309.4877, 310.032, 311.1737,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> 311.9905, 312.4248, 311.6823,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">---------------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I use the following netcdf file definitions:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">theflnm = "./<a href="https://gcc01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fnc4_write.nc%2F&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018920403%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=h4Hqt536TRhPqJvdeNfZIthg4LI5LPAfGRtpk9MUKu0%3D&reserved=0" target="_blank">nc4_write.nc</a>"<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">setfileoption("nc","format","netcdf4")<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">setfileoption("nc","headerReserveSpace",64000)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">setfileoption("nc","preFill",False)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">setfileoption("nc","defineMode",True)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I also tried to use the following chunking definitions, but commented them out because of the errors that I get and let the internal default definitions take over:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;mtim = 1<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;mlev = nlev/10<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;mlat = nlat/10<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;mlon = nlon/10<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;chunk_sizes = (/mtim,mlev,mlat,mlon/)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;filechunkdimdef(f,dim_names,chunk_sizes,dim_unlimited)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;filevarchunkdef(f, "TA", chunk_sizes)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">;filevarcompressleveldef(f, "TA", 2)<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Is my definition of netcdf file and/or variables in netcdf definitions wrong? Are my definitions for the order of dimensions using reorder and the order of dimensions in netcdf
declarations not supposed to be the same? Just as a summary, original variable, reordered variable and dimension declarations in netcdf attributes are (in order):<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Potential Temperature - [Time | 24] x [latitude | 98] x [longitude | 108] x [nVertLevels | 55]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Reordered Potential Temperature - [Time | 24] x [nVertLevels | 55] x [latitude | 98] x [longitude | 108]<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> float TK1(TSTEP, LAY, ROW, COL) ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> TK1:_FillValue = 1.e+32f ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string TK1:units = "K" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string TK1:var_desc = "potential temperature" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string TK1:long_name = "TK1" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> float TK(TSTEP, LAY, ROW, COL) ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> TK:_FillValue = 1.e+32f ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string TK:units = "K" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> string TK:var_desc = "reordered potential temperature" ;<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thank you for your help.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Kemal.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.ucar.edu%2Fmailman%2Flistinfo%2Fncl-talk&data=04%7C01%7Ckemal.gurer%40arb.ca.gov%7Cfd0f32fff188434c0e5708d8770513e0%7C9de5aaee778840b1a438c0ccc98c87cc%7C0%7C0%7C637390211018930337%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FmzA2BsMAZA1Ih7abhIHBdXlcWRMwnSy0uWssLI%2BqoI%3D&reserved=0" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>