GeoscienceAustralia / tcrm

A statistical-parametric model for assessing wind hazard from tropical cyclones
http://geoscienceaustralia.github.io/tcrm
Other
81 stars 52 forks source link

Track generation should reject cyclones with discontinuous radial profile #84

Open umma-zannat opened 4 years ago

umma-zannat commented 4 years ago

In wind.windmodels, the radial profile (wind speed as a function of radial distance from the storm centre) is calculated for a grid of points around the centre of the cyclone. Part of that calculation involves calculating the second derivative of the wind speed (as a function of radial distance) to ensure the profile is continuous at the point of maximum wind speed.

We should modify TrackGenerator.TrackGenerator to include a calculation of the radial profile for each timestep, with a check of this second derivative. If the second derivative is positive, then reject the track. That way it will fail fast and not continue to the expensive calculations of wind models.

wcarthur commented 4 years ago

https://github.com/GeoscienceAustralia/tcrm/tree/trackvalidation

KayShelton commented 4 years ago

Note for the implemented validProfile check, this shouldn't be done if the validSize check returns False. TCRM will crash doing the validProfile check after validSize return False due to rMax <5km.

KayShelton commented 4 years ago

I have implemented the additional check posted above (to not do validProfile if validSize returns False), however TCRM is still failing when doing my windprofiles.

To debug, I have added a line to print the dP, rMax and beta when calculating secondDerivative at every timestep, not just when d2Vm > 0.0. All seems to be good when this runs in the validProfile check in TrackGenerator, beta varies as it should for the Powell wind profile. However, when running for windfield generation, beta is not varying, it remains fixed at 0.8.

This would explain why my tracks generate fine, but windfield fails. However, it also means all windfields are incorrect.

@umma-zannat and @wcarthur, could you please check if this is also happening for you? You would only need to run windfield with Powell profile for 1-2 simulations to verify this.

Note I added the following to windmodels.py at line 322:

        log.debug(("Pressure deficit: {0:.2f} hPa, RMW: {1:.2f} km, beta: {2:.2f}"\
                      .format(dP/100., rMax/1000., beta)))
KayShelton commented 4 years ago

Working through this issue, there is a missing unit conversion in metutils.convert (see https://github.com/GeoscienceAustralia/tcrm/issues/94), contributing to the failure of the windfield module, in addition to an error in the validProfile function.

When the windprofile is initialised at each timestep during the wind module, the rMax supplied is in m. It gets converted from km at the beginning of the localWindField function in WindfieldAroundTrack. The PowellWindProfile then includes a conversion, using metutils.convert, from m to nm in the beta calculation. However, this conversion does not currently exist in metutils.convert. There are conversions for km but not for m, therefore the value of rMax in m is returned by metutils.convert and used in the beta calculation.

Additionally, in the validProfile function included in TrackGenerator, rMax is currently supplied directly in km, it needs to be supplied in m.

Correcting these issues results in a correct and consistent calculation of the beta parameter and resulting wind profile in both the Track and Wind modules.