PseudoNetCDF.camxfiles.height_pressure package
Submodules
PseudoNetCDF.camxfiles.height_pressure.Memmap module
Memmap
– height/pressure Memmap interface
- class PseudoNetCDF.camxfiles.height_pressure.Memmap.height_pressure(*args, **kwds)[source]
Bases:
PseudoNetCDFFile
height_pressure provides a PseudoNetCDF interface for CAMx height_pressure files. Where possible, the inteface follows IOAPI conventions (see www.baronams.com).
- ex:
>>> height_pressure_path = 'camx_height_pressure.bin' >>> rows,cols = 65,83 >>> hpf = height_pressure(height_pressure_path,rows,cols) >>> hpf.variables.keys() ['TFLAG', 'HGHT', 'PRES'] >>> v = hpf.variables['V'] >>> tflag = hpf.variables['TFLAG'] >>> tflag.dimensions ('TSTEP', 'VAR', 'DATE-TIME') >>> tflag[0,0,:] array([2005185, 0]) >>> tflag[-1,0,:] array([2005185, 240000]) >>> v.dimensions ('TSTEP', 'LAY', 'ROW', 'COL') >>> v.shape (25, 28, 65, 83) >>> hpf.dimensions {'TSTEP': 25, 'LAY': 28, 'ROW': 65, 'COL': 83}
- data_fmt = 'f'
- id_fmt = 'fi'
PseudoNetCDF.camxfiles.height_pressure.Read module
Read
– height_pressure Read interface
- class PseudoNetCDF.camxfiles.height_pressure.Read.height_pressure(*args, **kwds)[source]
Bases:
PseudoNetCDFFile
height_pressure provides a PseudoNetCDF interface for CAMx height_pressure files. Where possible, the inteface follows IOAPI conventions (see www.baronams.com).
- ex:
>>> height_pressure_path = 'camx_height_pressure.bin' >>> rows,cols = 65,83 >>> hpf = height_pressure(height_pressure_path,rows,cols) >>> hpf.variables.keys() ['TFLAG', 'HGHT', 'PRES'] >>> v = hpf.variables['V'] >>> tflag = hpf.variables['TFLAG'] >>> tflag.dimensions ('TSTEP', 'VAR', 'DATE-TIME') >>> tflag[0,0,:] array([2005185, 0]) >>> tflag[-1,0,:] array([2005185, 240000]) >>> v.dimensions ('TSTEP', 'LAY', 'ROW', 'COL') >>> v.shape (25, 28, 65, 83) >>> hpf.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'
- id_fmt = 'fi'
PseudoNetCDF.camxfiles.height_pressure.Transforms module
Write
– CAMx height/pressure variable transformations
- class PseudoNetCDF.camxfiles.height_pressure.Transforms.height_pressure_center_time(*args, **kwds)[source]
Bases:
time_avg_new_unit
- class PseudoNetCDF.camxfiles.height_pressure.Transforms.height_pressure_center_time_plus(*args, **kwds)[source]
Bases:
time_avg_new_unit
- class PseudoNetCDF.camxfiles.height_pressure.Transforms.height_pressure_plus(*args, **kwds)[source]
Bases:
add_derived
PseudoNetCDF.camxfiles.height_pressure.Write module
Write
– CAMx height_pressure writer
- PseudoNetCDF.camxfiles.height_pressure.Write.ncf2height_pressure(ncffile, outpath, hght='HGHT', pres='PRES', tflag='TFLAG')[source]
- PseudoNetCDF.camxfiles.height_pressure.Write.write_hgtprss(sdate, stime, time_step, vals)[source]
Takes an iterable and some defining information and creates a CAMx read wind file
sdate - integer start date stime - float start time time_step - float increment between times
vals - array axes time,uv,xy,z