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

Added sample_date and fraction_recovered to all Norwegian oils. Fixed… #2

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

knutfrode
Copy link
Contributor

… 0.15 K/C issues. Changelogs and status updated. All oils do now validate without warnings or errors.

@knutfrode
Copy link
Contributor Author

This is ready to merge

@@ -215,7 +226,7 @@
"unit_type": "volumefraction"
},
"vapor_temp": {
"value": 754.8000000000001,
"value": 754.7999999999998,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an awful lot of digits -- probably a result of floating point calculations. It won't do any harm, so I"m going to merge, but it would be nice to clean up some day.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These extra decimals are added in the final step, when exporting an Adios oil object to file with o.to_file()
https://github.com/NOAA-ORR-ERD/adios_oil_database/blob/c3d87d7a9e70717211dfe1850d807586ef0cbdd2/adios_db/adios_db/models/oil/oil.py#L158
nlohmann/json#1109

I believe this can be solved by adding an "encoder" to json.dump:
https://stackoverflow.com/questions/1447287/format-floats-with-standard-json-module

@ChrisBarker-NOAA ChrisBarker-NOAA merged commit ca22bdb into NOAA-ORR-ERD:production Nov 28, 2023
@ChrisBarker-NOAA
Copy link
Contributor

Thanks! -- there are issues with fraction_recovered -- if it's set to <1.0 (max_value=1.0), it can't be used as a GNOME OIl.

We'll try to track that down.

@knutfrode
Copy link
Contributor Author

For all these oils, fraction_recovered should be 1

                "fraction_recovered": {
                    "unit": "fraction",
                    "max_value": 1.0,
                    "unit_type": "concentration"
                }

which means that they should work as Gnome oils?

@knutfrode knutfrode mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants