[mpas-developers] Changes to Constants

Michael Duda duda at ucar.edu
Wed May 12 11:22:25 MDT 2010


Hi, Doug.

Thanks for looking into this issue. I did find that the earth radius and
rotation rate that are in the current top of the repository match the values
prescribed for the Jablonowski and Williamson baroclinic wave test case.
Since the constants module is shared between all dynamical cores, I would
guess that the values were changed around the time we added the hydrostatic
atmosphere core.

Given that we may want to adjust the values of these constants for different
test cases, even within the context of the same dynamical core, this raises
the question of whether a shared module is the best place to define
constants. Even if we made module_constants.F specific to each core, we
might not want to specify the constants as Fortran parameters, since we
might like to adjust their values for different test cases without having to
re-compile the code; however, parameters have the nice property that they
can't be accidentally modified in code that uses the enclosing module.

At the moment, no great solution comes to mind, though I'll give it more
thought. If anyone else has any suggestions, please feel free to chime in. 

Cheers,
Michael


On Wed, May 12, 2010 at 06:57:51AM -0400, Doug Jacobsen wrote:
> Hi Developers,
> 
> I ran into an issue the other day and thought I might let everyone know so
> they could avoid having to find it. As some of you may know, Todd and I have
> been trying to reproduce some of his JCP papers results using MPAS. We had
> success a little while back (using revision 120 of the code), and were
> trying to explore the same things using a higher order advection scheme.
> Working in revision 263 of the code I was unable to reproduce the results,
> so I spent almost all of yesterday trying to figure out why.
> 
> It appears that somewhere between these two revisions the values for the
> radius of the earth and the rotation of the earth were modified. We have
> been using Williamson Shallow water test cases (and their respective
> reference solutions), and these use a specific value for a and omega. Here
> are the definitions of each a and omega for the different revisions. I'm not
> sure when they were changed, as I didn't go through all of the revisions to
> find it, but it was somewhere in the last 143 revisions. Hopefully this
> helps someone who runs into a problem reproducing results made previously.
> It's easy for me to just modify the framework/module_constants.F file, so I
> don't know if I need to commit this change back, but it might be useful to
> know the difference.
> 
> Revision 120:
> a       = 6371220.0
> omega   = 7.292e-5
> 
> Revision 263:
> a       = 6371229.0
> omega   = 7.29212e-5
> 
> Williamson:
> a = 6.37122e6
> omega = 7.292e-5
> 
> Doug

> _______________________________________________
> mpas-developers mailing list
> mpas-developers at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/mpas-developers



More information about the mpas-developers mailing list