ropensci / rerddap

R client for working with ERDDAP servers
https://docs.ropensci.org/rerddap
Other
40 stars 14 forks source link

Crosswalk for non-standard variable names #34

Closed sckott closed 1 year ago

sckott commented 9 years ago

from @rmendels

As for not knowing coordinate names, I can look at the names passed by a user, I can look at the names in the ERDDAP server, but matching them up could be problematic. For example, ERDDAP good practice is to use “longitude” “latitude”, “time” etc, but someone could have “lon”,”lat”,”time_series”, and the question is do I just bomb the user out or what. Also “altitude” can be things like “sigma depths”. More design decisions that anything.

sckott commented 6 years ago

@rmendels i'm not sure I remember what we had in mind here. sorry, I should have taken better notes.

rmendels commented 6 years ago

Hi Scott:

I believe the issue here is if before you melt you are going to test if the data are on a lat-lon grid, that means testing the coordinate (dimension) names. Good practice in ERDDAP is to call the dimensions by latitude and longitude (if that is what they are), but people could call them "lat" , "lon" in how they set up their server, or other such names. So it is a design decision if you just test for (latitude , longitude) , or test for that plus say (lat, lon), or whatever other combination of names you want.

It becomes less critical if the only effect is if you melt them and add them to the tibble and return them that way, or just return the metadata with the arrays added in a list or data frame. Either way the data is being read into a structure and returned with the metadata. Before, that wasn't the case, so what you tested for as the coordinate name was more crucial.