CAMx

class PseudoNetCDF.camxfiles.Memmaps.uamiv(*args, **kwds)[source]

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

ex:
>>> uamiv_path = 'camx_uamiv.bin'
>>> uamivfile = uamiv(uamiv_path)
>>> uamivfile.variables.keys()
['TFLAG', 'O3', 'NO', 'NO2', ...]
>>> tflag = uamivfile.variables['TFLAG']
>>> tflag.dimensions
('TSTEP', 'VAR', 'DATE-TIME')
>>> tflag[0,0,:]
array([2005185,       0])
>>> tflag[-1,0,:]
array([2005185,  240000])
>>> v = uamivfile.variables['O3']
>>> v.dimensions
('TSTEP', 'LAY', 'ROW', 'COL')
>>> v.shape
(25, 28, 65, 83)
>>> uamivfile.dimensions
{'TSTEP': 25, 'LAY': 28, 'ROW': 65, 'COL': 83}
Parameters
  • rf (string or RecordFile) – usually a path to a CAMx formatted file, can be a FortranFileUtil RecordFile object.

  • mode (string) – file open mode read (‘r’), write (‘w’), append (‘a’, ‘r+’)

  • P_ALP (float) – see IOAPI GRIDDESC documentation

  • P_BET (float) – see IOAPI GRIDDESC documentation

  • P_GAM (float) – see IOAPI GRIDDESC documentation

  • XCENT (float) – see IOAPI GRIDDESC documentation

  • YCENT (float) – see IOAPI GRIDDESC documentation

  • GDTYP (float) – see IOAPI GRIDDESC documentation

  • endian (string) – ‘big’ or ‘little’ usually only if mistaken compile

  • chemparam (None or string) – used to identify gases and aerosols

Returns

outf – PseudoNetCDFFile populated from file

Return type

uamiv

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.

PseudoNetCDF.cmaqfiles.ioapi_base