Closed vbrancat closed 2 months ago
Hi @vbrancat
RAiDER expects the AOI object to have a grid (xpts and ypts) of target locations set prior to the call to tropo_delay
Our workflow sets this in the add_buffer
method of the AOI
class, which is needed for delay calculations on a slant.
So you could do this:
from RAiDER.models.hres import HRES
wm = HRES()
res = wm.getLLRes() # get the lat/lon spacing of HRES
aoi.add_buffer(res)
Since you're just calculating along Zenith, you don't actually need the buffer.
To set up the output grid you need to give the AOI
object xy/spacing:
## set evenly spaced output grid in degrees lat/lon
aoi.set_output_spacing(ll_res=0.1)
aoi.set_output_xygrid()
Alternatively, you could set the output grid spacing in meters, which is internally converted to lat/lon spacing by approximating 100 km / degº
aoi._cube_spacing_m = 10000
aoi.set_output_spacing()
aoi.set_output_xygrid()
@bbuzz31 Thank you for the explanation. What I am trying to do is compute the hydrostatic and wet troposphere delay on a pre-defined lat/lon grid. The coordinates of the grid corresponds to slant range and azimuth times location of a coarse radar grid. Is there a way of doing this i.e., assign to the object a pre-defined lat/lon grid? If yes, how? :)
Fixed by #627
Describe the bug The RasterRDR class derived from the class AOI does not have members called
xpts
andypts
. However, thetropo_delay.py
functions assumes that these members are available when computing the troposphere delay. Thetropo_delay.py
function fails with the following error:To Reproduce With RAiDER installed from source (main branch), run the following lines in Python
from RAiDER.delay import tropo_delay from RAiDER.llreader import RasterRDR from RAiDER.losreader import Zenith
Instantiate an "aoi" object to read lat/lon/height files
aoi = RasterRDR(rdr2geo_raster_paths[1], rdr2geo_raster_paths[0], rdr2geo_raster_paths[2])
los = Zenith()
Compute the troposphere delay along the Zenith
zen_wet, zen_dry = tropo_delay(burst.sensing_start, weather_model_path, aoi, los)
Expected behavior A clear and concise description of what you expected to happen.
Additional context The resolution of this issue is time sensitive as it requires changes in the code of the downstream modules using RAiDER. Please, provide an estimate on when this issue will be solved or alternative solutions to avoid it.