Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.
/ NimrodFiles.jl Public archive

Julia package for reading Met Office Nimrod files

License

Notifications You must be signed in to change notification settings

alexjohnj/NimrodFiles.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NimrodFiles

Build Status Build status

A Julia package for reading Nimrod files supplied by the Met Office. The package has been tested on a few composite radar images.

Usage

The main function in this package is readnimrod. This reads the header and data section of a Nimrod file and returns an instance of Nimrod{T}. This is a composite type with two fields, hdr_dump and data. hdr_dump is of type Array{Any} and contains the fields of the header in the order they are specified in the Nimrod specification. data is of type Matrix{T} where T is the data type and size specified in the header (e.g., Int16). The number of rows and columns are specified in the header.

A quick example of using NimrodFiles:

using NimrodFiles

nf = readnimrod("metoffice-c-band-rain-radar_uk_201603260000_1km-composite.dat")

# Test data matrix size matches what's in the header
@assert (nf.hdr_dump[16], nf.hdr_dump[17]) == size(nf.data)

NimrodFiles also exposes the function readnimrod_hdr which works in the same manner but only returns an array of the header contents.

File Conversion

NimrodFiles provides the function toasciigrid(n::Nimrod, outputfile::AbstractString) which can write a Nimrod data type into an ESRI ASCII file.

License

Good old MIT.

About

Julia package for reading Met Office Nimrod files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages