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

ERA5 Monthly average on Gadi #67

Closed
rbeucher opened this issue Jul 4, 2023 · 4 comments
Closed

ERA5 Monthly average on Gadi #67

rbeucher opened this issue Jul 4, 2023 · 4 comments
Assignees

Comments

@rbeucher
Copy link
Member

rbeucher commented Jul 4, 2023

On Gadi, ERA5 monthly data are stored as one file / month

|-- 2021
|   |-- tp_era5-land_moda_sfc_20210101-20210131.nc
|   |-- tp_era5-land_moda_sfc_20210201-20210228.nc
|   |-- tp_era5-land_moda_sfc_20210301-20210331.nc
|   |-- tp_era5-land_moda_sfc_20210401-20210430.nc
|   |-- tp_era5-land_moda_sfc_20210501-20210531.nc
|   |-- tp_era5-land_moda_sfc_20210601-20210630.nc
|   |-- tp_era5-land_moda_sfc_20210701-20210731.nc
|   |-- tp_era5-land_moda_sfc_20210801-20210831.nc
|   |-- tp_era5-land_moda_sfc_20210901-20210930.nc
|   |-- tp_era5-land_moda_sfc_20211001-20211031.nc
|   |-- tp_era5-land_moda_sfc_20211101-20211130.nc
|   `-- tp_era5-land_moda_sfc_20211201-20211231.nc
|-- 2022
|   |-- tp_era5-land_moda_sfc_20220101-20220131.nc
|   |-- tp_era5-land_moda_sfc_20220201-20220228.nc
|   |-- tp_era5-land_moda_sfc_20220301-20220331.nc
|   |-- tp_era5-land_moda_sfc_20220401-20220430.nc
|   |-- tp_era5-land_moda_sfc_20220501-20220531.nc
|   |-- tp_era5-land_moda_sfc_20220601-20220630.nc
|   |-- tp_era5-land_moda_sfc_20220701-20220731.nc
|   |-- tp_era5-land_moda_sfc_20220801-20220831.nc
|   |-- tp_era5-land_moda_sfc_20220901-20220930.nc
|   |-- tp_era5-land_moda_sfc_20221001-20221031.nc
|   |-- tp_era5-land_moda_sfc_20221101-20221130.nc
|   `-- tp_era5-land_moda_sfc_20221201-20221231.nc

While ESMValTool recipe usually expect one file / one year (with the 12 months averages)

@rbeucher
Copy link
Member Author

rbeucher commented Jul 4, 2023

Is there a way to concatenate those files?
Should we download averages from CDS?

@rbeucher
Copy link
Member Author

rbeucher commented Jul 4, 2023

Those are the recipes affected:

#66, #68

@rbeucher
Copy link
Member Author

@rbeucher
Copy link
Member Author

Data can be concatenated offline with little effort.

#!/bin/python

import iris
from iris.util import equalise_attributes

var = "2t"

for year in range(1959, 2023):
    print(f"Doing year {year} for variable {var}")
    cubes = iris.load(f"*_{year}*")
    equalise_attributes(cubes)
    cube = cubes.concatenate()
    iris.save(cube, f"{var}_era5_moda_sfc_{year}_monthly.nc")

Now I don't know if it is viable long term

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

No branches or pull requests

1 participant