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 HALO flight circle dataset decomposition #34

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

leifdenby
Copy link
Collaborator

Adding functionality to enable selection of points inside and outside of HALO flight circle

eurec4a_environment.decomposition.space.inside_HALO_flight_circle(ds=ds)

TODO

  • functionality to work out it if point is inside or outside flight circle
  • creation of data array with True/False depending whether inside or ourside

@leifdenby
Copy link
Collaborator Author

I just need to fix the testing and requirements now. But with

import eurec4a_environment.source_data as source_data
import eurec4a_environment.decomposition.space as space_decomposition

cat = source_data.get_intake_catalog()
ds_rs = cat.radiosondes.meteor.to_dask()

# make a mean lat,lon position for each radiosonde
ds_rs_mean = ds_rs.mean(dim="alt")
ds_rs_mean['lat'] = ds_rs.lat.mean(dim="alt", keep_attrs=True)
ds_rs_mean['lon'] = ds_rs.lon.mean(dim="alt", keep_attrs=True)
ds_rs['inside_circle'] = space_decomposition.inside_halo_circle(ds=ds_rs_mean)

ds_rs_daily_mean = (ds_rs
                        .where(ds_rs.inside_circle, drop=True)
                        .swap_dims(dict(sounding="launch_time"))
                        .resample(launch_time="1D").mean()
                   )
ds_rs_daily_mean.sel(alt=slice(0, 5000)).q.plot(y="alt", size=3, aspect=4.)

I can now produce

halo-decomp-example

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.

1 participant