[MITgcm-devel] exf_bulkformulae/bulk_largeyeager04
Martin Losch
Martin.Losch at awi.de
Tue May 18 08:49:31 EDT 2010
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
More information about the MITgcm-devel
mailing list