Given that the user provides coordinates far out of bounds to the TimeSeries constructor,
When calling TimeSeries.import_data, the function get_near_coord locates the nearest relevant grid cells,
Then the user provided coordinates are still kept in TimeSeries.lat, TimeSeries.lot and TimeSeries.datafile
And the real data coordinates are not available as variables in the code
In my application, I want to plot graphs of the extracted data, and use the real coordinates in the graph title.
So the question is, should lat and lon be updated when they are modified; or can the used coordinates be returned to the user in another way? This is further complicated in the case of NORA3_wind_wave, where different coordinates may be used for wind and wave variables.
Example output, with user provided coordinate inland in South America:
Directory cache already exists
https://thredds.met.no/thredds/dodsC/nora3_subset_wave/wave_tser/202001_NORA3wave_sub_time_unlimited.nc
Find nearest point to lon.=-60.33449193071423,lat.=-25.414569791975136
Found nearest: lon.=-13.033509,lat.=54.479645
Directory cache already exists
https://thredds.met.no/thredds/dodsC/nora3_subset_atmos/wind_hourly/arome3kmwind_1hr_202001.nc
Find nearest point to lon.=-60.33449193071423,lat.=-25.414569791975136
Found nearest: lon.=-30.167999887837368,lat.=54.2909997971533
Data saved at: NORA3_wind_wave_lon-60.33449193071423_lat-25.414569791975136_20200101_20200131.csv
Hi,
Thanks for mentioning this, it is fixed in version 1.1.5. In case the requested point is out of the model domain (> 50 km), it raises a ValueError.
Given that the user provides coordinates far out of bounds to the
TimeSeries
constructor, When callingTimeSeries.import_data
, the functionget_near_coord
locates the nearest relevant grid cells, Then the user provided coordinates are still kept in TimeSeries.lat, TimeSeries.lot and TimeSeries.datafile And the real data coordinates are not available as variables in the codeIn my application, I want to plot graphs of the extracted data, and use the real coordinates in the graph title.
So the question is, should lat and lon be updated when they are modified; or can the used coordinates be returned to the user in another way? This is further complicated in the case of
NORA3_wind_wave
, where different coordinates may be used for wind and wave variables.Example output, with user provided coordinate inland in South America:
Using metocean-api 1.1.0.