Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track generation should reject cyclones with discontinuous radial profile #84

Open
umma-zannat opened this issue Apr 21, 2020 · 4 comments
Assignees
Labels

Comments

@umma-zannat
Copy link
Collaborator

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 wcarthur self-assigned this Apr 30, 2020
@wcarthur wcarthur added the Bug label Apr 30, 2020
@wcarthur
Copy link
Member

@KayShelton
Copy link

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
Copy link

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
Copy link

Working through this issue, there is a missing unit conversion in metutils.convert (see #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants