[mpas-developers] Bug Notice in deriv_two computation

Doug Jacobsen jacobsen.douglas at gmail.com
Wed Apr 4 13:21:20 MDT 2012


Hi Everyone,

I just committed a fix to a bug that I found in the computation of
deriv_two. Because all cores used this same code, I wanted to bring
everyones attention to it so they could fix it if they wanted to.

Currently in mpas_[core]_advection.F the computation of deriv_two involves
scaling cell center coordinates, finding the distance between two points on
the sphere, and scaling vertex coordinates. The scalings, and distances are
done using a hard coded sphere radius rather than the grid % sphere_radius
variable that is provided from input grids. The use of the hardcoded radius
is incorrect for all meshes that have different radii, and causes problems
in the tracer fields. We noticed this in temperature and salinity which in
turn feedback into other variables as well.

The fix is simply to replace all instances of a (the radius of the earth
from mpas_constants.F) with grid % sphere_radius.

Because this module is present in every core, it might be a good idea at a
later point to try and move this into operators.

The fixed version for the ocean core is now present in the repository, so
feel free to use that as a reference.

Let me know if anyone has any questions or comments.

Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20120404/c51b4da3/attachment.html 


More information about the mpas-developers mailing list