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

return delay files in geo coords if geocoded aoi #408

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

bbuzz31
Copy link
Collaborator

@bbuzz31 bbuzz31 commented Nov 23, 2022

If a user passes in a geocoded file for the AOI, the resulting wet/hydro delays will be written in those coords

Note that the proj input argument is not currently supported and should be removed until it's implemented (which may take some doing)

@bbuzz31 bbuzz31 requested a review from jlmaurer November 23, 2022 18:01
@bbuzz31
Copy link
Collaborator Author

bbuzz31 commented Nov 23, 2022

addresses #403. note that outputs will still be saved in WGS84

@bbuzz31 bbuzz31 marked this pull request as draft November 23, 2022 19:07
@bbuzz31
Copy link
Collaborator Author

bbuzz31 commented Nov 23, 2022

This needs to be more carefully vetted before merging as it may have unintended consequences

@dbekaert
Copy link
Owner

dbekaert commented Nov 23, 2022 via email

@@ -72,7 +72,7 @@ def get_heights(args, out, station_file, bounding_box=None):
elif os.path.exists(args.dem):
out['dem'] = args['dem']
if bounding_box is not None:
dem_bounds = rio_extents(rio_profile(args.dem))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a try/except here so either will work? Or is it always [0]?

@@ -118,7 +118,7 @@ def tropo_delay(dt, wetFilename, hydroFilename, args):

###########################################################
# Load the downloaded model file for CRS information
wm_proj = rio_profile(f"netcdf:{weather_model_file}:t")["crs"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here as above, and below as well.

@@ -120,7 +123,13 @@ def rio_profile(fname):
f"{fname} does not contain geotransform information"
)

return profile
elif profile['crs'].to_epsg() != 4326:
fname_wgs84 = rio_reproject_geocoded(fname)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the part that wasn't working to correctly reproject the outputs?

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.

3 participants