icenet-ai / icenet-event-processor

IceNet event processing engine
MIT License
0 stars 0 forks source link

Segfault in output_forecast #11

Open JimCircadian opened 1 year ago

JimCircadian commented 1 year ago
>>> output_forecast(ds, {}, output_directory="/tmp")
Segmentation fault (core dumped)

Container error needs investigation

JimCircadian commented 1 year ago

get_coastlines is causing the issue, will need deeper investigation but for the moment we'll just go with turning them off


[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xarray as xr
>>> ds = xr.open_dataset("/data/north_daily_forecast.2023-08-09.nc").isel(time=0)
Warning: ecCodes 2.21.0 or higher is recommended. You are running version 2.20.0
>>> from icenet.plotting.utils import (
...     show_img,
...     get_plot_axes,
... )
>>> import pandas as pd
>>> pred_da = ds.sel(leadtime=1).sic_mean
>>> leadtime=1
>>> import datetime as dt
>>> plot_date = pd.to_datetime(pred_da.time.values) + dt.timedelta(int(leadtime))
>>> output_directory = "/tmp"
>>> import os
>>> output_filename = os.path.join(output_directory, "{}.png".format(
...             plot_date.strftime("%Y%m%d"),
...         ))
>>> ax = get_plot_axes(do_coastlines=True)
Segmentation fault (core dumped)
root@8616db754e3f:~/site/wwwroot# python
Python 3.8.17 (default, Jun  6 2023, 23:46:08) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from icenet.plotting.utils import (
...     show_img,
...     get_plot_axes,
... )
>>> ax = get_plot_axes(do_coastlines=False)
>>> ...