[Thread Prev][Thread Next][Index]

Descriptor hard limitations



Hi all,

I frequently use descriptor files to work with collections of
monthly netCDF model output.

Unfortunately, it seems that there is an hard coded limitation in the size of filenames.
I have tested that 60 characters is the maximum size for filename.
It is definitevely not enough !

I have lived with this problem by using symbolic links but even with this
it is sometime difficult to deal with limited size filenames.
Could you take this in consideration for future release ?

Attached is a shell script to create a descriptor file from a collection of netCDF files.
Files are aggregated considering l dimension (l=1 for file#1, l=2 for file#2, ....)
which is sufficient for my current online diagnostic.

Patrick

--

mailto:Patrick.Brockmann@ipsl.jussieu.fr
01.44.27.21.10 --> IPSL (Jussieu, Tour 26, 4eme)
01.69.08.77.23 --> LSCE (Orme des merissiers 701, 33B)
http://www.ipsl.jussieu.fr/~brocksce/
#!/bin/ksh

#**************************************************************
# Description: Generate a ferret descriptor file.
#
# Usage: descriptor_create /home/pasbcp/cplipsl/CPL03/CPL03_0001??30_histmth.nc > file.des
#
# Notes:
#  * Use absolute pathnames. 
#  * Descriptor files are not written in a portable format since they
#    are based on namelist format which are different from F90 and F77.
#    See explanation given in the ferret FAQ:
#    http://ferret.wrc.noaa.gov/Ferret/FAQ/system/linux_mc_descriptors.html 
#    "This error occurs because the descriptor was formatted for Fortran 77
#     namelist reads, but the Linux version of Ferret was compiled using Fortran 90.
#     Since Fortran 90 has a different format for namelist reads, the descriptor fails."
#  * See linuxize_descriptors shell to translate existing descriptor files 
#    to Linux platforms.
#
# Author: Patrick Brockmann
# Contact: Patrick.Brockmann@ipsl.jussieu.fr
# History:
# Modification:
#

#---------------------------------------------
machine=`uname`
typeset -u machine
if [ $machine = 'LINUX' ] ; then
 namelist_begin='&' 
 namelist_end='/' 
else
 namelist_begin='$' 
 namelist_end='$END' 
fi

#---------------------------------------------
cat <<  END_DESCRIPTOR_HEADER
 ${namelist_begin}FORMAT_RECORD
   D_TYPE               = '  MC',
   D_FORMAT             = '  1A',
 ${namelist_end}
 ${namelist_begin}BACKGROUND_RECORD
   D_T0TIME             = '01-JAN-1800 00:00:00',
 ${namelist_end}
 ${namelist_begin}MESSAGE_RECORD
 ${namelist_end}
 ${namelist_begin}EXTRA_RECORD
 ${namelist_end}
END_DESCRIPTOR_HEADER

#---------------------------------------------
nb_file=1
for file in $@ ; do
    cat <<  END_DESCRIPTOR_MAIN
 ${namelist_begin}STEPFILE_RECORD
   S_FILENAME           = '$file',
   S_AUX_SET_NUM        = 0,
   S_START              = $nb_file,
   S_END                = $nb_file,
   S_DELTA              = 1,
   S_NUM_OF_FILES       = 1,
   S_REGVARFLAG         = ' ',
 ${namelist_end}
END_DESCRIPTOR_MAIN
    let nb_file=nb_file+1
done

#---------------------------------------------
cat <<  END_DESCRIPTOR_FOOTER
 ${namelist_begin}STEPFILE_RECORD
   S_FILENAME           = '**END OF STEPFILES**'
 ${namelist_end} 
END_DESCRIPTOR_FOOTER

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement