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

Downloading MODIS using aps_modis(0,0) #9

Open
tonianr opened this issue Jan 12, 2022 · 3 comments
Open

Downloading MODIS using aps_modis(0,0) #9

tonianr opened this issue Jan 12, 2022 · 3 comments

Comments

@tonianr
Copy link

tonianr commented Jan 12, 2022

I'm attempting to download the necessary MODIS data for my survey area using the function aps_modis(0,0) however the files won't download.

I downloaded and sourced the path to the get_modis.py file from: https://github.com/jgomezdans/get_modis

But it seems to have different parameters compared to those specified in the TRAIN script: aps_modis_Python.m

Any pointers on how to move forward will be helpful!

@tonianr
Copy link
Author

tonianr commented Jan 24, 2022

Ended up downloading the HDF files manually from lads: https://ladsweb.modaps.eosdis.nasa.gov

and used gdal to convert them to grd:
! gdalwarp -overwrite HDF4_EOS:EOS_SWATH:"MOD05_L2.A2015072.1545.061.2017320023931.hdf":mod05:Water_Vapor_Near_Infrared -of netCDF MODIS_20150313.nc
! gdal_translate MODIS_20150313.nc -of GMT OSCAR_Modis_20150313.grd

Plotting all converted files to view and they had data.
image

But for aps_mods(3,3) I keep getting this error:
Index in position 2 exceeds array bounds (must not exceed 2).
Error in aps_modis_InSAR (line 211)
d_modis_no_interp(:,k) = xyz_output_nointerp(:,3)
Error in aps_modis (line 116)
aps_modis_InSAR

Any help would be appreciated!

@tonianr
Copy link
Author

tonianr commented Jan 26, 2022

I reran all the aps_modis steps while going through the MatLab scripts.

Here's what I found:

after running step aps_modis(2,2) the *_ZWD_gauss.xyz, *_ZWD_nointrep.xyz, and *_ZWD_surf.xyz were empty (0 bytes)

  • solution(1): make sure GMT is added to PATH or download it and to PATH
  • solution(2): edit the Calculate wet delay section of the aps_modis_SAR.m file, the GMT syntax has changed. therefore the command strings in the script should start with '! GMT' i.e. instead of 'grdfilter' its '! gmt grdfilter' , there are about 9 commands to be updated. I also added '-echo' to my MatLab system function e.g. [a,b]=system(grdfil1_cmd, '-echo') to get GMT outputs to the terminal

My xyz files are no longer empty.
I however do get this warning from GMT:
Calculating wet delay... Warning: 'No data' fill value set to -32768
surface [WARNING]: Your grid dimensions are mutually prime. Convergence is very unlikely.
surface [WARNING]: 4213 unusable points were supplied; these will be ignored.
surface [WARNING]: You should have pre-processed the data with block-mean, -median, or -mode.
surface [WARNING]: Check that previous processing steps write results with enough decimals.
surface [WARNING]: Possibly some data were half-way between nodes and subject to IEEE 754 rounding.

@ShadiAbdelhadi
Copy link

Apologies I can't answer your question but this the reply I got when inquiring about the get_modis.py
https://forum.earthdata.nasa.gov/viewtopic.php?p=13342#p13342
So Far I cannot configure the APS_CONFIG.sh to make TRAIN function properly during StaMPS processing so Hopefully I can use GACOS ztd maps for the tropospheric phase removal

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

2 participants