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

add new component co2box #792

Merged
merged 19 commits into from
Feb 16, 2024
Merged

add new component co2box #792

merged 19 commits into from
Feb 16, 2024

Conversation

etiennesky
Copy link
Contributor

Hi @treerink @klauswyser this pull request is to add cmorization of co2box model output. Since the data is quite small (about 142kb for one year), I could add some example files to test it.

@etiennesky
Copy link
Contributor Author

etiennesky commented Feb 1, 2024

Note that I also added the data request in the optimesm branch.

    "co2box": {
        "Amon": [
            "co2mass"
        ],
        "Emon": [
            "co2s"
        ],
        "day": [
            "co2s",
            "co2mass"
        ]
    }

the tm5 part needs to be removed because it clashes with co2box

I also need 2 non-standard CMIP6 variables which are co2s and co2mass in the day Table, whereas they are officially only defined in the Amon table. Here is the what I added to my local tables in CMIP6_day.json

        "co2mass": {
            "frequency": "day",
            "modeling_realm": "atmos",
            "standard_name": "atmosphere_mass_of_carbon_dioxide",
            "units": "kg",
            "cell_methods": "area: time: mean",
            "cell_measures": "",
            "long_name": "Total Atmospheric Mass of CO2",
            "comment": "Total atmospheric mass of Carbon Dioxide",
            "dimensions": "time",
            "out_name": "co2mass",
            "type": "real",
            "positive": "",
            "valid_min": "",
            "valid_max": "",
            "ok_min_mean_abs": "",
            "ok_max_mean_abs": ""
        },
       "co2s": {
            "frequency": "day",
            "modeling_realm": "atmos",
            "standard_name": "mole_fraction_of_carbon_dioxide_in_air",
            "units": "1e-06",
            "cell_methods": "time: mean",
            "cell_measures": "area: areacella",
            "long_name": "Atmosphere CO2",
            "comment": "As co2, but only at the surface",
            "dimensions": "longitude latitude time",
            "out_name": "co2s",
            "type": "real",
            "positive": "",
            "valid_min": "",
            "valid_max": "",
            "ok_min_mean_abs": "",
            "ok_max_mean_abs": ""
        },

@treerink
Copy link
Collaborator

treerink commented Feb 1, 2024

Hi Etienne, I see co2s twice as add to the CMIP6_day.json table, probably the second one should be co2mass. Could you post them one time more?

@etiennesky
Copy link
Contributor Author

Hi Etienne, I see co2s twice as add to the CMIP6_day.json table, probably the second one should be co2mass. Could you post them one time more?

fixed

@etiennesky
Copy link
Contributor Author

is there a place I can add test data? is that in the b2share folder?

also, do I update the json data request for optimesm with new co2box component?

@etiennesky
Copy link
Contributor Author

@treerink test data can be found on ECFS ec:/c3et/EC-EARTH/INPUT/ece2cmor3

@treerink
Copy link
Collaborator

treerink commented Feb 2, 2024

@treerink test data can be found on ECFS ec:/c3et/EC-EARTH/INPUT/ece2cmor3

Found it

@treerink
Copy link
Collaborator

treerink commented Feb 2, 2024

is there a place I can add test data? is that in the b2share folder?

I will have a look what is best

also, do I update the json data request for optimesm with new co2box component?

I will take over, but I need a bit of time to get all in the right order. I first will test whether I can immediately add this genecec part in the master without breaking anything, that would make the steps easier.

@treerink
Copy link
Collaborator

treerink commented Feb 2, 2024

@etiennesky any idea why the pytest fails for the co2box branch? I have not investigated yet.

@etiennesky
Copy link
Contributor Author

is there a place I can add test data? is that in the b2share folder?
I will have a look what is best

also, do I update the json data request for optimesm with new co2box component?
I will take over, but I need a bit of time to get all in the right order. I first will test whether I can immediately add this genecec part in the master without breaking anything, that would make the steps easier.

the "issue" is that co2s and co2mass cannot be defined for both tm5 and co2box in the json file. As we won't have tm5 running in this project it can be removed entirely IMHO

@etiennesky
Copy link
Contributor Author

@etiennesky any idea why the pytest fails for the co2box branch? I have not investigated yet.

I have no idea, it looks like a very basic problem unrelated to my changes ?

@treerink
Copy link
Collaborator

treerink commented Feb 2, 2024

Probably you saw that I added in 4aecbc0 in the co2box branch the small script to add the two non-cmor co2box variables in the CMOR day table.

@etiennesky
Copy link
Contributor Author

@etiennesky any idea why the pytest fails for the co2box branch? I have not investigated yet.

I have no idea, it looks like a very basic problem unrelated to my changes ?

ModuleNotFoundError: No module named 'cmor_utils'

maybe there is something in cmor_utils that break it ? The change there is just a new function...

@treerink
Copy link
Collaborator

treerink commented Feb 2, 2024

also, do I update the json data request for optimesm with new co2box component?
I will take over, but I need a bit of time to get all in the right order. I first will test whether I can immediately add this genecec part in the master without breaking anything, that would make the steps easier.

the "issue" is that co2s and co2mass cannot be defined for both tm5 and co2box in the json file. As we won't have tm5 running in this project it can be removed entirely IMHO

Well I actually think there will be no conflict because the add-variables-for-co2box.sh script add the co2box ones to the table and do thus not match with the only official available (potential TM5) table-var combinations:

Emon co2s
Amon co2mass

@etiennesky
Copy link
Contributor Author

Well I actually think there will be no conflict because the add-variables-for-co2box.sh script add the co2box ones to the table and do thus not match with the only official available (potential TM5) table-var combinations:

There is an issue because we also want official Emon/co2s and Amon/co2mass from the co2box model, not from TM5. You can see I added them to the optimesm data request json file.

@treerink
Copy link
Collaborator

treerink commented Feb 2, 2024

There is an issue because we also want official Emon/co2s and Amon/co2mass from the co2box model, not from TM5. You can see I added them to the optimesm data request json file.

Ah yes I see (I saved it locally before overwriting it). Ok clear, best is to organise this in the preference file. I will have a look, but first I want to solve the LPJG .ins part now.

treerink added a commit that referenced this pull request Feb 2, 2024
…om the optimesm request. This immediately protects conflicts with the co2box cmor variables: Amon co2mass & Emon co2s #782 #792.
@treerink
Copy link
Collaborator

treerink commented Feb 5, 2024

Ok 621c2df was a fix to enable to run genecec in the co2box branch, it also fixes the pytest locally and here at the github.

@treerink treerink mentioned this pull request Feb 8, 2024
@treerink treerink merged commit a8b96c0 into master Feb 16, 2024
1 check passed
@treerink treerink deleted the co2box branch February 16, 2024 11:13
@treerink
Copy link
Collaborator

#785 implemented and merged into the master.

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