[MITgcm-devel] exf_bulkformulae/bulk_largeyeager04

Martin Losch Martin.Losch at awi.de
Wed May 19 03:45:58 EDT 2010


Hi Jean-Michel,
you'll love this:

I tried to make look exf_bulkformulae as much as exf_bulk_largeyeager04, and found that numerical details as listed below are enough to explain, why I failed yesterday. For lab_sea (input, input.hb87, input.lsr, input.salt_plume) I get:

changes									individual effects on lab_sea testreport	(16,16,16,16)
1. replace ssttmp=theta(1) by tsf = theta(1)+cen2kel, effects						(16,16,13,14)
2. change 1/exp(c/sst)  to exp(-c/sst)											(06,12,14,05)
3. change definition of tau (factor of ustar between the routines)					(06,13,13,06)

													the cumulative effect is	(05,13,13,05)

4. replace exf_bulkformulae by what I created yesterday							(05,13,13,05)

Great, isn't it? I suggest that I change exf_bulkformulae up to point 3, then update the reference output, and then continue with step 4. Do you agree?

Martin

PS. I cannot explain why the effects are so large for the first and the fourth sub-experiment, and small for hb87 and lsr, maybe like this: only the first experiment uses evp, and salt_plume was always very sensitive, but that's not convincing.

On May 18, 2010, at 4:05 PM, Jean-Michel Campin wrote:

> 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
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel




More information about the MITgcm-devel mailing list