openradar / PyDDA

Pythonic multiple doppler code based off the 3D variational technique
http://openradarscience.org/PyDDA
Other
91 stars 44 forks source link

rmsVr calculation in wind_retrieve.py #36

Closed LtgBug closed 5 years ago

LtgBug commented 5 years ago

Greetings!

I have recently begun making the switch from Multidop to PyDDA for vertical wind retrieval. Using a case that I'm somewhat familiar with to get my bearings, I have seem some large differences in results between the two packages and I am trying to understand them (as well as learn more about the 3DVAR method). Upon comparing the code from each package, it seems that the observation term in the 3DVAR cost function may not be handled the same way. Specifically, the calculation of rmsVr in wind_retrieve.py (PyDDA) that is used with the radar data weighting term does not include a square root operation as rmsVr in Multidop's DDA.c does. This seems to make a large difference in how input cost function weights are used and how the cost function terms all relate to each other compared with Multidop. To account for the difference/align with expectations based on how Multidop is used, would it be correct to adjust the observed radial velocity weight by some order(s) of magnitude?

Thank you in advance for any guidance.

rcjackson commented 5 years ago

Yes, this would be the correct move to do. The coefficients are chosen in a way such that a retrieval converges to a physically realistic solution, which can vary for any given retrieval and potentially between PyDDA and Multidop.

Having an option to adjust rmsVr to be squared or not is a useful idea for a contribution to PyDDA, so I'll leave this issue open until I or someone submits a PR.

rcjackson commented 5 years ago

I've went ahead and fixed this issue, so now our coefficients should be more consistent with those used by MultiDop.

LtgBug commented 5 years ago

Thank you for the help!