ngachung commented on a change in pull request #126: URL: https://github.com/apache/incubator-sdap-nexus/pull/126#discussion_r609992630
########## File path: analysis/webservice/algorithms_spark/Matchup.py ########## @@ -356,11 +356,11 @@ def from_nexus_point(nexus_point, tile=None, parameter='sst'): point.data_id = "%s[%s]" % (tile.tile_id, nexus_point.index) # TODO Not an ideal solution; but it works for now. - if parameter == 'sst': + if parameter == 'sst' or parameter == None: point.sst = nexus_point.data_val.item() - elif parameter == 'sss': + if parameter == 'sss' or parameter == None: point.sss = nexus_point.data_val.item() - elif parameter == 'wind': + if parameter == 'wind' or parameter == None: point.wind_u = nexus_point.data_val.item() Review comment: @skorper I don't think this change as is does what we need it to do. Taking a closer look at this, this algorithm makes the assumption that when invoking the API the user knows that the satellite dataset chosen stores either sst, sss, or wind variable. So with this change what happens is if user chooses a wind dataset such as ASCAT but doesn't restrict the parameter then all returned variables will have the same value. The sample output you provided illustrates this issue: ``` "sea_water_temperature": 276.22998046875, "sea_water_temperature_depth": 0, "sea_water_salinity": 276.22998046875, "sea_water_salinity_depth": null, "wind_speed": null, "wind_direction": null, "wind_u": 276.22998046875, "wind_v": null, "platform": "orbiting satellite", "device": "radiometers", "x": "-62.875", "y": "75.125", "point": "Point(-62.875 75.125)", "time": 1442102400, "fileurl": "20150913120000-NCEI-L4_GHRSST-SSTblend-AVHRR_OI-GLOB-v02.0-fv02.0.nc", ``` Note that the value 276.22998046875 is sst and not wind, sss. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org