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

Patch Centroid lon / lat #39

Open
charlie-becker opened this issue Feb 28, 2022 · 0 comments
Open

Patch Centroid lon / lat #39

charlie-becker opened this issue Feb 28, 2022 · 0 comments

Comments

@charlie-becker
Copy link
Collaborator

The centroid lon / lat data in the netCDF patch data represents the the longitude / latitude values at the center of the patch, not the center of the object, and thus there are mis-matches between centroid lon / lat in the CSV files and netCDF files for the same storm objects.

hagelslag/bin/hsdata

Lines 642 to 645 in 57d1051

for c_var in ["lon", "lat"]:
out_file.variables["centroid_" + c_var][:] = np.concatenate([np.array(f_track.attributes[c_var])[:,
patch_radius, patch_radius]
for f_track in forecast_tracks])

Is there any reason to keep the patch-center derived lons / lats? If not, the values could be replaced using the same process to generate the centroids for the CSV file.

hagelslag/bin/hsdata

Lines 454 to 455 in 57d1051

centroid_x, centroid_y = forecast_track.center_of_mass(step)
centroid_lon, centroid_lat = proj(centroid_x, centroid_y, inverse=True)

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

No branches or pull requests

1 participant