Particulate Organic Carbon level 2 file scale factor and offset value

Please enter here to ask a question about any NASA Science related topics!
Post Reply
jcfischer
Posts: 47
Joined: Wed Aug 23, 2017 12:23 pm America/New_York

Particulate Organic Carbon level 2 file scale factor and offset value

by jcfischer » Sun Jun 28, 2020 7:49 pm America/New_York

Hi, I am processing the level 2 OC files with R and am wondering if the derived values for POC are correct. After opening the nc file, I extract the geophysical_data: poc and the navigation_data: longitude and latitude. I combine these in a data frame and then first, apply the scale factor, so the values are multiplied by 0.200000002980232, and subsequently, the offset value of 6400 is added.
Those specific values can be found in the meta data of that specific file:
short geophysical_data/poc[pixels_per_line,number_of_lines]   (Chunking: [37,486])  (Compression: shuffle,level 4)
long_name: Particulate Organic Carbon, D. Stramski, 2007 (443/555 version)
scale_factor: 0.200000002980232
add_offset: 6400
units: mg m^-3
standard_name: mole_concentration_of_particulate_organic_carbon_in_sea_water
_FillValue: -32767
valid_min: -32000
valid_max: -27000
reference: Stramski, D., et al. "Relationships between the surface concentration of particulate organic carbon and optical properties in the eastern South Pacific and eastern Atlantic Oceans." Biogeosciences 5.1 (2008): 171-201.

The values of the derived raster seem wrong. After outlier correction they are like this: values: 6402.577, 6416.052  (min, max)

In general, is the procedure of first multiplying the data by the scale factor and after this adding the add offset to the values correct?
Are those 2 specific values the right ones I identified in the meta data?
Looking at the range of values for POC presented here https://oceancolor.gsfc.nasa.gov/atbd/poc/, the values I retrieve can not be correct, no? The date of my file is 01. Jan. 2018. The region is the wider Indo-Pacific. So, not just a small area with potentially exceptionally high POC values.

How can I solve this problem to retrieve correct Particulate Organic Carbon values from the nc file? Thanks!

Tags:

gnwiii
Posts: 605
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

Particulate Organic Carbon level 2 file scale factor and offset value

by gnwiii » Sun Jun 28, 2020 9:10 pm America/New_York

I've been using R extensively with OBPG NetCDF4-CF products (other than POC) and the ncdf4 library or rgdal.  The NetCDF4-CF library should transparently handle scaling.  I get properly scaled geophysical data with properly identified missing data.   Have you checked the values you get in R without any additional manipulation?

jcfischer
Posts: 47
Joined: Wed Aug 23, 2017 12:23 pm America/New_York

Particulate Organic Carbon level 2 file scale factor and offset value

by jcfischer » Wed Jul 01, 2020 9:20 am America/New_York

Hi, Thanks for the answer! In R, I am using the ncvar_get function from the ncdf4 package. The R-documentation of this function (https://www.rdocumentation.org/packages/ncdf4/versions/1.17/topics/ncvar_get) under details states: "If the variable in the netCDF file has a scale and/or offset attribute defined, the returned data are automatically and silently scaled and/or offset as requested."
So in conclusion, there are no manipulations needed. I will now run the code over the full year and keep an eye on the data distributions of the extracted parameters.

Post Reply