Skip to content

Gahm Python Compatibility with NHC Repository of ATCF Files #11

Description

@jduckerOWP

The development stages for the Gahm Python interface has been very exciting for the community and I have begun to get myself affiliated with the Python tools. I've been looking into the NHC ATCF database and I was trying to see if I could construct Gahm vortexes for earlier named storm scenarios in 1983 (https://ftp.nhc.noaa.gov/atcf/archive/1983/). Specifically, I was trying to use the ATCF file called "aal031983.new" within the link provided and I am running into a segmentation fault issue highlighted below after the following Python code:

from datetime import timedelta
from datetime import datetime
import numpy as np
from pygahm import pygahm
import xarray as xr

wind_grid = pygahm.Grid.fromCorners(-100.0, 20.0, -80.0, 30.0, 0.1, 0.1)
x_points = np.array(wind_grid.x_grid())
y_points = np.array(wind_grid.y_grid())
atcf_track = pygahm.AtcfIO('aal031983.new')
sln = atcf_track.read()
start_date = datetime(1983,8,15,0)
end_date = datetime(1983,8,21,0)
dates = np.arange(start_date, end_date, timedelta(hours=1)).astype(datetime)
time = dates[20]
time_c = pygahm.Datetime(time.year, time.month, time.day, time.hour)
solution = pygahm.get_points(sln, time_c, wind_grid.points())

Fatal Python error: Segmentation fault

Main thread:
Current thread 0x00000001ea020f40 (most recent call first):
  File "/opt/anaconda3/lib/python3.11/site-packages/pygahm-0.0.1-py3.11-macosx-11.1-arm64.egg/pygahm/pygahm.py", line 1082 in get_points

I was able to reproduce the Katrina example in the GitHub repository on my Python environment just fine, so my suspicion here is that there is a compatibility issue here potentially with the contents inside the ATCF file? Or is there something else in my Python workflow that I need to change up to make ATCF files for older storms possibly work properly? Any help here would be greatly appreciated!

@zcobell I'm curious on your thoughts with this issue as well here if you have any input. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions