IODA Bundle
|
Variables | |
int | nobs_chunk = 200 |
float | time_min = 3.0 |
prepbufr_filename = sys.argv[1] | |
netcdf_filename = sys.argv[2] | |
string | hdstr = 'SID XOB YOB DHR TYP ELV SAID T29' |
string | obstr = 'POB QOB TOB ZOB UOB VOB PWO CAT PRSS TDO PMO XDR YDR HRDR' |
string | qcstr = 'PQM QQM TQM ZQM WQM PWQ PMQ' |
string | oestr = 'POE QOE TOE ZOE WOE PWE' |
list | skiptypes = ['SATWND'] |
bufr = ncepbufr.open(prepbufr_filename) | |
int | nmessages = 0 |
nc = Dataset(netcdf_filename,'w',format='NETCDF4') | |
hd = nc.createDimension('hdrinfo',len(hdstr.split())) | |
nhdd = len(hd) | |
ob = nc.createDimension('obinfo',len(obstr.split())) | |
nobd = len(ob) | |
oe = nc.createDimension('oeinfo',len(oestr.split())) | |
noed = len(oe) | |
qc = nc.createDimension('qcinfo',len(qcstr.split())) | |
nqcd = len(qc) | |
nobsd = nc.createDimension('nobs',None) | |
nmsgs = nc.createDimension('nmsgs',nmessages) | |
hdrdata = \ | |
fill_value | |
missing_value | |
zlib | |
True | |
chunksizes | |
desc | |
hdrinfo | |
obid = nc.createVariable('obid',str,('nobs',),zlib=True) | |
obdata = \ | |
oedata = \ | |
int | qc_fillval = 255 |
qcdata = \ | |
msgnum | |
subsetnum | |
msgtype = nc.createVariable('msgtype',str,('nmsgs'),zlib=True) | |
msgdate = nc.createVariable('msgdate',np.uint32,('nmsgs'),zlib=True) | |
obinfo | |
oeinfo | |
qcinfo | |
int | nob = 0 |
obid_set = set() | |
int | nmsg = 0 |
list | hdrarr = [] |
list | msgnumarr = [] |
int | nobs_message = 0 |
int | nsubset = 0 |
hdr = bufr.read_subset(hdstr).squeeze() | |
obs = bufr.read_subset(obstr) | |
err = bufr.read_subset(oestr) | |
int | nlevs_use = 0 |
lon = hdr[3] | |
press = hdr[5] | |
time = obs[13,nlev] | |
z = obs[3,nlev] | |
string | obidstr = "%s %3i %6.2f %6.2f %9.5f %5i %6.1f" % \ |
errarr = np.array(qcarr) | |
list | obidarr = np.array(msgnumarr) |
subsetnumarr = np.array(subsetnumarr) | |
qcarr = np.where(qcarr == bufr.missing_value,qc_fillval,qcarr).astype(np.uint8) | |
int | nob1 = nob-nobs_message |
convert prepbufr file to netCDF
prepbufr2ncSG.bufr = ncepbufr.open(prepbufr_filename) |
Definition at line 39 of file prepbufr2ncSG.py.
prepbufr2ncSG.chunksizes |
Definition at line 65 of file prepbufr2ncSG.py.
prepbufr2ncSG.desc |
Definition at line 66 of file prepbufr2ncSG.py.
prepbufr2ncSG.err = bufr.read_subset(oestr) |
Definition at line 127 of file prepbufr2ncSG.py.
prepbufr2ncSG.errarr = np.array(qcarr) |
Definition at line 167 of file prepbufr2ncSG.py.
prepbufr2ncSG.fill_value |
Definition at line 65 of file prepbufr2ncSG.py.
prepbufr2ncSG.hd = nc.createDimension('hdrinfo',len(hdstr.split())) |
Definition at line 51 of file prepbufr2ncSG.py.
prepbufr2ncSG.hdr = bufr.read_subset(hdstr).squeeze() |
Definition at line 124 of file prepbufr2ncSG.py.
prepbufr2ncSG.hdrarr = [] |
Definition at line 115 of file prepbufr2ncSG.py.
prepbufr2ncSG.hdrdata = \ |
Definition at line 63 of file prepbufr2ncSG.py.
prepbufr2ncSG.hdrinfo |
Definition at line 69 of file prepbufr2ncSG.py.
string prepbufr2ncSG.hdstr = 'SID XOB YOB DHR TYP ELV SAID T29' |
Definition at line 28 of file prepbufr2ncSG.py.
prepbufr2ncSG.lon = hdr[3] |
Definition at line 131 of file prepbufr2ncSG.py.
prepbufr2ncSG.missing_value |
Definition at line 65 of file prepbufr2ncSG.py.
Definition at line 91 of file prepbufr2ncSG.py.
prepbufr2ncSG.msgnum |
Definition at line 83 of file prepbufr2ncSG.py.
list prepbufr2ncSG.msgnumarr = [] |
Definition at line 116 of file prepbufr2ncSG.py.
Definition at line 89 of file prepbufr2ncSG.py.
prepbufr2ncSG.nc = Dataset(netcdf_filename,'w',format='NETCDF4') |
Definition at line 48 of file prepbufr2ncSG.py.
prepbufr2ncSG.netcdf_filename = sys.argv[2] |
Definition at line 23 of file prepbufr2ncSG.py.
prepbufr2ncSG.nhdd = len(hd) |
Definition at line 52 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nlevs_use = 0 |
Definition at line 128 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nmessages = 0 |
Definition at line 40 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nmsg = 0 |
Definition at line 110 of file prepbufr2ncSG.py.
prepbufr2ncSG.nmsgs = nc.createDimension('nmsgs',nmessages) |
Definition at line 60 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nob = 0 |
Definition at line 108 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nob1 = nob-nobs_message |
Definition at line 172 of file prepbufr2ncSG.py.
prepbufr2ncSG.nobd = len(ob) |
Definition at line 54 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nobs_chunk = 200 |
Definition at line 13 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nobs_message = 0 |
Definition at line 117 of file prepbufr2ncSG.py.
prepbufr2ncSG.nobsd = nc.createDimension('nobs',None) |
Definition at line 59 of file prepbufr2ncSG.py.
prepbufr2ncSG.noed = len(oe) |
Definition at line 56 of file prepbufr2ncSG.py.
prepbufr2ncSG.nqcd = len(qc) |
Definition at line 58 of file prepbufr2ncSG.py.
int prepbufr2ncSG.nsubset = 0 |
Definition at line 118 of file prepbufr2ncSG.py.
prepbufr2ncSG.ob = nc.createDimension('obinfo',len(obstr.split())) |
Definition at line 53 of file prepbufr2ncSG.py.
prepbufr2ncSG.obdata = \ |
Definition at line 73 of file prepbufr2ncSG.py.
Definition at line 71 of file prepbufr2ncSG.py.
prepbufr2ncSG.obid_set = set() |
Definition at line 109 of file prepbufr2ncSG.py.
list prepbufr2ncSG.obidarr = np.array(msgnumarr) |
Definition at line 168 of file prepbufr2ncSG.py.
string prepbufr2ncSG.obidstr = "%s %3i %6.2f %6.2f %9.5f %5i %6.1f" % \ |
Definition at line 143 of file prepbufr2ncSG.py.
prepbufr2ncSG.obinfo |
Definition at line 96 of file prepbufr2ncSG.py.
prepbufr2ncSG.obs = bufr.read_subset(obstr) |
Definition at line 125 of file prepbufr2ncSG.py.
string prepbufr2ncSG.obstr = 'POB QOB TOB ZOB UOB VOB PWO CAT PRSS TDO PMO XDR YDR HRDR' |
Definition at line 29 of file prepbufr2ncSG.py.
prepbufr2ncSG.oe = nc.createDimension('oeinfo',len(oestr.split())) |
Definition at line 55 of file prepbufr2ncSG.py.
prepbufr2ncSG.oedata = \ |
Definition at line 76 of file prepbufr2ncSG.py.
prepbufr2ncSG.oeinfo |
Definition at line 100 of file prepbufr2ncSG.py.
string prepbufr2ncSG.oestr = 'POE QOE TOE ZOE WOE PWE' |
Definition at line 31 of file prepbufr2ncSG.py.
prepbufr2ncSG.prepbufr_filename = sys.argv[1] |
Definition at line 22 of file prepbufr2ncSG.py.
prepbufr2ncSG.press = hdr[5] |
Definition at line 132 of file prepbufr2ncSG.py.
prepbufr2ncSG.qc = nc.createDimension('qcinfo',len(qcstr.split())) |
Definition at line 57 of file prepbufr2ncSG.py.
prepbufr2ncSG.qc_fillval = 255 |
Definition at line 79 of file prepbufr2ncSG.py.
prepbufr2ncSG.qcarr = np.where(qcarr == bufr.missing_value,qc_fillval,qcarr).astype(np.uint8) |
Definition at line 170 of file prepbufr2ncSG.py.
prepbufr2ncSG.qcdata = \ |
Definition at line 80 of file prepbufr2ncSG.py.
prepbufr2ncSG.qcinfo |
Definition at line 104 of file prepbufr2ncSG.py.
string prepbufr2ncSG.qcstr = 'PQM QQM TQM ZQM WQM PWQ PMQ' |
Definition at line 30 of file prepbufr2ncSG.py.
list prepbufr2ncSG.skiptypes = ['SATWND'] |
Definition at line 35 of file prepbufr2ncSG.py.
prepbufr2ncSG.subsetnum |
Definition at line 86 of file prepbufr2ncSG.py.
prepbufr2ncSG.subsetnumarr = np.array(subsetnumarr) |
Definition at line 169 of file prepbufr2ncSG.py.
prepbufr2ncSG.time = obs[13,nlev] |
Definition at line 140 of file prepbufr2ncSG.py.
float prepbufr2ncSG.time_min = 3.0 |
Definition at line 16 of file prepbufr2ncSG.py.
prepbufr2ncSG.True |
Definition at line 65 of file prepbufr2ncSG.py.
prepbufr2ncSG.z = obs[3,nlev] |
Definition at line 142 of file prepbufr2ncSG.py.
prepbufr2ncSG.zlib |
Definition at line 65 of file prepbufr2ncSG.py.