GACOS correction for HyP3+MintPy results

154 views
Skip to first unread message

Sayyed Mohammad Javad Mirzadeh

unread,
Jan 22, 2023, 9:22:37 AM1/22/23
to MintPy
Hi all,

I recently tried applying the GACOS tropospheric correction when I used the HyP3 outputs for the MintPy job, but I faced an error in the "tropospheric_correction" step.
Could anybody please let me know if you could successfully use the GACOS with the "HyP3+MintPy"?

Sincerely,
Sayyed

Eric Fielding

unread,
Jan 22, 2023, 8:46:20 PM1/22/23
to MintPy
Hi Sayyed,

I believe that the GACOS results are always in the geographic (lat-long) projection, so you either need to project your HyP3 products from UTM to geographic or project the GACOS from geographic to UTM before you can use the corrections.

++Eric

Sayyed Mohammad Javad Mirzadeh

unread,
Jan 23, 2023, 1:12:15 AM1/23/23
to MintPy
Hi Eric,

Thanks for your point.
I Edited the "cutGeotiffs.py" from the hyp3-lib to crop and reproject all Geotiff files to the geographic coordinate system (WGS84). Then, I used them to run the MintPy and apply the tropospheric correction using the ERA5 (PyAPS). It works successfully, but when I try to do the same with the GACOS option, I get an error. I will make sure to update you here on the error I got.

Sincerely,
Sayyed



Sayyed Mohammad Javad Mirzadeh

unread,
Feb 2, 2023, 9:43:09 AM2/2/23
to MintPy
Hi all,

Fortunately, I fixed this issue by converting the HyP3 products from UTM to WGS84 and then ran the MintPy to have the tropospheric corrected results.

Sincerely,
Sayyed



Asmit Roy Burman

unread,
Mar 4, 2024, 1:08:11 AMMar 4
to MintPy
Hey Sayyed,

I am trying to use GACOS for tropospheric correction step, I am not able to import the GACOS data I assume I have to do some reprojection with the Hyp3 products or something. Can you please help me do it?

Sincerely 
Asmit

Sayyed Mohammad Javad Mirzadeh

unread,
Mar 4, 2024, 1:17:53 AMMar 4
to MintPy
Hi Asmit,

Did you try to use the MintPy with the HyP3 products in the UTM coordinates system?
I already tried to apply GACOS in the HyP3 case when I converted them to the WGS84 coordinate system before the MintPy job.

Sincerely,
Sayyed



Asmit Roy Burman

unread,
Mar 4, 2024, 1:26:41 AMMar 4
to MintPy
Yes I am trying to apply GACOS in UTM hyp3 products, the products are just cropped and I use the same coordinates to generate the GACOS files. 
I am getting the following error

MintPy version 1.5.3, date 2023-11-23 --RUN-at-2024-03-04 06:23:35.061154-- Current directory: /home/jovyan/Kolkata/Asc Run routine processing with smallbaselineApp.py on steps: ['correct_troposphere'] Remaining steps: ['deramp', 'correct_topography', 'residual_RMS', 'reference_date', 'velocity', 'geocode', 'google_earth', 'hdfeos5'] -------------------------------------------------- Project name: Kolkata Go to work directory: /home/jovyan/Kolkata/Asc/output read custom template file: /home/jovyan/Kolkata/Asc/output/Kolkata.txt update default template based on input custom template No new option value found, skip updating /home/jovyan/Kolkata/Asc/output/smallbaselineApp.cfg read default template file: /home/jovyan/Kolkata/Asc/output/smallbaselineApp.cfg ******************** step - correct_troposphere ******************** Input data seems to be geocoded. Lookup file not needed. tropospheric delay correction with gacos approach tropo_gacos.py -f /home/jovyan/Kolkata/Asc/output/timeseries_SET.h5 -g /home/jovyan/Kolkata/Asc/output/inputs/geometryGeo.h5 -o /home/jovyan/Kolkata/Asc/output/timeseries_SET_GACOS.h5 --dir /home/jovyan/Kolkata/Asc/output/GACOS Use GACOS products at directory: /home/jovyan/Kolkata/Asc/output/GACOS update mode: ON output file: /home/jovyan/Kolkata/Asc/output/inputs/GACOS.h5 1) output file either do NOT exist or is NOT newer than all ZTD files. run or skip: run -------------------------------------------------- create HDF5 file: /home/jovyan/Kolkata/Asc/output/inputs/GACOS.h5 with w mode create dataset : date of |S8 in size of (178,) with compression = None create dataset : timeseries of <class 'numpy.float32'> in size of (178, 2519, 1233) with compression = None close HDF5 file: /home/jovyan/Kolkata/Asc/output/inputs/GACOS.h5 read incidenceAngle from file: /home/jovyan/Kolkata/Asc/output/inputs/geometryGeo.h5 /home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/skimage/transform/_warps.py:184: RuntimeWarning: divide by zero encountered in double_scalars zoom_factors = [1 / f for f in factors] /home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/scipy/ndimage/_interpolation.py:772: RuntimeWarning: invalid value encountered in double_scalars [int(round(ii * jj)) for ii, jj in zip(input.shape, zoom)]) Traceback (most recent call last): File "/home/jovyan/.local/envs/osl_mintpy/bin/smallbaselineApp.py", line 10, in <module> sys.exit(main()) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/cli/smallbaselineApp.py", line 208, in main run_smallbaselineApp(inps) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 1117, in run_smallbaselineApp app.run(steps=inps.runSteps) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 898, in run self.run_tropospheric_delay_correction(sname) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/smallbaselineApp.py", line 626, in run_tropospheric_delay_correction mintpy.cli.tropo_gacos.main(iargs) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/cli/tropo_gacos.py", line 114, in main run_tropo_gacos(inps) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/tropo_gacos.py", line 251, in run_tropo_gacos calculate_delay_timeseries( File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/tropo_gacos.py", line 226, in calculate_delay_timeseries delay = get_delay_geo(ztd_file, atr, cos_inc_angle) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/mintpy/tropo_gacos.py", line 43, in get_delay_geo delay = resize( File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/skimage/transform/_warps.py", line 185, in resize out = ndi.zoom(filtered, zoom_factors, order=order, mode=ndi_mode, File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/scipy/ndimage/_interpolation.py", line 772, in zoom [int(round(ii * jj)) for ii, jj in zip(input.shape, zoom)]) File "/home/jovyan/.local/envs/osl_mintpy/lib/python3.9/site-packages/scipy/ndimage/_interpolation.py", line 772, in <listcomp> [int(round(ii * jj)) for ii, jj in zip(input.shape, zoom)]) ValueError: cannot convert float NaN to integer

Sayyed Mohammad Javad Mirzadeh

unread,
Mar 4, 2024, 3:23:12 AMMar 4
to MintPy
Please save the error in a txt file with the correct format which we can read them easily!

Asmit Roy Burman

unread,
Mar 4, 2024, 3:57:20 AMMar 4
to MintPy
Sorry for the inconvenience, the error log is attached herewith
tropo_error.txt
Reply all
Reply to author
Forward
0 new messages