[MITgcm-support] How to add a new equation of state in mitgcm

Martin Losch Martin.Losch at awi.de
Fri Dec 17 09:48:59 EST 2021


Yanhong,

if you want to add your own eos, then the right place to start is “model/src/find_rho.F”, where density (actually rho-rhoConst) is computed for level “k”. The routine computes pressure “locPres” as a fucntion of depth (level k). and with that you should have all ingredients to compute your density.
For some mixed layer models, you need alpha and beta (thermal expansion and haline contraction coefficients), which are computed in find_alpha.F and find_beta.F

If you want to add a new parameter, you need to define it in model/inc/PARAMS.h (plenty of example), don’t forget to put it into the appropriate common block, set the default in model/src/set_defaults.F and add it to the namelist in model/src/ini_parms.F
For your own safety it makes sense to print its value in model/src/config_summary.F

Martin

> On 17. Dec 2021, at 10:57, 赖燕红 <yhlai at pku.edu.cn> wrote:
> 
> Hi, 
> 
> I want to add a new equation of state in MITgcm. Particularly, this equation of state is assumed to be a piecewise function, that means the density has a different dependence on pressure and temperature under different temperatures. I found some files in /models/ that might relate to the settings of the equation of state, for example, /models/src/ini_eos.F & Find_rho.F & find_alpha.F, /models/inc/EOS.h & PARMS.h. But I'm still very confused on how to realize a piecewise equation of state that depends on temperature. Does anyone know or ever try how to realize this? 
> 
> 
> 
> Also, if I want to add a new parameter in /input/data PARM01, where do I need to define this new parameter? Or do I need to modify other files at the same time?
> 
> 
> 
> Thanks in advance!
> 
> 
> 
> Yanhong 
> 
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1665 bytes
Desc: not available
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20211217/e655901b/attachment.p7s>


More information about the MITgcm-support mailing list