[MITgcm-devel] exf_bulkformulae/bulk_largeyeager04

Jean-Michel Campin jmc at ocean.mit.edu
Tue May 18 10:05:24 EDT 2010


Hi Martin,

I think it would be a good thing to do.
One question: can you check that with the few basic EXF options
(ATM_WIND ...) you get the same results with the modified
exf_bulkformulae (& ALLOW_BULK_LARGEYEAGER04) and the current
exf_bulk_largeyeager04. And with zero optimisation, do we get the
same results at machine precision ?

And to go back to the history, exf_bulk_largeyeager04 was not the
2nd version but the 3rd one (the 2nd beeing in pkg/bulk_force).
It seems to follow a general tendency that we observe 
within MITgcm code to have 3 versions doing roughly the same thing
(like seaice thermodynamics).

Cheers,
Jean-Michel

On Tue, May 18, 2010 at 02:49:31PM +0200, Martin Losch wrote:
> Hi there,
> 
> I feel that the the bulk-formula code situation is unsatisfactory. exf_bulkformulae and exf_bulk_largeyeager04 compute almost the same thing, but not quite. The consequence is that it is very difficult to keep things up to date. Currently I have probably broken the adjoint of exf_bulk_largeyeager04, and it was very hard to recover it (for me) because the structure of the routines is so different (it turned out that there were many recompuations before my changes, if ALLOW_ATM_WIND was undefined). It would be much nicer to only have one routine and have the #ifdef's ALLOW_BULK_LARGEYEAGER04 within this routine. Basically it is just a few lines where it matters, nicely marked by "cph". All other difference are details like the definition of tau and the order of how things are computed. I'll list that I found the differences below, if you find/know of  anything else, please let me know. I will attempt to merge these files into one.
> 
> 1. evap is scaled with 1./rhoFreshWater (ly04) and recip_rhonil
> 2. tau = atmrho*rd*wspeed (ly04) and atmrho*ustar*ustar*wspeed/sh = atmrho*rd*rd*wspeed*sh
> 3. ustress/vstress (end of routine if atm_temp undefined)  is scaled with exf_scal_bulkCdn (=1 by default) in bulkformulae (not ly04)
> 4. ustress = tau*rd*uwind = tau*rd*wspeed*cs = atmrho*rd*rd*wspeed*wspeed*cs (ly04) and tau*cw = atmrho*rd*rd*wspeed*sh*cw (so there one factor wspeed vs. sh=max(wspeed,uMin))
> 5. the max-function in the computation of the stability coefficients (not in ly04).
> 
> 1., 4., 5.will lead to different results, so they should be enclosed by ifdefs.
> 
> What do you think?
> 
> Martin
> 
> 
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel



More information about the MITgcm-devel mailing list