E3SM-Project / E3SM

Energy Exascale Earth System Model source code. NOTE: use "maint" branches for your work. Head of master is not validated.
https://docs.e3sm.org/E3SM
Other
332 stars 334 forks source link

Aligning Pi, Siderial Day, and hence Coriolis Parameter in MPAS-Ocean and MPAS-SeaIce with E3SM #6387

Open proteanplanet opened 2 weeks ago

proteanplanet commented 2 weeks ago

Two fundamental constants differ across E3SM and MPAS components affecting the Coriolis Parameter.

MPAS-SeaIce declares constants in mpas_seaice_constants.F drawn directly from shr_const_mod.F90 in the E3SM framework and in ice_comp_mct.F. By comparison, MPAS-Ocean draws on some constants declared in mpas_ocn_constants.F from shr_const_mod.F90 in the E3SM framework, also in ocn_comp_mct.F, but others from the MPAS framework in mpas_constants.F.

Here are the resulting differences to PI and Omega (O=ocean, I=sea ice, E=E3SM:):

PI 3.141592653589793 (O) 3.14159265358979323846 (I) 3.14159265358979323846 (E)

Omega (/s) 7.29212e-5 (O) 7.29212e-5 (I) 7.29212351699037e-05 (E - calculated using PI and siderial day constants)

These values should be identical across the coupled system. Suggest we collectively use [SHR_CONST_OMEGA](https://github.com/E3SM-Project/E3SM/blob/661e8078abde19f5542755d9bd9a75206a999fbe/share /util/shr_const_mod.F90#L19), declared in the respective ocean and sea ice files.

xylar commented 2 weeks ago

I have a proposed fix to MPAS-Ocean init mode in: https://github.com/E3SM-Ocean-Discussion/E3SM/pull/96 The Coriolis parameter is only computed in MPAS-Ocean initial conditions and then carried through. It is never computed in forward mode, nor is omega used anywhere I could identify in forward mode.

xylar commented 2 weeks ago

The lower precision constant pii is pervasive enough in MPAS-Ocean forward mode that this will need to be fixed in a separate PR.