Closed leighton-watson closed 1 year ago
There could also be an issue with line 239 travel_times.assign_attrs(UTM=grid.UTM)
. I haven't got to fdtd_travel_time
yet to see if this is an issue or not.
There could also be an issue with line 239
travel_times.assign_attrs(UTM=grid.UTM)
. I haven't got tofdtd_travel_time
yet to see if this is an issue or not.
Thanks Leighton. The line you mention here shouldn't be a problem; grid.UTM
is just a dictionary storing the UTM projection parameters, not actual coordinates.
Okay, without creating a new branch and implementing the change, here's my suggestion. Grab the UTM zone number from the dem
(this should be defined) like so:
zone_number = dem.UTM['zone']
This defines a single UTM zone which can be used for all UTM conversions. Then, in the utm.from_latlon()
call, add the kwarg force_zone_number=zone_number
.
@leighton-watson can you give this a shot and let me know if it works? Or let me know if you already tried this. My other concern is that the code in https://github.com/uafgeotools/rtm/blob/0d100ea142fa4200579a21da8169eaeec42b7b20/rtm/travel_time.py#L89 is collapsing coordinates outside the DEM region to the DEM edge, but I haven't thought that through enough yet.
My other concern is that the code in
is collapsing coordinates outside the DEM region to the DEM edge, but I haven't thought that through enough yet.
In thinking about this more, if the dem
and the stations are all sharing the same UTM zone, the above line should not be an issue... but I'm not able to try this out myself, so I'll let you update me.
Fantastic! That works and the station is now plotted at the correct location.
Okay, without creating a new branch and implementing the change, here's my suggestion. Grab the UTM zone number from the
dem
(this should be defined) like so:zone_number = dem.UTM['zone']
This defines a single UTM zone which can be used for all UTM conversions. Then, in the
utm.from_latlon()
call, add the kwargforce_zone_number=zone_number
.@leighton-watson can you give this a shot and let me know if it works?
There is a bug with prepare_fdtd_run (in travel_time.py at line 87). If stations are in different UTM zones then at least one station will be written in an incorrect position. I imagine this can be fixed by fixing the forcing the UTM zone, as noted in the comment at this line.