PseudoNetCDF.camxfiles.one3d package

Submodules

PseudoNetCDF.camxfiles.one3d.Memmap module

Memmap – one3d Memmap interface

class PseudoNetCDF.camxfiles.one3d.Memmap.one3d(*args, **kwds)[source]

Bases: PseudoNetCDFFile

one3d provides a PseudoNetCDF interface for CAMx one3d files. Where possible, the inteface follows IOAPI conventions (see www.baronams.com).

ex:
>>> one3d_path = 'camx_one3d.bin'
>>> rows,cols = 65,83
>>> one3dfile = one3d(one3d_path,rows,cols)
>>> one3dfile.variables.keys()
['TFLAG', 'UNKNOWN']
>>> tflag = one3dfile.variables['TFLAG']
>>> tflag.dimensions
('TSTEP', 'VAR', 'DATE-TIME')
>>> tflag[0,0,:]
array([2005185,       0])
>>> tflag[-1,0,:]
array([2005185,  240000])
>>> v = one3dfile.variables['UNKNOWN']
>>> v.dimensions
('TSTEP', 'LAY', 'ROW', 'COL')
>>> v.shape
(25, 28, 65, 83)
>>> one3dfile.dimensions
{'TSTEP': 25, 'LAY': 28, 'ROW': 65, 'COL': 83}

Initialization included reading the header and learning about the format.

rows - number of rows in domain (defaults: 1) cols - number of columns in domain (defaults: size)

data_fmt = 'f'
id_fmt = 'fi'
classmethod isMine(path)[source]

True if this file or object can be identified for use by this class. Useful to override for classes that can be initialized from disk.

units = 'UNKNOWN'
var_name = 'UNKNOWN'

PseudoNetCDF.camxfiles.one3d.Read module

Read – one3d Read interface

class PseudoNetCDF.camxfiles.one3d.Read.one3d(*args, **kwds)[source]

Bases: PseudoNetCDFFile

one3d provides a PseudoNetCDF interface for CAMx one3d files. Where possible, the inteface follows IOAPI conventions (see www.baronams.com).

ex:
>>> one3d_path = 'camx_one3d.bin'
>>> rows,cols = 65,83
>>> one3dfile = one3d(one3d_path,rows,cols)
>>> one3dfile.variables.keys()
['TFLAG', 'UNKNOWN']
>>> tflag = one3dfile.variables['TFLAG']
>>> tflag.dimensions
('TSTEP', 'VAR', 'DATE-TIME')
>>> tflag[0,0,:]
array([2005185,       0])
>>> tflag[-1,0,:]
array([2005185,  240000])
>>> v = one3dfile.variables['UNKNOWN']
>>> v.dimensions
('TSTEP', 'LAY', 'ROW', 'COL')
>>> v.shape
(25, 28, 65, 83)
>>> one3dfile.dimensions
{'TSTEP': 25, 'LAY': 28, 'ROW': 65, 'COL': 83}

Initialization included reading the header and learning about the format.

see __readheader and __gettimestep() for more info

data_fmt = 'f'
getArray()[source]
id_fmt = 'fi'
items()[source]
keys()[source]
read()[source]

provide direct access to the underlying RecordFile read method

read_into(dest)[source]

put values from rffile read into dest dest - numpy or numeric array

seek(date=None, time=None, k=1, chkvar=True)[source]

Move file cursor to beginning of specified record see __recordposition for a definition of variables

seekandread(date=None, time=None, k=1)[source]

see seek and read

seekandreadinto(dest, date=None, time=None, k=1)[source]

see seek and read_into

timerange()[source]
units = 'UNKNOWN'
values()[source]
var_name = 'UNKNOWN'

PseudoNetCDF.camxfiles.one3d.Write module

Write – CAMx one3d writer

PseudoNetCDF.camxfiles.one3d.Write.ncf2one3d(ncffile, outpath, key=None, tflag='TFLAG')[source]

Module contents

one3d – one3d File Interfaces