⇐ ⇒

[CF-metadata] swath data format

From: chelle gentemann <gentemann>
Date: Fri, 17 Jun 2005 11:43:40 -0700

I have two separate questions:

1)I would like to verify the proper CF compliant / COARDS compliant format
for swath data:

For example, swath data for SST (sea surface temperature) usually is just
stored by
cell position and scan line. So, usually something like:

    double sea_surface_temperature(nj,ni);
         :long_name= "sea surface temperature";
         :units= "kelvin";
         :coordinates="lon lat";

Should a time (with dimension one) be included ? I have read the CF
conventions document and it seems to indicate that the example above is
correct when there is no averaging in time. The model below would be
correct if at each measurement there was some sort of averaging in time?

    double sea_surface_temperature(time,nj,ni);
         :long_name= "sea surface temperature";
         :units= "kelvin";
         :coordinates="lon lat";


Question 2)
In the CF conventions document there are variables and indices with the
same name. For example

variables:
   double time(time);
     :units = "days since 1968-5-23";
     :long_name = "modified julian day (ROMS-style)";

I also see lat(lat) and lon(lon).

In writing out swath data, I have a variable:

    double time(1);
         :long_name= "reference time of sst file";
         :units= "seconds since 1981-01-01 00:00:00";


If I then were to use time as an indice, as in the second example in
question 1.

sea_surface_temperature(time,nj,ni)

Fortran routines have a hard time handling this unless I know that there is
an indice and variable with the same name before I try to read it. If I
run something like cdf2fortran (which will automatically create fortran
code for reading any given netcdf file) it creates code that won't
compile. I tested this by creating 2 netcdf files. The first used 'ntime'
as an indice and the second used 'time' as an indice. 'time' was also
defined as a 1 dimensional array. I ran cdf2fortran on both files and
tried to compile the resulting code. The first file (using ntime) compiled
successfully and can read the file into memory. The second file (using
time) did not compile because of the indice/variable having the same
name. This can also easily be check by simply trying to compile a short
program like;

         parameter (time = 1)
         real*8 time(time)

         time=0;
         end

Is this a known incompatiblity? I guess I don't understand why definitions
like time(time), lon(lon), lat(lat) are specified since they will result in
difficulties reading the data in fortran unless you have prior knowledge
about the data contained in the file (if I know time is an indice and an
array, I can re-write the code to read in the time indice into a parameter
ntime). But, trying to get data out to large numbers of people and having
to convey this is difficult...

Thank you,
Chelle








-----------------------------------
Chelle Gentemann - Remote Sensing Systems
438 First Street, Suite 200
Santa Rosa, CA 95401
Voice: 707-545-2904 Ext. 14
FAX: 707-545-2906
http://www.ssmi.com
gentemann at remss.com
-----------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cgd.ucar.edu/pipermail/cf-metadata/attachments/20050617/ffe44ce8/attachment.html>
Received on Fri Jun 17 2005 - 12:43:40 BST

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:40 BST

⇐ ⇒