[mpas-developers] Test Case 6 Error

Michael Duda duda at ucar.edu
Fri Mar 26 13:49:08 MDT 2010


Hi, All.

Just a heads-up -- I'm going to commit this fix for SWTC6 to the shallow
water model in the trunk (trunk/mpas/src/core_sw/module_test_cases.F) and
the swmodel branches (branches/swmodel/src/module_test_cases.F and
branches/serial_swmodel/module_test_cases.F).

Cheers,
Michael


On Thu, Mar 18, 2010 at 02:25:13PM -0600, Michael Duda wrote:
> Hi, Doug.
> 
> Wow -- thanks very much for finding this! When I had originally
> implemented TC6, the initial conditions looked a little off, and
> the results were incorrect, and after looking through the code and
> paper about 10 times or so, I couldn't find the problem. It turns
> out that the minus sign in the -2 power had been completely lost
> in the scan of the article that I had been working from, with only
> some extra white space between 'cos' and '2 theta' in equation
> 147.
> 
> Please commit this fix whenever you're ready!
> 
> Michael
> 
> 
> On Thu, Mar 18, 2010 at 02:58:34PM -0400, Doug Jacobsen wrote:
> > Hello All,
> > 
> > I have been working on the variable resolution results for TC2, TC5, and TC6
> > with Todd. We ran into an issue with the TC6 results, and after digging
> > through the code I found an error in the initialization for TC6. On lines
> > 510 and 511 of module_test_cases.F the function AA(theta) is defined as
> > 
> > AA = 0.5 * w * (2.0 * omega + w) * cos(theta)**2.0 + &
> >       0.25 * K**2.0 * cos(theta)**(2.0*R) * ((R+1.0)*cos(theta)**2.0 +
> > 2.0*R**2.0 - R - 2.0 - 2.0*(R*cos(theta))**2.0)
> > 
> > In the Williamson paper, he defines this as:
> > 
> > AA = 0.5 * w * (2.0 * omega + w) * cos(theta)**2.0 + &
> >       0.25 * K**2.0 * cos(theta)**(2.0*R) * ((R+1.0)*cos(theta)**2.0 +
> > 2.0*R**2.0 - R - 2.0 - 2.0*R**2*cos(theta))**-2.0
> > 
> > The main (or only) difference that I found was in the currently implemented
> > case, cos(theta) (the last term) is squared, but it really need to be raised
> > to the -2 power.
> > 
> > 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