[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[THREDDS #DGS-484777]: TDS maxStrlen64 attribute injection?



Ok, you can set the size of maxstrlen to a larger value
but not get rid of it altogether.
You can control it by either of two changes to the url:
1. prefix the url with "[stringlength=256]
to get something like this: 
[stringlength=256]http://dapds00.nci.org.au/thredds/dodsC/fj6/PTHA/AustPTHA_1/SOURCE_ZONES/sunda/TSUNAMI_EVENTS/unit_source_statistics_sunda.nc
 
or
2. suffix the url with "#stringlength=256"
to get something like this:
http://dapds00.nci.org.au/thredds/dodsC/fj6/PTHA/AustPTHA_1/SOURCE_ZONES/sunda/TSUNAMI_EVENTS/unit_source_statistics_sunda.nc#stringlength=256

The 256 is just an example, you can set it to whatever you want.
You also can set it on a per-variable basis by using 
"stringlength_<variablename>"
such as "stringlength_air_temp"

I should warn you that this has probably not had extensive testing.

> 
> as per the below examples - they are using ncdump, CentOS 6 and netcdf 
> library version 4.4.1.1
> 
> Jon
> 
> On 2 Nov 2017, at 2:51 am, Unidata THREDDS Support <address@hidden> wrote:
> 
> > The maxstrlen attribute is coming the fact that the file is being
> > accessed using the DAP2 (/dodsC/) protocol. Is the user accessing the
> > server using the netcdf-c library?
> >
> >
> >>
> >> Dear TDS support
> >>
> >> Iâm running a production instance of TDS 4.6.10
> >>
> >> One of our users is reporting that TDS seems to be injecting a maxStrlen64 
> >> attribute into downloaded data, which is subsequently causing strings 
> >> within the data to be truncated to 64 chars. Is it possible to override 
> >> this behaviour?
> >>
> >> eg:
> >>
> >> address@hidden ~]$ module load netcdf
> >> address@hidden ~]$ ncdump -h 
> >> http://dapds00.nci.org.au/thredds/dodsC/fj6/PTHA/AustPTHA_1/SOURCE_ZONES/sunda/TSUNAMI_EVENTS/unit_source_statistics_sunda.nc
> >>  | grep maxStrlen64
> >> maxStrlen64 = 64 ;
> >> char initial_condition_file(table_rows, maxStrlen64) ;
> >> char tide_gauge_file(table_rows, maxStrlen64) ;
> >>
> >> whereas:
> >>
> >> address@hidden ~]$ ncdump -h 
> >> /g/data/fj6/PTHA/AustPTHA_1/SOURCE_ZONES/sunda/TSUNAMI_EVENTS/unit_source_statistics_sunda.nc
> >>  | grep maxStrlen64
> >> address@hidden ~]$
> >>
> >>
> >> Thanks for your help, Jon
> >>
> >> ----
> >> Jon Smillie
> >> Virtual Laboratories
> >> National Computational Infrastructure
> >> nci.org.au
> >>
> >>
> >>
> >>
> >>
> >>
> >
> > =Dennis Heimbigner
> >  Unidata
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: DGS-484777
> > Department: Support THREDDS
> > Priority: Normal
> > Status: Open
> > ===================
> > NOTE: All email exchanges with Unidata User Support are recorded in the 
> > Unidata inquiry tracking system and then made publicly available through 
> > the web.  If you do not want to have your interactions made available in 
> > this way, you must let us know in each email you send to us.
> >
> >
> 
> ----
> Jon Smillie
> Virtual Laboratories
> National Computational Infrastructure
> nci.org.au
> 
> 
> 
> 
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: DGS-484777
Department: Support THREDDS
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.



NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.