Skip to content

TDS puts wrong variable attributes #503

@rkouznetsov

Description

@rkouznetsov
Manifest-Version: 1.0
Implementation-Title: THREDDS Data Server (TDS)
Implementation-Version: 5.5-SNAPSHOT
Implementation-Vendor-Id: edu.ucar
Implementation-Vendor: UCAR/Unidata
Implementation-URL: https://www.unidata.ucar.edu/software/tds/
Created-By: Gradle 6.9.1
Build-Jdk: 11.0.18
Built-By: ubuntu
Built-On: 2024-03-19T05:11:37+0000

When I request (you might need to substitute recent date)

ncks -v 'cnc_POLLEN_GRASS.*' -d height,0 -d time,2 https://thredds.silam.fmi.fi/thredds/dodsC/silam_europe_pollen_v5_9_1/runs/silam_europe_pollen_v5_9_1_RUN_2024-06-01T00:00:00Z out.nc

I get a file with a variable that has attributes:

        float cnc_POLLEN_GRASS_m32(time, height, rlat, rlon) ;
                cnc_POLLEN_GRASS_m32:units = "number/m3" ;
                cnc_POLLEN_GRASS_m32:long_name = "Concentration in air POLLEN_GRASS_m32" ;
                cnc_POLLEN_GRASS_m32:_FillValue = -9.99999e+14f ;
                cnc_POLLEN_GRASS_m32:substance_name = "POLLEN_GRASS" ;
                cnc_POLLEN_GRASS_m32:silam_amount_unit = "number" ;
                cnc_POLLEN_GRASS_m32:mode_name = "" ;
                cnc_POLLEN_GRASS_m32:mode_distribution_type = "FIXED_DIAMETER" ;
                cnc_POLLEN_GRASS_m32:mode_nominal_diameter = "32.0000000           um" ;
                cnc_POLLEN_GRASS_m32:fix_diam_mode_min_diameter = "32.0000000           um" ;
                cnc_POLLEN_GRASS_m32:fix_diam_mode_max_diameter = "32.0000000           um" ;
                cnc_POLLEN_GRASS_m32:fix_diam_mode_mean_diameter = "32.0000000           um" ;
                cnc_POLLEN_GRASS_m32:grid_mapping = "rp" ;
                cnc_POLLEN_GRASS_m32:cell_methods = "time: mean" ;
                cnc_POLLEN_GRASS_m32:_ChunkSizes = 1, 1, 459, 549 ;
                cnc_POLLEN_GRASS_m32:coordinates = "time_run time height rlat rlon " ;

There is acouple of issues with them:

  1. _ChunkSizes must not be there: It is netcdf3 file.
  2. coordinates refers to non-existing dimension time_run

These attributes confuse further processing tools, such as cdo and nco, so I have to do some magic to rectify the file

ncatted -a _ChunkSizes,,d,,  -a coordinates,,d,,  out.nc out1.nc

Is there any way to prevent TDS from creating these wrong attributes?

Thank you!

BR,
Rostislav

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions