Skip to content
Snippets Groups Projects
Commit c5b7309c authored by tomrink's avatar tomrink
Browse files

start support for Boeing icing data...

parent 278f8eb9
No related branches found
No related tags found
No related merge requests found
import datetime import datetime
from datetime import timezone from datetime import timezone
import re import re
from pathlib import Path
import h5py
NO_ICE = '\s*NEG\s*|\s*NONE\s*|\s*NEGATIVE\s*|\s*NO\s*' NO_ICE = '\s*NEG\s*|\s*NONE\s*|\s*NEGATIVE\s*|\s*NO\s*'
ICE_LVL = '\d+-\d+|FL\d+-FL\d+' ICE_LVL = '\d+-\d+|FL\d+-FL\d+'
...@@ -155,3 +157,15 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-63, 63]): ...@@ -155,3 +157,15 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-63, 63]):
rpts.append(tup) rpts.append(tup)
return ice_dict, no_ice_dict, neg_ice_dict return ice_dict, no_ice_dict, neg_ice_dict
def pirep_icing_from_boeing(dirname='/ships19/cloud/scratch/ICING/BOEING/icing/2020/', lon_range=[-180, 180], lat_range=[-63, 63]):
flist = []
for path in Path(dirname).rglob('*.nc'):
flist.append(path)
cnt = 0
for fname in flist:
h5f = h5py.File(fname, 'r')
ice_bool = h5f['ice_bool'][:]
cnt += ice_bool.shape[0]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment