adcirc / gahm

Generalized Asymmetric Holland Model Implementation
GNU General Public License v3.0
5 stars 3 forks source link

Gahm Python Compatibility with NHC Repository of ATCF Files #11

Open jduckerOWP opened 2 weeks ago

jduckerOWP commented 2 weeks ago

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!

zcobell commented 2 weeks ago

Hi @jduckerOWP - we are currently in the process of reformulating things as the version in the main branch was never quite right on the solution side. That work is ongoing but we expect its completion will be measured in the range of a month or so before we have a good version out there.

My suspicion is that the older storms might fall down in the older version of the code because they did not account for what to do when there are fewer/no isotach radii available, which is exactly what we are in the final stages of solving now in the latest iteration.

We will be excited to share the latest numerically consistent version with the community soon and will include this storm as a sample test. Thank you!

jduckerOWP commented 2 weeks ago

@zcobell thank you very much for your prompt response to my issue that I raised with the latest Gahm code. Just to quickly follow up here with the latest development stage of Gahm, but will the final stages of development essentially still allow Gahm to derive some vortex structure with simply just the best track coordinates and the maximum wind speed estimates from ATCF files in theory that date back to 1851 (examples in here https://ftp.nhc.noaa.gov/atcf/archive/1851/)? If so, that would be a huge game changer with deriving some coastal surge modeling with an extended climatology of storms in the ATCF database. However, I'm not sure what the "minimum" required information Gahm will need in the ACTF files and that's what I am just curious about with the last follow up question here. I appreciate your expertise and insight into this topic and I am really looking forward to the latest Gahm release in the coming month or so!

rluettich commented 2 weeks ago

Although we’ve not done this yet, the new GAHM framework makes it straightforward to build in established empirical relationships that can fill in critical parameters that are missing fin early track files.

RL

From: Jason Ducker @.> Sent: Thursday, August 29, 2024 2:01 PM To: adcirc/gahm @.> Cc: Subscribed @.***> Subject: Re: [adcirc/gahm] Gahm Python Compatibility with NHC Repository of ATCF Files (Issue #11)

@zcobellhttps://github.com/zcobell thank you very much for your prompt response to my issue that I raised with the latest Gahm code. Just to quickly follow up here with the latest development stage of Gahm, but will the final stages of development essentially still allow Gahm to derive some vortex structure with simply just the best track coordinates and the maximum wind speed estimates from ATCF files in theory that date back to 1851 (examples in here https://ftp.nhc.noaa.gov/atcf/archive/1851/)? If so, that would be a huge game changer with deriving some coastal surge modeling with an extended climatology of storms in the ATCF database. However, I'm not sure what the "minimum" required information Gahm will need in the ACTF files and that's what I am just curious about with the last follow up question here. I appreciate your expertise and insight into this topic and I am really looking forward to the latest Gahm release in the coming month or so!

— Reply to this email directly, view it on GitHubhttps://github.com/adcirc/gahm/issues/11#issuecomment-2318514985, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AB3636S7CPC4F3U5KPANGK3ZT5OU3AVCNFSM6AAAAABNIMRUSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYGUYTIOJYGU. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>