[gradsusr] xdfopen with multiple files

Kiswendsida Hyacinthe Guigma K.Guigma at sussex.ac.uk
Fri Apr 13 03:38:59 EDT 2018


Hi Jim,
As you can see each one of my template names has got 14 characters. And even when I manage to shorten these names, I still get the same error. 
Thank you!
________________________________________
From: James T. Potemra [jimp at hawaii.edu]
Sent: Thursday, April 12, 2018 9:20 PM
To: Kiswendsida Hyacinthe Guigma
Subject: Re: [gradsusr] xdfopen with multiple files

Hi Guigma,

According the documentation (http://cola.gmu.edu/grads/gadoc/templates.html), aggregating over ensembles is possible but the ensemble names are limited to 15 characters:

With the introduction of the extra grid dimension for ensembles in version 2.0, support was also added for file templating over E. The sole substitution template is %e and the substitution string is the ensemble name, which is provided in the EDEF entry in the descriptor file. Note that the ensemble names are limited to 15 characters -- keep this limit in mind when designing your data directory structure and file naming conventions (or use symbolic links to create short aliases for longer filenames). If you are templating over the ensemble dimension, there can be only one ensemble member per file. If your data set has an ensemble dimension, and you are using templating over T but not E (i.e., there is no %e in the DSET entry), then all ensemble members are presumed to have identical time axes, and all members must be contained in the data file for a given time. Templating over T but not E is not supported for data sets in flat binary or GRIB1 formats.
It looks like this may be your problem.

Jim

On 4/12/18 8:11 AM, Kiswendsida Hyacinthe Guigma wrote:

Hi grads-users!
I have many Netcdf files into one folder that I want to plot using grads. Each file contains 111 variables and the X and Y dimensions are the same for them all.  They don't contain time nor level dimension. ncdump gives me the following result:
netcdf IND2_ERA_1_1_HImax_4d_95perc_stat {
dimensions:
        lon = 71 ;
        lat = 31 ;
variables:
        double lon(lon) ;
                lon:units = "degrees_east" ;
                lon:long_name = "lon" ;
                lon:axis = "X" ;
        double lat(lat) ;
                lat:units = "degrees_north" ;
                lat:long_name = "lat" ;
                lat:axis = "Y" ;
        float int(lat, lon) ;
                int:units = "deg_C" ;
                int:_FillValue = 1.e+32f ;
                int:long_name = "Mean intensity" ;
        float int1(lat, lon) ;
                int1:units = "deg_C" ;
                int1:_FillValue = 1.e+32f ;
                int1:long_name = "Mean intensity in January" ;
        float int2(lat, lon) ;
                int2:units = "deg_C" ;
                int2:_FillValue = 1.e+32f ;
                int2:long_name = "Mean intensity in February" ;
        float int3(lat, lon) ;
                int3:units = "deg_C" ;
                int3:_FillValue = 1.e+32f ;
                int3:long_name = "Mean intensity in March" ;
        float int4(lat, lon) ;


.......}
It is possible for me to read each one of them using sdfopen. But when it comes to open them with xdfopen using the TEMPLATE option, it gives me this error message:

gadxdf error: Missing or invalid dimension size.

  --> The invalid description file record is:

  --> edef 24 names min_3d_90perc min_4d_90perc min_5d_90percperc min_6d_90perc min_3d_95percperc min_4d_95perc min_5d_95perc min_6d_95perc min_3d_99perc min_4d_99perc min_5d_99perc min_6d_99perc max_3d_90perc max_4d_90perc max_5d_90perc max_6d_90perc max_3d_95perc max_4d_95perc max_5d_95perc max_6d_95perc max_3d_99perc max_4d_99perc max_5d_99perc max_6d_99perc

  The data file was not opened.

This is my ctl script:

DSET    /research/geog/data2/DATA/kg312/Fortran/IND2_ERA_1_1_%e_stat.nc
DTYPE NETCDF
OPTIONS template
EDEF 24 NAMES min_3d_90perc min_4d_90perc min_5d_90percperc min_6d_90perc min_3d_95percperc min_4d_95perc min_5d_95perc min_6d_95perc min_3d_99perc min_4d_99perc min_5d_99perc min_6d_99perc max_3d_90perc max_4d_90perc max_5d_90perc max_6d_90perc max_3d_95perc max_4d_95perc max_5d_95perc max_6d_95perc max_3d_99perc max_4d_99perc max_5d_99perc max_6d_99perc
VARS 111
int 1 99 int
int1 1 99 int1
int2 1 99 int2
int3 1 99 int3
....
ENDVARS

I really don't understand that. Is is because my netCDF files are 2D (if this was a problem I don't think I would be able to open them using sdfopen)?
Your help is more than welcome.

Cheers

GUIGMA
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr





More information about the gradsusr mailing list