Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose a change for floating number format for mean climate metrics … #1139

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

zhangshixuan1987
Copy link
Collaborator

Current compute_metrics.py used either ".5f" or ".3f" to form the floating numbers for the output from the mean climate driver. As the magnitude of the model variable can range from 1e5 (e.g. pressure ) to 1e-3 (e.g. humidity), using the ".5f" and ".3f" can sometimes truncate the small values to zero. It seems that using a standard scientific notation can be beneficial if the user processes the data without converting the unit data ahead. In this way, it also provides possibilities for users to convert the units within the diagnostic datasets.

I submit this pull request to trigger some discussions and see if a better solution can be made to the PMP master code.

…output

Current compute_metrics.py used either ".5f" or ".3f" to form the
floating numbers for the output from the mean climate driver. As the
magnitude of the model variable can range from 1e5 (e.g pressure ) to
1e-3 (e.g. humidity), used the ".5f" and ".3f" can sometimes truncate
the small values to zero. It seems that using  a standard scientific
notation can be benificial in case the user processed the data without
converting the unit data ahead. In this way, it also provide
possibilities for users to convert the units within the diagnostic
datasets.
@zhangshixuan1987
Copy link
Collaborator Author

An example can be seen in the PMP metrics data for zonal wind stress (tauv) below:

You can see that the biases in many metrics results are zeros ,while the mean values of this variable are around 10^{-2}. I think for this scenario, 3 digt decimal points for biases are not enough to provide useful information.

@lee1043 lee1043 added this to the 3.6.2 milestone Oct 8, 2024
@lee1043
Copy link
Contributor

lee1043 commented Oct 8, 2024

@zhangshixuan1987 thank you for the PR. I am merging it now.

@lee1043 lee1043 merged commit 0bfdf96 into main Oct 8, 2024
4 checks passed
@lee1043 lee1043 deleted the number_digit branch October 8, 2024 21:53
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.

2 participants