Page 2 of 2

Re: Sharp Drop in PACE Rrs Between 553 nm and 555 nm

Posted: Wed Jul 23, 2025 11:04 am America/New_York
by cassandra21
This is the script I am using:

Code: Select all

 
    % Read necessary NetCDF variables
Rrs = ncread(filepath, 'geophysical_data/Rrs');  % [band, x, y]

nbands = size(Rrs, 1);
wavelengths = wavelengths(1:nbands);

I think I found the problem because wavelength dimension is 286 whereas the spectral dimension of Rrs cube is 172 and I am basically choosing the first ones, which is an error. So which ones should I choose?

Re: Sharp Drop in PACE Rrs Between 553 nm and 555 nm

Posted: Wed Jul 23, 2025 11:07 am America/New_York
by jamesgallen
Hi Cassandra!

Adding some more information here. Looking through that file and your plotted spectra, it looks like it's being plotted as a function of wavelength when it should be plotted against wavelength_3d (which is also in the sensor_band_parameters group).

Yes, this is understandably confusing. The reason for this is that there is a long precedent for having a "wavelength" variable that covers the entire range for the sensor in that sensor_band_parameters group, but certain products (like Rrs) do not use the full range, so we created a new variable for PACE called "wavelength_3d" to cover the 3 dimensional (lines, pixels, wave_3d) products while still having that original "wavelength" variable.

How I keep things organized in my head is looking at the size of the matrix for the spectral variable of interest. You'll have 1710 lines, 1272 pixels, and either 286 wavelengths if the product covers the full range, or 172 wavelengths if you need to use the reduced wavelength_3d variable. Switching should offset that spectra by about 14 spots, which would force that spectral jump to happen at the 588-613 problem spot (if you'd like more information on that particular problem, you can see more in the reprocessing notes here: https://oceancolor.gsfc.nasa.gov/data/reprocessing/V3.0/pace-oci/ )

James

Re: Sharp Drop in PACE Rrs Between 553 nm and 555 nm

Posted: Thu Jul 24, 2025 5:35 am America/New_York
by cassandra21
Hi James,

Thank you so much for your input! It was really helpful and clarifying. It's definitely a bit confusing at first, but once you understand how things are structured, it becomes much easier to work with.

Based on the information you provided, I've updated my code as follows:

Code: Select all

Rrs  = ncread(ncfile, 'geophysical_data/Rrs');         % [band, x, y]

wavelengths = ncread(ncfile, 'sensor_band_parameters/wavelength_3d');
nbands = size(Rrs, 1);
wavelengths = wavelengths(1:nbands);
I tested it, and it produced a graph similar to Minwei's, so I believe I'm on the right track!

Additionally, I'd appreciate some help reproducing the same type of graph in SeaDAS. I'm really curious about how to do this, as I haven't explored some of SeaDAS's features yet. I gave it a try, but I'm likely missing something, either in selecting all the bands or the correct pixel, because the graph I get looks quite odd.

Thanks again, and I'd really appreciate any guidance on using SeaDAS for this.

Best,
Cassandra

Re: Sharp Drop in PACE Rrs Between 553 nm and 555 nm

Posted: Thu Jul 24, 2025 7:36 am America/New_York
by jared
While you may find this post (viewtopic.php?t=7029) useful, what I am doing is: (1) using the "pin placing tool" to specify the specific pixels you want, (2) click the "spectrum view", where you can generate the spectra for the pins you added in step (1), you can also export the spectra to a text file.

Minwei