Importing SeaBASS data into SeaDAS
-
- Posts: 11
- Joined: Mon Sep 10, 2018 1:12 pm America/New_York
Importing SeaBASS data into SeaDAS
Hi,I'm having trouble importing SeaBASS data into SeaDAS. I make sure I have an image that overlaps with the SeaBASS observations I have downloaded. I have double checked file formats and still, the data do not load. The only solution I got was to convert SeaBASS data to a shapefile. Just want to make sure the functionality to read .txt files is there. I tried this dataset: https://seabass.gsfc.nasa.gov (/archive_preview/NASA_GSFC/CLIVEC/CV5/archive/CV5_OM_pigments_seabass.txt)
Thank you in advance.Best regards,Africa F.
Thank you in advance.Best regards,Africa F.
Filters:
-
- Subject Matter Expert
- Posts: 306
- Joined: Mon Apr 07, 2008 4:40 pm America/New_York
- Been thanked: 3 times
Importing SeaBASS data into SeaDAS
How are you doing this?
To import a SeaBASS file, you first open a satellite file and then you import the SeaBASS pigments file (via Vector > Import > SeaBASS Data or by clicking on the ship icon) which gets added as a layer to the satellite file.
Danny
To import a SeaBASS file, you first open a satellite file and then you import the SeaBASS pigments file (via Vector > Import > SeaBASS Data or by clicking on the ship icon) which gets added as a layer to the satellite file.
Danny
-
- Posts: 11
- Joined: Mon Sep 10, 2018 1:12 pm America/New_York
Importing SeaBASS data into SeaDAS
I have tried both. Regarding the .txt file I managed it in excel first to save it in my computer as .txt.
Africa F.
attachment 2
Africa F.

-
- Subject Matter Expert
- Posts: 23
- Joined: Mon Feb 05, 2007 12:20 pm America/New_York
Importing SeaBASS data into SeaDAS
If you receive the error message "Failed to load SeaBASS File" followed by another message such as "/missing is not a valid number" or another message, it is likely due to changes to the SeaBASS file made when editing it in Excel that caused your altered version to break one or more of the rules for the SeaBASS file format. That makes SeaDAS's SeaBASS-reader unable to open it properly. Here are three of the most common ways that spreadsheet programs inadvertently violate the SeaBASS file format. Open your new SeaBASS file in a plain text editor to verify the following:
1) Make sure the delimiter you used to save the text file is consistent with the SeaBASS metadata header called /delimiter. SeaBASS files are allowed to have a data matrix delimited by comma, space, or tab, but SeaBASS-readers need it labeled correctly. For example, it's possible the original SeaBASS file had /delimiter=tab, but when you re-saved it, the spreadsheet program changed the output to contain comma delimiters.
The quick fix that usually works is to use the spreadsheet program to re-save the file using comma delimiters. If necessary, then open the file in a text editor and change the appropriate metadata header to:
/delimiter=comma
2) Most spreadsheet programs will automatically append a bunch of unwanted delimiters to the header section of your new SeaBASS file to try to match the number of columns in the data matrix. For example, if you saved the file with comma delimiters and you open it in a plain text editor, you might see that it now contains rows like this:
/begin_header,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
/received=20150519,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
/identifier_product_doi=10.5067/SeaBASS/CLIVEC/DATA001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
If you need a quick fix to that sort of situation, open the file in a plain text editor and search and replace for commas that are at the end of a line (don't replace ALL commas since that will smush all the data values together). If your text editor's 'search and replace' functionality supports regular expressions, you could try searching for the 3-character pattern ,+$ and replace them with nothing.
3) Finally, sometimes the spreadsheet program will add quotes around certain lines in your metadata header. Those can be slightly more annoying to remove, but you can either search and replace them, or else manually remove them; it's not usually very many lines that are affected.
That should address the most common problems. FYI, if you or someone else is still struggling to check if a file is valid SeaBASS format, you can test by running it through the SeaBASS FCHECK utility
~Chris
1) Make sure the delimiter you used to save the text file is consistent with the SeaBASS metadata header called /delimiter. SeaBASS files are allowed to have a data matrix delimited by comma, space, or tab, but SeaBASS-readers need it labeled correctly. For example, it's possible the original SeaBASS file had /delimiter=tab, but when you re-saved it, the spreadsheet program changed the output to contain comma delimiters.
The quick fix that usually works is to use the spreadsheet program to re-save the file using comma delimiters. If necessary, then open the file in a text editor and change the appropriate metadata header to:
/delimiter=comma
2) Most spreadsheet programs will automatically append a bunch of unwanted delimiters to the header section of your new SeaBASS file to try to match the number of columns in the data matrix. For example, if you saved the file with comma delimiters and you open it in a plain text editor, you might see that it now contains rows like this:
/begin_header,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
/received=20150519,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
/identifier_product_doi=10.5067/SeaBASS/CLIVEC/DATA001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
If you need a quick fix to that sort of situation, open the file in a plain text editor and search and replace for commas that are at the end of a line (don't replace ALL commas since that will smush all the data values together). If your text editor's 'search and replace' functionality supports regular expressions, you could try searching for the 3-character pattern ,+$ and replace them with nothing.
3) Finally, sometimes the spreadsheet program will add quotes around certain lines in your metadata header. Those can be slightly more annoying to remove, but you can either search and replace them, or else manually remove them; it's not usually very many lines that are affected.
That should address the most common problems. FYI, if you or someone else is still struggling to check if a file is valid SeaBASS format, you can test by running it through the SeaBASS FCHECK utility
~Chris
-
- Posts: 11
- Joined: Mon Sep 10, 2018 1:12 pm America/New_York
Importing SeaBASS data into SeaDAS
Thank you , Chris.
That did it. I think it was the manipulation in a spreadsheet. Thank you!
To use the 'Pixel extraction" tool the format is different right?
All the best,
Africa F.
That did it. I think it was the manipulation in a spreadsheet. Thank you!
To use the 'Pixel extraction" tool the format is different right?
All the best,
Africa F.