#!/bin/csh # Script for the new version of yannos corrected for the missing modes. # The new version of yannos does not allow input to the code through the # command line anymore, but requires an input file called yannos.dat. # This script creates the required input files for both spheroidal and # toroidal modes according to the parameters specified by the user. # Additional options can be changed in the bottom part of the script. # However, it is adviced NOT to change them unless you know exactly what # you are doing. The current options are suitable for the normal use of # yannos. # The script then runs the new version of yannos for both spheroidal and # toroidal modes. # 02/07/2005 Federica if (${#argv} < 1) then echo Usage $0 model exit endif set code=/data/08/barbara/,codes04/,yannos/src/yannos1 # Input parameters to be specified by the user set model = $1 # model #set mxmhz = 5 # maximum mhz computed, 5mhz = 200 sec set mxmhz = 32 # maximum mhz computed, 32mhz = 31.25 sec #set mxmhz = 35 # maximum mhz computed, 40mhz = 25 sec #set mxmhz = 40 # maximum mhz computed, 40mhz = 25 sec #set mxmhz = 62.5 # maximum mhz computed, 62.5mhz = 16 sec set mnmhz = 0.1 # minimum mhz set minl = 0 # minimum angular order set maxl = 10000 # maximum angular order set maxn = 3000 # maximum overtone number set eps = 1.e-11 # precision criterion #set wgrav = 10 # max frequency (in mHz) for which set wgrav = 0.2 # max frequency (in rad/s) for which (=32mHz) #set wgrav = 0.22 # max frequency (in rad/s) for which (=32mHz) #set wgrav = 0.25 # max frequency (in rad/s) for which (=40mHz) #set wgrav = 0.004 # max frequency (in rad/s) for which # gravity computation is included and phi eigenfunctions # are computed !!!! set radius = 6371000. # radius of the planet set keep_bad_modes = T # to be able to run the reformating scripts it should # be T. # Input file for spheroidal modes echo '#input earth model:' > yannos.dat_$model\_S echo $model >> yannos.dat_$model\_S echo '#output information file:' >> yannos.dat_$model\_S echo $model.asc.mhz$mxmhz.S >> yannos.dat_$model\_S echo '#prefix for output eigenfunction files:' >> yannos.dat_$model\_S echo $model.bin.mhz$mxmhz.S >> yannos.dat_$model\_S echo '#type code (3=spheroidal, 2=toroidal)' >> yannos.dat_$model\_S echo 3 >> yannos.dat_$model\_S echo '#precision (2) and switch off gravity pertubation frequency:' >> yannos.dat_$model\_S echo $eps $eps $wgrav >> yannos.dat_$model\_S echo '#lmin, lmax, fmin, fmax, nmax:' >> yannos.dat_$model\_S echo $minl $maxl $mnmhz $mxmhz $maxn >> yannos.dat_$model\_S echo '#### If you need to output only some radius layers of eigenf' >> yannos.dat_$model\_S echo '#number of layer for output:' >> yannos.dat_$model\_S echo 1 >> yannos.dat_$model\_S echo '#radius layers' >> yannos.dat_$model\_S echo 0. $radius >> yannos.dat_$model\_S echo "#### Computations flags. If you don't know what you are doing, don't touch." >> yannos.dat_$model\_S echo '# force fmin (usually F):' >> yannos.dat_$model\_S echo F >> yannos.dat_$model\_S echo '# Cancel Gravity (usually F):' >> yannos.dat_$model\_S echo F >> yannos.dat_$model\_S echo '# never use start level (usually F):' >> yannos.dat_$model\_S echo F >> yannos.dat_$model\_S echo '#use T ref (usually T):' >> yannos.dat_$model\_S echo T >> yannos.dat_$model\_S echo '#Check modes (usually F):' >> yannos.dat_$model\_S echo F >> yannos.dat_$model\_S echo '# use_remedy awkward modes (usually T):' >> yannos.dat_$model\_S echo T >> yannos.dat_$model\_S echo '# rescue (try to do something if missing a mode ) (usually T):' >> yannos.dat_$model\_S echo T >> yannos.dat_$model\_S echo '# restart (to restart in case of crash during computation' >> yannos.dat_$model\_S echo F >> yannos.dat_$model\_S echo '#force_systemic_search' >> yannos.dat_$model\_S echo F >> yannos.dat_$model\_S echo '# keep_bad_modes' >> yannos.dat_$model\_S echo $keep_bad_modes >> yannos.dat_$model\_S #echo F >> yannos.dat_$model\_S echo '# modout_format (ipg, ucb, olm)' >> yannos.dat_$model\_S echo ucb >> yannos.dat_$model\_S echo '# seuil_ray' >> yannos.dat_$model\_S echo 0.0001 >> yannos.dat_$model\_S echo '# l_startlevel' >> yannos.dat_$model\_S echo 0 >> yannos.dat_$model\_S # Input file for toroidal modes echo '#input earth model:' > yannos.dat_$model\_T echo $model >> yannos.dat_$model\_T echo '#output information file:' >> yannos.dat_$model\_T echo $model.asc.mhz$mxmhz.T >> yannos.dat_$model\_T echo '#prefix for output eigunfunction files:' >> yannos.dat_$model\_T echo $model.bin.mhz$mxmhz.T >> yannos.dat_$model\_T echo '#type code (3=spheroidal, 2=toroidal)' >> yannos.dat_$model\_T echo 2 >> yannos.dat_$model\_T echo '#preccision (2) and switch off gravity pertubation frequency:' >> yannos.dat_$model\_T echo $eps $eps $wgrav >> yannos.dat_$model\_T echo '#lmin, lmax, fmin, fmax, nmax:' >> yannos.dat_$model\_T echo $minl $maxl $mnmhz $mxmhz $maxn >> yannos.dat_$model\_T echo '############if you need to output only some radius layers of eigenf' >> yannos.dat_$model\_T echo '#number of layer for output:' >> yannos.dat_$model\_T echo 1 >> yannos.dat_$model\_T echo '#radius layers' >> yannos.dat_$model\_T echo 0. $radius >> yannos.dat_$model\_T echo "#### computations flags. If you don't know what you are doing, don't touch." >> yannos.dat_$model\_T echo '# force fmin (usually F):' >> yannos.dat_$model\_T echo F >> yannos.dat_$model\_T echo '# Cancel Gravity (usually F):' >> yannos.dat_$model\_T echo F >> yannos.dat_$model\_T echo '# never use start level (usually F):' >> yannos.dat_$model\_T echo F >> yannos.dat_$model\_T echo '#use T ref (usually T):' >> yannos.dat_$model\_T echo T >> yannos.dat_$model\_T echo '#Check modes (usuallyi F):' >> yannos.dat_$model\_T echo F >> yannos.dat_$model\_T echo '# use_remedy awkward modes (usually T):' >> yannos.dat_$model\_T echo T >> yannos.dat_$model\_T echo '# rescue (try to do something if missing a mode ) (usually T):' >> yannos.dat_$model\_T echo T >> yannos.dat_$model\_T echo '# restart (to restart in case of crash during computation' >> yannos.dat_$model\_T echo F >> yannos.dat_$model\_T echo '#force_systemic_search' >> yannos.dat_$model\_T echo F >> yannos.dat_$model\_T echo '# keep_bad_modes' >> yannos.dat_$model\_T echo $keep_bad_modes >> yannos.dat_$model\_T echo '# modout_format (ipg, ucb, olm)' >> yannos.dat_$model\_T echo ucb >> yannos.dat_$model\_T echo '# seuil_ray' >> yannos.dat_$model\_T echo 0.0001 >> yannos.dat_$model\_T echo '# l_startlevel' >> yannos.dat_$model\_T echo 0 >> yannos.dat_$model\_T # Run yannos for both spheroidal and toroidal modes if ( -e yannos.dat ) then set backup=1 set i=0 while ( -e yannos.dat_old$i ) @ i++ end mv yannos.dat yannos.dat_old$i else set backup=0 endif ln -s yannos.dat_$model\_S yannos.dat $code \rm yannos.dat ln -s yannos.dat_$model\_T yannos.dat $code \rm yannos.dat if ($backup) then mv yannos.dat_old$i yannos.dat endif