<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I am now trying to read the CONUS-Soil dataset for bulk density.  I tried the following</p>
<p style="margin-top:0;margin-bottom:0">but ended up with values of around 320 rather then the expect values around 1.5.</p>
<p style="margin-top:0;margin-bottom:0">What might I be missing here?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div style="font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
dims = (/ 11, 2984, 6936 /)</div>
<div style="font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
codes = cbinread ("bd.bsq", dims, "ushort")</div>
<div style="font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
soil=int2flt(ushorttoint(codes))</div>
<div style="font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
soil=soil(:,::-1,:)/100.</div>
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0">Data description</p>
<p style="margin-top:0;margin-bottom:0"><a href="http://www.soilinfo.psu.edu/index.cgi?soil_data&conus&data_cov&bd&datasets&geo" class="OWAAutoLink" id="LPlnk16188" previewremoved="true">http://www.soilinfo.psu.edu/index.cgi?soil_data&conus&data_cov&bd&datasets&geo</a><br>
<span style="font-family: ARIAL, HELVETICA;">The 30-arcsec gridded data are also available as a three-dimensional array of
<span style="background-color: rgb(255, 255, 0);">16-bit unsigned binary integers</span>, where each integer value represents the bulk density
<span style="background-color: rgb(255, 255, 0);">multiplied by 100</span>. The data are organized as eleven two-dimensional layers, giving, respectively, mean BD for each of the 11 standard soil layers. Within each layer, the values are arranged by horizontal
 rows. All values for the first layer are given first, starting with the value for the left (western) end of the top (northern-most) row, and continuing left to right along the row. The data for the last row of the first layer are then followed by the top row
 of the second layer, and so on.  </span><span style="font-family: ARIAL, HELVETICA; font-size: 12pt;">The array contains 11 layers each containing 2984 rows of 6936 values.</span><span style="font-family: ARIAL, HELVETICA;"><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: ARIAL, HELVETICA; font-size: 12pt;"><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: ARIAL, HELVETICA; font-size: 12pt;">Map of bulk density</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: ARIAL, HELVETICA; font-size: 12pt;"><a href="http://www.soilinfo.psu.edu/index.cgi?soil_data&conus&data_cov&bd&image" class="OWAAutoLink" id="LPlnk13307" previewremoved="true">http://www.soilinfo.psu.edu/index.cgi?soil_data&conus&data_cov&bd&image</a><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: ARIAL, HELVETICA; font-size: 12pt;"><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>Thanks, Michael</div>
<div></div>
<div><br>
</div>
<br>
<p></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
Michael Notaro<br>
<div>Associate Director<br>
</div>
<div>Nelson Institute Center for Climatic Research<br>
</div>
<div>University of Wisconsin-Madison<br>
</div>
<div>Phone: (608) 261-1503<br>
</div>
<div>Email: mnotaro@wisc.edu<br>
</div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Dave Allured - NOAA Affiliate <dave.allured@noaa.gov><br>
<b>Sent:</b> Tuesday, July 9, 2019 12:05 PM<br>
<b>To:</b> Michael Notaro<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Subject:</b> Re: [ncl-talk] CONUS-SOIL</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>The BSQ binary file is a flat binary 3-D array of unsigned bytes.  This is the simplest way to read in NCL.  I think I got the correct dimension order, but please verify it.</div>
<div><br>
</div>
<div>    dims = (/ 11, 2984, 6936 /)</div>
<div>    codes = cbinread ("layertext.bsq", dims, "ubyte")</div>
<div><br>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, Jul 9, 2019 at 10:15 AM Michael Notaro via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" id="LPlnk898084" class="OWAAutoLink" previewremoved="true">ncl-talk@ucar.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div id="x_gmail-m_-1273417200183080321divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0px; margin-bottom:0px">Does anyone have a recommendation of the best way in NCL to read in the CONUS-SOIL dataset</p>
<p style="margin-top:0px; margin-bottom:0px">for soil texture types at 11 soil levels?  It's available in band-sequential binary format or</p>
<p style="margin-top:0px; margin-bottom:0px">Arc/Info grid format or Arc/Info polygon format.</p>
<p style="margin-top:0px; margin-bottom:0px"><br>
</p>
<p style="margin-top:0px; margin-bottom:0px"><a href="http://www.soilinfo.psu.edu/index.cgi?soil_data&conus&data_cov&texture&datasets&geo" class="x_gmail-m_-1273417200183080321OWAAutoLink OWAAutoLink" id="LPlnk663053" target="_blank" previewremoved="true">http://www.soilinfo.psu.edu/index.cgi?soil_data&conus&data_cov&texture&datasets&geo</a><br>
<br>
</p>
<p style="margin-top:0px; margin-bottom:0px">Thanks, Michael</p>
<p style="margin-top:0px; margin-bottom:0px"><br>
</p>
<div id="x_gmail-m_-1273417200183080321Signature">
<div id="x_gmail-m_-1273417200183080321divtagdefaultwrapper" style="font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
Michael Notaro<br>
<div>Associate Director<br>
</div>
<div>Nelson Institute Center for Climatic Research<br>
</div>
<div>University of Wisconsin-Madison<br>
</div>
<div>Phone: (608) 261-1503<br>
</div>
<div>Email: <a href="mailto:mnotaro@wisc.edu" target="_blank" id="LPlnk111981" class="OWAAutoLink" previewremoved="true">
mnotaro@wisc.edu</a></div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>