Commit 51343c69 authored by ARCHER's avatar ARCHER 💬

owi2nclight format fix for PUM.

dropped heterogenity_*_*
added heterogenity_mask ( copy from owiPreProcessing/FilterBinary_2
while waiting for definitive data)
fixed fag_meanings
parent 89c6a9f2
......@@ -22,6 +22,7 @@ if __name__ == "__main__":
parser.add_argument('infile')
parser.add_argument('outfile')
args = parser.parse_args()
logger.info("read %s" % args.infile)
data = owi.readFile(args.infile)
meta = owi.readMeta(args.infile)
startdate = datetime.datetime.strptime(owi.getAttribute(args.infile,'firstMeasurementTime'),"%Y-%m-%dT%H:%M:%SZ")
......@@ -29,3 +30,6 @@ if __name__ == "__main__":
owi.writeLight(args.outfile,data,startdate + (stopdate - startdate) / 2,meta=meta)
logger.info("wrote %s" % args.outfile)
# gdaldem color-relief NETCDF:"/tmp/test_gd.nc":wind_speed wind_speed.txt /tmp/testowi1.tif -alpha
# gdal_translate -of GTiff NETCDF:"/tmp/test_gd.nc":wind_speed /tmp/testowi.tif
......@@ -150,16 +150,17 @@ def writeLight(fname,data,date,meta=None):
('owiLat' , 'lat'),
('owiWindSpeed' , 'wind_speed'),
('owiWindDirection' , 'wind_to_direction'),
('owiWindQuality' , 'quality_flag'),
# ('owiWindQuality' , 'quality_flag'),
('owiMask' , 'mask_flag'),
('owiPreProcessing/ND_2','nrcs_detrend_co'),
('owiPreProcessing/ND_2_cross' , 'nrcs_detrend_cr'),
('owiPreProcessing/FilterBinary_1' , 'heterogeneity_co_h'),
('owiPreProcessing/FilterBinary_2' , 'heterogeneity_co_m'),
('owiPreProcessing/FilterBinary_3' , 'heterogeneity_co_l'),
('owiPreProcessing/FilterBinary_1_cross' , 'heterogeneity_cr_h'),
('owiPreProcessing/FilterBinary_2_cross' , 'heterogeneity_cr_m'),
('owiPreProcessing/FilterBinary_3_cross' , 'heterogeneity_cr_l'),
# ('owiPreProcessing/FilterBinary_1' , 'heterogeneity_co_h'),
# ('owiPreProcessing/FilterBinary_2' , 'heterogeneity_co_m'),
# ('owiPreProcessing/FilterBinary_3' , 'heterogeneity_co_l'),
# ('owiPreProcessing/FilterBinary_1_cross' , 'heterogeneity_cr_h'),
# ('owiPreProcessing/FilterBinary_2_cross' , 'heterogeneity_cr_m'),
# ('owiPreProcessing/FilterBinary_3_cross' , 'heterogeneity_cr_l'),
('owiPreProcessing/FilterBinary_2' , 'heterogeneity_mask'),
('owiNrcs' , 'nrcs_co'),
('owiNrcs_cross' , 'nrcs_cr'),
('owiElevationAngle' , 'elevation_angle'),
......@@ -167,7 +168,7 @@ def writeLight(fname,data,date,meta=None):
])
# global attrs
global_attrs = [ 'sourceProduct' , 'missionName', 'polarisation', 'footprint','l2ProcessingUtcTime']
attrs = ['long_name','units','valid_range','flag_values','flag_meaning']
attrs = ['long_name','units','valid_range','flag_values','flag_meanings']
# overwrite meta
meta_over = {
'wind_speed' : {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment