NOAA-ORR-ERD / noaa-oil-data

The data used in the NOAA ADIOS Oil Database: https://adios.orr.noaa.gov
6 stars 1 forks source link

Oil sample year #1

Closed knutfrode closed 9 months ago

knutfrode commented 10 months ago

Hi, and thank you for maintaining and sharing the oil library and database!

For the Norwegian oil data, reports/references frequently include older samples of oil, or reviews of earlier unpublished reports. The user typically wants to know at which year the sample was taken, as oil reservoirs change over time, and are resampled at typically 10 year intervals. We have earlier included the year in the name of the oil (e.g. "NORNE 1997"). But have recently changed this practice to instead use the "year" field under "reference". However, according to your documentation, this should be the year of the reference, and not of the sample: https://adios.orr.noaa.gov/api/docs/database_fields.html#reference-year

I see three different ways the year of the sample could be stored:

What would be your recommendation?

ChrisBarker-NOAA commented 10 months ago

(getting out he time machine...) . . . use oil.metadata.sample_date

It can be a full ISO date string, or simply a year. :-)

Sorry for the too-limited docs.

knutfrode commented 10 months ago

There you go! I was grepping for year, and not for date. Sorry about the noise.

But then I would like to add sample year to the Norwegian oils, and also to add missing cuts to some of the oils.. I assume you would be happy to take in pull requests?

And a final question: are you planning to make a conda package also for this repository?

ChrisBarker-NOAA commented 10 months ago

Yes -- very happy to accept PRs with new data!

Please run adios_db_validate (shipped with the adiso_db package) after adding/changing anything. It's not complete but it will find some issues errors.

And also adios_db_process_json -- which will normalize the JSON.

As for a conda package -- this is data, not code, so a user may well want to install it anywhere -- and conda can only install stuff within a conda environment.

If we did do a conda package -- where in a conda environment is should it go -- maybe /share?

knutfrode commented 10 months ago

Good, we will use those validation tools.

Regarding conda, perhaps @gauteh has a suggestion, and a comment whether conda package of noaa oil data would be useful?

knutfrode commented 10 months ago

Trying to remove warnings and errors, I am not able to see what causes W009 Distillation fraction recovered is missing or invalid for most Norwegian oils, e.g. this one: https://github.com/NOAA-ORR-ERD/noaa-oil-data/blob/production/data/oil/NO/NO00039.json#L101

...
            "distillation_data": {
                "type": "volume fraction",
                "cuts": [
                    {
                        "fraction": {
                            "value": 0.058,
                            "unit": "fraction",
                            "unit_type": "volumefraction"
                        },
                        "vapor_temp": {
                            "value": 68.0,
                            "unit": "C",
                            "unit_type": "temperature"
                        }
                    },
                    {
                        "fraction": {
                            "value": 0.086,
                            "unit": "fraction",
                            "unit_type": "volumefraction"
                        },
                        "vapor_temp": {
                            "value": 93.0,
                            "unit": "C",
                            "unit_type": "temperature"
...
ChrisBarker-NOAA commented 10 months ago

Ahh -- that's a tricky one. It's looking for:

distillation_data.fraction_recovered

Depending on the method used for computing the distillation cuts, the data may not represent 100% of the oil -- is can represent only the fraction that has a boiling point below some value.

if it wasn't reported in the original data, there's no real way to know without talking to the provider (sintef) or maybe deducing it from the method used, if that's specified.

If you can't find it, you can leave it blank -- and we could try to take a closer look at the NOFO reports (at least the English ones)

Looking at a couple records, it looks like they are probably 100% fraction recovered, but I'm not the expert.

I'll bring it up with out group.

knutfrode commented 10 months ago

Ok, the pdf report for the same sample as above (Gullfaks A blend) is found on the NOFO webpages: https://www.nofo.no/planverk/datasett/oljetyper-og-egenskaper/forvitringsstudier/#:~:text=Gudrun%202019-,Gullfaks%20A%202010,-Gullfaks%20C%202010 The cuts are given in Table A1 on page 69, but I cannot see any recovery fraction there, nor elsewhere in the text.

ChrisBarker-NOAA commented 10 months ago

OK -- we looked at the report, and it says: "True Boiling Point Curve" -- which we think means it's an physical distillation, so the fraction recovered is 100% (1.0 fraction).

knutfrode commented 9 months ago

Fixed by https://github.com/NOAA-ORR-ERD/noaa-oil-data/pull/2