ucd-library / glm-lightning

Processing the AWS cloud lightning product
MIT License
0 stars 2 forks source link

Update glm.sql #5

Closed dabizito closed 8 months ago

dabizito commented 8 months ago

The flash area variable was not well calculated You use the energy variable instead of the area variable to transform to physical values:

create or replace function area_m2 (f in glm.flash, out m2 float). LANGUAGE SQL IMMUTABLE AS $$ select (f.energy::float * 152601.9) as m2; $$;

So, it should be f.area instead of selecting f.energy.