eurec4a / eurec4a-intake

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

add DALES simulations botany_dx100m_nx96 #140

Closed fjansson closed 1 year ago

fjansson commented 1 year ago

similar to the previous botany_dx_100m_nx1536, except:

Test script, to access the new datasets (loading catalog from my fork of the eurec4a-intake catalog):

import matplotlib.pyplot as plt
import pandas as pd
from intake import open_catalog

url ="https://raw.githubusercontent.com/fjansson/eurec4a-intake/botany-96/Simulations/DALES/botany.yaml"
cat = open_catalog(url)

parameters = cat.dx100m.nx96.parameters.read()
varied_parameters = ['member','thls', 'u0', 'qt0', 'qt_lambda', 'thl_Gamma', 'wpamp', 'dudz', 'location']
df_parameters = pd.DataFrame.from_records(parameters)[varied_parameters]
print(df_parameters)

ds_2D = cat.dx100m.nx96['2D'].to_dask()
print(ds_2D)

ds_3D = cat.dx100m.nx96['3D'].to_dask()
print(ds_3D)

ds_radiation = cat.dx100m.nx96['radiation'].to_dask()
print(ds_radiation)

ds_cross_xy = cat.dx100m.nx96['cross_xy'].to_dask()
print(ds_cross_xy)

ds_profiles = cat.dx100m.nx96['profiles'].to_dask()
print(ds_profiles)

ds_timeseries = cat.dx100m.nx96['timeseries'].to_dask()
print(ds_timeseries)

# plot a 2D field
ds_2D.sel(member=10).isel(time=400).twp.plot()

# plot same field from the larger botany simulation
plt.figure()
ds_2D_large = cat.dx100m.nx1536['2D'].to_dask()
ds_2D_large.sel(member=10).isel(time=400).twp.plot()
plt.show()
fjansson commented 1 year ago

Thanks for the comments!

I amended the commit:

fjansson commented 1 year ago

Thanks! Access to the small dataset now works through the eurec4a module, like the larger one. We'll add something to the book too.