Using NetCDF file attributes to filter dataset in ERDDAP #318
-
Hello, I'm not sure this is the appropriate forum for this question, but I have not found an answer for this yet. I am working with a group of researchers looking to compile nearshore temperature logger data into a single dataset on our local ERDDAP server. The data is converted into NetCDF files so that the deployment level metadata (Lat/Long/Depth/Project/Location Name/Logger ID) is retained in each file as a global attribute without being repeated for each row of the timeseries. My question is this: Is there a way to filter the data using these file attributes (i.e. only select records from a particular logger ID or location name) without inflating file sizes by creating a variable from them and having it repeat for the entirety of the dataset? The simplest solution is to keep the data as a CSV and repeat information, but I guess I'm looking for a more elegant approach to not artificially inflate datasets. Any help would be appreciated. Thanks for your time and consideration! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
I believe you want to take a look at the documentation for Pseudo source names: Specifically what you describe sounds like global: sourceNames to me, but there are several options there to use. Your data files can specify the information as attributes (not as a column), but ERDDAP will treat them like a column, and so users will be able to filter on the fields. |
Beta Was this translation helpful? Give feedback.
-
@pkraska For my benefit could you post the netcdf header info from a file - that is what you would get from "ncdump -h" Also perhaps what you want is to set the data as a table, not a grid, using EDDTableFromNcFiles. You do not have to convert the files to a table, ERDDAP will. |
Beta Was this translation helpful? Give feedback.
-
@pkraska Thanks. No need to send it. I have test data I can try it out on using the ERDDAP I have on my laptop. |
Beta Was this translation helpful? Give feedback.
I believe you want to take a look at the documentation for Pseudo source names:
https://erddap.github.io/docs/server-admin/datasets#pseudo-sourcenames
Specifically what you describe sounds like global: sourceNames to me, but there are several options there to use.
Your data files can specify the information as attributes (not as a column), but ERDDAP will treat them like a column, and so users will be able to filter on the fields.