PseudoNetCDF.camxfiles.lateral_boundary package
Submodules
PseudoNetCDF.camxfiles.lateral_boundary.Memmap module
Memmap
– lateral_boundary Memmap interface
- class PseudoNetCDF.camxfiles.lateral_boundary.Memmap.lateral_boundary(*args, **kwds)[source]
Bases:
PseudoNetCDFFile
lateral_boundary provides a PseudoNetCDF interface for CAMx lateral_boundary files. Where possible, the inteface follows IOAPI conventions (see www.baronams.com).
- ex:
>>> lateral_boundary_path = 'camx_lateral_boundary.bin' >>> rows,cols = 65,83 >>> lbf = lateral_boundary(lateral_boundary_path,rows,cols) >>> lbf.variables.keys() ['TFLAG', 'O3', 'NO', 'NO2', ...] >>> tflag = lbf.variables['TFLAG'] >>> tflag.dimensions ('TSTEP', 'VAR', 'DATE-TIME') >>> tflag[0,0,:] array([2005185, 0]) >>> tflag[-1,0,:] array([2005185, 240000]) >>> v = lbf.variables['O3'] >>> v.dimensions ('TSTEP', 'LAY', 'ROW', 'COL') >>> v.shape (25, 28, 65, 83) >>> lbf.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