Not logged inOcean Color Forum

The forum is locked.

The Ocean Color Forum has transitioned over to the Earthdata Forum (https://forum.earthdata.nasa.gov/). The information existing below will be retained for historical reference. Please sign into the Earthdata Forum for active user support.

Up Topic SeaDAS / SeaDAS - General Questions / CSV export (locked)
- By lortega2 Date 2014-09-29 15:25
I am exploring the 7.0.1 version of SaDAS and trying the get familiar with this version, actually I was used to work with an old IDL based version.
I was trying to export a subset in CSV  format, but I cant include Latitude and Longitude in the file which is important to for re-grid the information contained in the subset, can you point out how to include lat an log in the headers?
From already thank you very much
- By seanbailey Date 2014-10-02 09:54
If the product you are exporting is geolocated, latitude and longitude will be include in the CSV output.
You can check the geocoding for the product with the geo-coding information GUI

If the file DOES have geocoding and doesn't output lat/lon in the CSV, we'll need an example to test...
Sean
- By lortega2 Date 2014-11-06 13:50
Hi, the geo-coding information include lat and long but the CSV file not
Apologies for the delay in my reply I was busy in an oceanographic survey
Best regards
leo

Product:  subset_0_of_A20090652009072.L3m_8D_SST_4 

Image-X:  775  pixel
Image-Y:  702  pixel
Longitude:  41°21'15" W  degree
Latitude:  40°46'15" S  degree

BandName  Value  Unit
Sea Surface Temperature Mean:  18.360.165  deg-C
l3m_qual:  0  deg-C

l3m_qual.QualityLevel:  true 

Center latitude 33°16'15" S
Center longitude 48°16'15" W
Upper left latitude 11°31'15" S
Upper left longitude 73°38'45" W
Upper right latitude 11°31'15" S
Upper right longitude 22°53'45" W
Lower left latitude 55°01'15" S
Lower left longitude 73°38'45" W
Lower right latitude 55°01'15" S
Lower right longitude 22°53'45" W

WKT of the image CRS FITTED_CS["Image CS based on WGS84(DD)",
  PARAM_MT["Affine",
    PARAMETER["num_row", 3],
    PARAMETER["num_col", 3],
    PARAMETER["elt_0_0", 0.041666666666666664],
    PARAMETER["elt_0_2", -73.66666666666667],
    PARAMETER["elt_1_1", -0.041666666666666664],
    PARAMETER["elt_1_2", -11.5]],
  GEOGCS["WGS84(DD)",
    DATUM["WGS84",
      SPHEROID["WGS84", 6378137.0, 298.257223563]],
    PRIMEM["Greenwich", 0.0],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic longitude", EAST],
    AXIS["Geodetic latitude", NORTH]]]
WKT of the geographical CRS GEOGCS["WGS84",
  DATUM["WGS84",
    SPHEROID["WGS84", 6378137.0, 298.257223563]],
  PRIMEM["Greenwich", 0.0],
  UNIT["degree", 0.017453292519943295],
  AXIS["Geodetic longitude", EAST],
  AXIS["Geodetic latitude", NORTH]]

The product uses a geo-coding based on a cartographic map CRS.

WKT of the map CRS GEOGCS["WGS84(DD)",
  DATUM["WGS84",
    SPHEROID["WGS84", 6378137.0, 298.257223563]],
  PRIMEM["Greenwich", 0.0],
  UNIT["degree", 0.017453292519943295],
  AXIS["Geodetic longitude", EAST],
  AXIS["Geodetic latitude", NORTH]]

Image-to-map transformation PARAM_MT["Affine",
  PARAMETER["num_row", 3],
  PARAMETER["num_col", 3],
  PARAMETER["elt_0_0", 0.041666666666666664],
  PARAMETER["elt_0_2", -73.66666666666667],
  PARAMETER["elt_1_1", -0.041666666666666664],
  PARAMETER["elt_1_2", -11.5]]
- By seanbailey Date 2014-11-07 19:51
Ah, SMI files...The HDF4 SMI files do not have latitude and longitude arrays, the navigation for those files is derived mathematically, since they are regular gridded files.
(the new netCDF4 versions do have lat/lon info but the reader still calculates the lat/lon arrays)

So, to have the CSV output latitude and longitude for SMI files, you'll need to create the longitude and latitude arrays as 'real' arrays
To do this, use the 'Band Maths' function.  To create the longitude array, use the following expression:
    -180 + X*(360/8640) + (360/8640)/2

...and the latitude array:

    90 - Y*(360/8640) + (360/8640)/2

The 'X' and 'Y' variables are understood by SeaDAS (and BEAM) to be the pixel and line values for the raster array.

When creating the band, uncheck the 'Virtual (save expression only, don't store data)' checkbox (if you forget, you can always convert the
virtual band to a real band after the fact.

Do this to the full SMI and the subset will include the latitude and longitude arrays.  The CSV export will see these 'real' arrays and
merrily output them for you.

Sean
- By lortega2 Date 2014-11-14 08:15
thank you very much!!
leo
- By silgonz Date 2014-11-21 08:40
Hello, I am working with SST SMI files. When I import the file using SeaDAS 7.1 the geo-coding is OK but when I export it as a .csv that information do not appear. I´ve tried using the MathBand function to create lat and long arrays for the global map (long= -180 + X*(360/8640) + (360/8640)/2; lat= 90 - Y*(360/8640) + (360/8640)/2) but when exporting a subset as csv the values of lat and long do not correspond with real lat long values of the subset. Working with NETCDF files from ERA Interim reanalysis series of wind speed data I have the same problem.
Thanks in advance for your help!
Silvana
- By seanbailey Date 2014-11-24 07:57
Silvana,

The equations assume our standard 4.6km SMI files.  If you are using the 9.2km files, then you will need to replace 8640 with 4320. 
The value to use can be verified by looking at the dimensions of the gridded data set you wish to navigate.  You will have to choose
the appropriate value for the ERA data as well. 

Regards,
Sean
- By silgonz Date 2014-11-24 12:36
That was the problem, thank you!
Up Topic SeaDAS / SeaDAS - General Questions / CSV export (locked)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill