eurec4a / eurec4a-intake

Intake catalogue for EUREC4A field campaign datasets
17 stars 19 forks source link

add setup for EUREC4A-MIP #135

Closed observingClouds closed 9 months ago

observingClouds commented 1 year ago

This PR eventually allows to load the boundary conditions for the EUREC4A-MIP experiments.

To load the hourly netCDF files into one dataset, the following steps can be done:

import xarray as xr
from intake import open_catalog
from pandas import date_range

dates_of_interest = date_range('2020-01-01','2020-02-01', freq='1H')

cat = open_catalog("catalog.yml")
bc_cat = cat.simulations.EUREC4A_MIP.control.setup.boundary_conditions  # control
#bc_cat = cat.simulations.EUREC4A_MIP.warming.setup.boundary_conditions  # warming experiment
ds = xr.concat([bc_cat(date=d).to_dask() for d in dates_of_interest], dim='time')
ds.to_netcdf("EUREC4A-MIP_boundaryConditions.nc")

This code (or something equivalent) should probably make it into the howto.eurec4a book.

To-Do: