Closed zxdawn closed 1 year ago
Note that this is also related to #61 which calculates the advection time
Although I noticed that we need to re-calculate the delta since the overpass time is updated in s5p_lno2_product.py
.
Because the TROPOMI can fly over the Arctic within 10 minutes, we can add a 15-min tolerance in
subset = (-cfg['delta_time'] < df_lightning['delta']) & (df_lightning['delta'] < 15)
And, we need to update the delta immediately after recalculating the overpass time over convection:
ds_lightning['delta'][:] = (ds_lightning_t1['time'] - t_overpass) / np.timedelta64(1, 'm')
ds_lightning = ds_lightning.where(ds_lightning['delta']<=0, drop=True)
Then, we can use the delta
directly in production efficiency calculation instead of recalculating again
We calculate the mean time as overpass time for our Arctic region
https://github.com/zxdawn/S5P-LNO2/blob/95d2f3e05ee1c715da60e82264fab94eade09560/main/s5p_lno2_utils.py#L103-L104
and then select lightning happened before that mean time
https://github.com/zxdawn/S5P-LNO2/blob/95d2f3e05ee1c715da60e82264fab94eade09560/main/s5p_lno2_utils.py#L140-L145
This could lead to missing lightning because the mean time is not the mean time over the convection region.