Skip to content

Add CIME Earth radius - #315

Merged
xylar merged 1 commit into
MPAS-Dev:masterfrom
xylar:get_cime_earth_radius
May 29, 2020
Merged

xylar merged 1 commit into
MPAS-Dev:masterfrom
xylar:get_cime_earth_radius

Conversation

@xylar

@xylar xylar commented May 28, 2020

Copy link
Copy Markdown
Collaborator

This is stored in a dictionary of potential CIME constants.

A test has also been added to verify each time the mpas_tools package is created (e.g. in Travis CI or on conda-forge) that the constants have the expected value by comparing them with the constants from CIME from E3SM/master.

@xylar

xylar commented May 28, 2020 •

Copy link
Copy Markdown
Collaborator Author

@proteanplanet, @dengwirda, let me know if this solution works for you. You could use the CIME Earth radius in your python code via:

from mpas_tools.cime.constants import constants

earth_radius = constants['SHR_CONST_REARTH']

Also, I can easily add other constants from CIME but I didn't know which would be useful during mesh creation (as opposed to within cores in MPAS-Model).

@xylar
xylar requested review from dengwirda and proteanplanet May 28, 2020 19:25
@proteanplanet

Copy link
Copy Markdown

@xylar This looks close to perfect to me - the exact solution we need.

@proteanplanet proteanplanet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted!

@xylar

xylar commented May 28, 2020

Copy link
Copy Markdown
Collaborator Author

Thanks @proteanplanet for the quick review!

This is stored in a dictionary of potential CIME constants.

A function can also be used to verify that the constants have the
exptect value by comparing them with the constants from CIME
from a provided E3SM tag.
@xylar
xylar force-pushed the get_cime_earth_radius branch from cb0b611 to 18681f1 Compare May 29, 2020 09:30
@dengwirda

Copy link
Copy Markdown
Contributor

Thanks @xylar this looks great!

@xylar
xylar merged commit 1bd41e5 into MPAS-Dev:master May 29, 2020
@xylar
xylar deleted the get_cime_earth_radius branch May 29, 2020 13:25
@xylar

xylar commented May 29, 2020

Copy link
Copy Markdown
Collaborator Author

Thanks @dengwirda!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants