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

[BUG] found 3 issues #333

Open
espiritocz opened this issue Feb 16, 2022 · 1 comment
Open

[BUG] found 3 issues #333

espiritocz opened this issue Feb 16, 2022 · 1 comment
Assignees
Labels
beta release bug Something isn't working

Comments

@espiritocz
Copy link

hi, i got to some issues, hope those notes will help improve the development of RAiDER:

Issue 1: RAiDER expects non-existing function of dem_stitcher:

in dem.py:
from dem_stitcher.stitcher import download_dem as download_stitched_dem
there is no such function in currently available dem_stitcher (installed from conda-forge, but should equal github repository codes)

Issue 2: some bug in use of 'statevectors'

having S1 EOF file and a station list with heights (i.e. csv with Lat,Lon,Hgt_m columns), the following command:

raiderDelay.py --date 20211210 --time 17:00:00 --model ERA5 --statevectors ../S1A_OPER_AUX_POEORB_OPOD_20211230T121611_V20211209T225942_20211211T005942.EOF --station_file raider_station.list

ends up in errors:

2022-02-16 15:51:29,209 DEBUG Beginning DEM calculation
2022-02-16 15:51:29,233 DEBUG DEM height range for the queried region is 10.00-10.00 m
2022-02-16 15:51:29,234 DEBUG Lats shape is (1,)
2022-02-16 15:51:29,234 DEBUG lat/lon box is -20.544445/-20.544445/-175.390417/-175.390417 (SNWE)
2022-02-16 15:51:29,234 DEBUG Beginning line-of-sight calculation
Traceback (most recent call last):
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/lib/python3.8/site-packages/RAiDER/losreader.py", line 148, in getLookVectors
    svs = np.stack(get_sv(los_type, time, pad), axis=-1)
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/lib/python3.8/site-packages/RAiDER/losreader.py", line 213, in get_sv
    svs = read_txt_file(los_file)
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/lib/python3.8/site-packages/RAiDER/losreader.py", line 395, in read_txt_file
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'sv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/bin/raiderDelay.py", line 12, in <module>
    parseCMD()
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/lib/python3.8/site-packages/RAiDER/runProgram.py", line 198, in parseCMD
    _tropo_delay(new_args)
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/lib/python3.8/site-packages/RAiDER/runProgram.py", line 210, in _tropo_delay
    (_, _) = tropo_delay(args_copy)
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/lib/python3.8/site-packages/RAiDER/delay.py", line 165, in tropo_delay
    los, lengths = getLookVectors(los, lats, lons, hgts, zref=zref, time=time)
  File "/gws/smf/j04/nceo_geohazards/software/mambalics/lib/python3.8/site-packages/RAiDER/losreader.py", line 164, in getLookVectors
    'getLookVectors: I cannot parse the file {}'.format(look_vecs)
UnboundLocalError: local variable 'look_vecs' referenced before assignment

Issue 3: the request for weather models must be improved, especially in case of CDSAPI:

ok, that's not really a 'bug', but i think you may want to improve things, i.e.
first of all, it now contains the HRES, while ecmwf_api is sometimes less preferred source (as in my case).
second,
the requests should be done using whole set of requested epochs, not one-by-one, as the waiting time can be e.g. 1 request processed in hours (!)

basically, for cdsapi, one may just include parameter 'date' instead of the 'months, years,....', so this can be enough:

params = {
            "product_type": dataset_name,
            "{}".format(levType): 'all',
            "levtype": "pl", 
            "param": var,
            "stream": "oper",
            "type": "an",
            "step": "0",
            "area": nwse,
            "format": "netcdf"}
params['date'] = list(dates.strftime('%Y-%m-%d %H:%M')) \
        if isinstance(dates, pd.core.indexes.datetimes.DatetimeIndex) \
        else list(dates)

i also recommend disabling warnings using:

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

(after import urllib3 )

OS Linux CentOS 7

@jlmaurer
Copy link
Collaborator

jlmaurer commented May 2, 2022

Hi @espiritocz thanks for these comments! We are working on them; #339 should fix issue 1, #332 should fix issue 2. issue 3 is one we haven't addressed yet, so thanks for the suggestion! Hopefully these will get integrated soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants