[Mitgcm-support] Re: EOS

mitgcm-support at dev.mitgcm.org mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:51:36 EDT 2003


Jean-Michel,

since I am mostly responsible for the new EOS, let me give you an 
answer. First of all, you are right, the whole equation of state 
computation is awkward. It should be a separate package, but 
unfortunately, this is prohibited by the appearance of tAlpha and sBeta 
for the linear equation of state in the namelist file.

Jean-Michel Campin wrote:
> Hi,
> 
> I don't understand how the different EOS works:
> 
> a) I don't see why we don't have 1 S/R / EOS 
> that compute what is needed, with an argument 
> to select either rho, alpha or beta.
> Right now, after 2 calls, we still need additional
> computations that could have been put inside the EOS S/R(s).
As far as I know, alpha and beta are only needed in the KPP package, 
correct me if I am wrong, that why the focus has not been on these 
routines, need to be fixed.

> 
> b) check_eos is ... really bad :
> * requires a huge space in memory since new 3D arrays T,S, ... 
>   are declared.
> * save/modify/restore of P(1,1,1,1,1) in common bloc is
>   not very elegant
> * find_rho is called but also others specific EOS S/R 
>   (that are also called inside find_rho) 
>   and at the end I am completely lost.
> 
> If there is a volonter to maintain this piece of code, its fine.
> For now, the solution I found is to set #define EXCLUDE_EOS_CHECK
> at the begining of ini_eos.F that leave the check_eos S/R empty. 
> This reduces the size of the executable significantly.

Probably a good solution, because the check is no longer necessary. I 
needed it when I included the new EOSs, and I agree the check_eos can be 
excluded from the code. But it is not really bad :o)

> 
> Jean-Michel
> 
> PS: (a detail)
> eosType is well documented, appears in "data" file and so on.
> But in EOS/ S/R, this is an other string that is used,
> longer, undocumented, but also in a common block.
> This does not contribute to make thing more clear.

the flag equationOfState was introduced in an effort to "package"
the whole eos thing, but as you have notice this is really incomplete.
But the advantage of equationOfState is that it is defined in EOS.h, 
together with all declarations that are relevant for the equation of 
state, so that turning the computation of state into a package should 
not be that difficult. It's only in organizational problem, because it 
will require a change in the first namelist in data. There are also much
more severe issue connected to the pressure field, because currently, it 
needs to lagged for the eosTypes JMD95P and MDJWF. Furthermore, pressure 
does not really belong into EOS.h!

Martin

-- 
Martin Losch
Alfred Wegener Institute for Polar and Marine Research
Postfach 120161, 27515 Bremerhaven, Germany;
Tel./Fax: ++49(0471)4831-1872/1797





More information about the MITgcm-support mailing list