[Thread Prev][Thread Next][Index]
Re: linuxizing descriptor files
Hi Jose!
The script you are looking for is attached.
regards
Retish
On Tue, 31 Jul 2001, Jose Edson Pereira wrote:
> Dear Ferreters,
>
> Does anyone have the script file which attempts to linuxize Fortran 77
> style descriptors to be usable under linux F90's like? I've already
> tried the link at the FAQ
> ferret.wrc.noaa.gov/Ferret/FAQ/system/linux_mc_descriptors.html, but for
> some reason I could not get it!
> Cheers,
> jose
>
>
--
----------------------------------------------------
Retish Senan
Centre for Atmospheric and Oceanic Sciences
Indian Institute of Science
B A N G A L O R E 560 012
Ph: +91-80-3092505
+91-80-3600450
Fax:+91-80-3447865
http://caos.iisc.ernet.in/hpg/students/retish.html
----------------------------------------------------
#!/bin/csh
# This shell script is designed to take an existing descriptor file
# and translate it into an acceptable format for linux Ferret. The reason this
# needs to be done is because linux Ferret was compiled w/ F90, and it
# uses different formats for namelist reads than does F77. The usage for
# this script is:
#
# linuxize_descriptors descriptor_name > new_descriptor_name
#
# Without the redirect, the new descriptor is written to stdout.
#
# It is also possible that the "filter" below will not completely linuxize
# every descriptor out there. Some non-TMAP customizations may be missed, and
# will cause errors when attempting to read the descriptor into ferret.
# In that case, edits will need to be made to the sed command below to include
# the required substitution, deletion, etc.
#
# kob 6/97 - kobrien@pmel.noaa.gov
if ( $#argv != 1 ) then
echo " Usage: linuxize_descriptors descriptor_name"
echo " Example: linuxize_descriptors coads.des"
exit 1
endif
ls $argv[1] >& /dev/null
if ($status) then
echo "File "$argv[1]" does not seem to exist. "
echo "Exiting..............."
exit 1
endif
sed -e '/\*\*\*/d' -e '/^*/d' -e 's/\$/\&/g' -e 's#\&END#/#g' -e '/\* /d' -e ' s/ / /g' -e '/\-\-/d' -e '/D_ADD_PARM/d' -e '/d_add_parm/d' $argv[1]
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement