[ncl-talk] Reading NSIDC sea ice motion binary (.bin format) data

Dennis Shea shea at ucar.edu
Fri Jul 27 19:32:56 MDT 2018


; Data are stored in* 2-byte integer binary format (little endian) *and are
; *pixel-interleaved three-item vectors (u, v, 3)*. Each vector represents
three variables:
;
;     U Component (cm/sec)—Scaled by a factor of 10; divide by 10 to revert
to original units.
;     V Component (cm/sec)—Scaled by a factor of 10; divide by 10 to revert
to original units.
;     Third Variable—Varies for daily and mean grids (see below). For both
daily and mean grids,
;     a pixel value of 0 in the third variable indicates no vectors at that
location.
;

  fName = "..."
  setfileoption("bin","ReadByteOrder","LittleEndian")
  xs = fbindirread(fname,0,(/nrows,ncols,3/), "short")

  u = xs(:,:,0)*0.1
  v = xs(:,:,/)*0.1
  i  = xs(:,:,2)

I have placed some netCDF EASE lat/lon grids at

ftp ftp.cgd.ucar.edu
anonymous
your_ email

cd pub/shea
mget *
quit

     518856 Jul 27 19:14 EaseLatLon_100km.nc
  33224032 Jul 27 19:14 EaseLatLon.1441x1441.nc
  8317800 Jul 27 19:14 EaseLatLon.721x721.nc

===
; Data are stored in* 2-byte integer binary format (little endian) *and are
; *pixel-interleaved three-item vectors (u, v, 3)*. Each vector represents
three variables:
;
;     U Component (cm/sec)—Scaled by a factor of 10; divide by 10 to revert
to original units.
;     V Component (cm/sec)—Scaled by a factor of 10; divide by 10 to revert
to original units.
;     Third Variable—Varies for daily and mean grids (see below). For both
daily and mean grids,
;     a pixel value of 0 in the third variable indicates no vectors at that
location.
;

  fName = "..."
  setfileoption("bin","ReadByteOrder","LittleEndian")
  xs = fbindirread(fname,0,(/nrows,ncols,3/), "short")

  u = xs(:,:,0)*0.1
  v = xs(:,:,/)*0.1
  i  = xs(:,:,2)



On Fri, Jul 27, 2018 at 4:27 PM, Dave Allured - NOAA Affiliate <
dave.allured at noaa.gov> wrote:

> Sourav,
>
> According to the user guide on that website, this format is flat binary,
> signed 16 bit integers, three grids interleaved.  The three grids are U, V,
> and day counts.  You can read this file with the cbinread function.
>
> You may also need the latitudes and longitudes, which are provided in
> separate files in their "tools" directory.  These are 4-column text files
> which can be read with the asciiread function.  Please try the attached
> sample NCL script, which reads both kinds of files.
>
> Please see the first section "Daily Gridded and Mean Gridded Files" in
> their user guide.  After reading the raw data and coordinate files, you
> will need to apply a scale factor to U and V, as they describe.  You should
> also convert U and V from integer to float at the same time, to avoid loss
> of precision.  Depending on your application, you might also need to use
> the day counts grid to make a data mask.
>
> When making plots, you will need to apply the latitudes and longitudes as
> 2-D coordinates, as described in other examples on the NCL website.
>
> --Dave
>
>
> *From: *Sourav Chatterjee <srvsxc at outlook.com>
>>
>> *Date: *Thursday, 26 July 2018 at 4:03 PM
>>
>>
>>
>> Dear NCL users
>>
>>
>>
>> Can anyone help me out with reading the NSIDC EASE-Grid Sea Ice Motion
>> Vectors data (.bin format) in NCL.
>>
>>
>>
>> I have not used this format earlier in NCL, so clueless about it. Any
>> help is appreciated.
>>
>>
>>
>> A sample data is attached. The data format can be found in
>> http://nsidc.org/data/nsidc-0116/versions/3
>>
>> Polar Pathfinder Daily 25 km EASE-Grid Sea Ice Motion Vectors, Version 3
>> | National Snow and Ice Data Center
>> <http://nsidc.org/data/nsidc-0116/versions/3>
>>
>> Polar Pathfinder Daily 25 km EASE-Grid Sea Ice Motion Vectors, Version 3
>>
>> nsidc.org
>>
>>
>>
>> Thanks in advance
>>
>> Sourav
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180727/9ad3d8d1/attachment.html>


More information about the ncl-talk mailing list