Re: [netcdfgroup] NetCDF with gather compression, curvilinear cells, and projected coordinates - all at once! Possible?

  • To: John Caron <caron@xxxxxxxxxxxxxxxx>
  • Subject: Re: [netcdfgroup] NetCDF with gather compression, curvilinear cells, and projected coordinates - all at once! Possible?
  • From: Rich Signell <rsignell@xxxxxxxx>
  • Date: Thu, 16 Apr 2009 13:31:44 -0400
Tim,

The EFDC grid system is essentially the same as the ROMS grid system
(curvilinear, stretched version, masked regions, etc).    Indeed, as
John suggests, when we added the capability of using the deflate
capabilities of NetCDF4 to the ROMS source code (and this was easy,
only a few lines of code),  we are able to get significantly smaller
files:    I got a factor of 8 smaller file for a domain that was 40%
land cells, another user got a factor of 30 smaller.

The resulting NetCDF4 files  can be read using IDV, Panoply, our CF
toolbox for Matlab, or any other tool based on NetCDF-Java4.

-Rich

On Wed, Apr 15, 2009 at 11:34 PM, John Caron <caron@xxxxxxxxxxxxxxxx> wrote:
> Hi TIm:
>
> The IDV/CDM software doesnt handle CF compressed indices. As you have 
> discovered, no one else does either, and there has been a suggestion to 
> deprecate this feature, since netcdf4 compression might work just as well, in 
> a way that would be transparent to applications. Would you like to try that?
>
> John
>
>
>
>
> Tim Cera wrote:
>> I finally sat down to try and output to NetCDF from the Environmental
>> Fluid Dynamics Code (EFDC) that we use for estuarine modeling.
>>
>> EFDC already handles all computation in a gather compression mode so
>> that would seem to be a good fit to have, plus only about 10% of the
>> cells are wet cells which would make a big impact on file size if I kept
>> the blank cells about.
>>
>> EFDC uses a ordered, boundary-fitted, curvilinear, 4-sided cell grid
>> with sigma-stretched layers in the vertical.  That is a mouthful.
>>
>> We use UTM for the coordinates so the NetCDF needs to have projection
>> information.
>>
>> It seems like I have tried everything and I can't get any NetCDF tool to
>> bring in this dataset.  I have tried IDV, Panoply, ncview (doesn't
>> really support projection data), ncBrowse, and maybe some others.
>>
>> IDV does the best, at least putting the projected coordinates near the
>> right spot in the 'Region' map, but IDV thinks that the WSElevation data
>> is (3013, 3013) instead of (259, 121).
>>
>> I have 4 warnings when using the CF Compliance checker:
>>
>>
>> WARNING (7.1): Data for variable y lies outside cell boundaries
>> WARNING (7.1): Data for variable x lies outside cell boundaries
>> ...
>> ------------------
>> Checking variable: rgrid
>> ------------------
>> WARNING (3): No standard_name or long_name attribute specified
>> WARNING (3.1): units attribute should be present
>>
>>
>> The first two I can fix because it must be related to the algorithm to
>> calculate the cell corners.  I have checked the last few cells and they
>> are correct.  The 'rgrid' variable is my gather compression variable and
>> it shouldn't have units, nor could I find a reasonable standard name.
>>
>> Here is the CDL:
>>
>>
>>   netcdf efdcout {
>> dimensions:
>>         IC = 259 ;
>>         JC = 121 ;
>>         rgrid = 3013 ;
>>         nv = 4 ;
>>         time = UNLIMITED ; // (2 currently)
>> variables:
>>         int transverse_mercator ;
>>                 transverse_mercator:grid_mapping_name =
>> "transverse_mercator" ;
>>                 transverse_mercator:latitude_of_projection_origin = 0. ;
>>                 transverse_mercator:longitude_of_central_meridian = -81. ;
>>                 transverse_mercator:false_easting = 500000. ;
>>                 transverse_mercator:false_northing = 0. ;
>>                 transverse_mercator:scale_factor_at_central_meridian =
>> 0.9996 ;
>>         int rgrid(rgrid) ;
>>                 rgrid:compress = "IC JC" ;
>>         float WSElevation(time, rgrid) ;
>>                 WSElevation:standard_name =
>> "height_above_reference_ellipsoid" ;
>>                 WSElevation:units = "m" ;
>>                 WSElevation:coordinates = "x y" ;
>>                 WSElevation:grid_mapping = "transverse_mercator" ;
>>         float x(rgrid) ;
>>                 x:standard_name = "projection_x_coordinate" ;
>>                 x:units = "m" ;
>>                 x:bounds = "x_bnds" ;
>>         float y(rgrid) ;
>>                 y:standard_name = "projection_y_coordinate" ;
>>                 y:units = "m" ;
>>                 y:bounds = "y_bnds" ;
>>         float x_bnds(rgrid, nv) ;
>>         float y_bnds(rgrid, nv) ;
>>         double time(time) ;
>>                 time:standard_name = "time" ;
>>                 time:units = "days since 1995-1-1 0:0:0" ;
>>
>> // global attributes:
>>                 :Conventions = "CF-1.0" ;
>> }
>>
>> Any ideas on what I am doing wrong?
>>
>> Kindest regards,
>> Tim Cera
>>
>> _______________________________________________
>> netcdfgroup mailing list
>> netcdfgroup@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe,  visit:
>> http://www.unidata.ucar.edu/mailing_lists/
>
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/
>



-- 
Dr. Richard P. Signell   (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: