UNAVCO Home UNAVCO Home
   |    |   |  
UNAVCO Home UNAVCO Facility

Software Remote PC Software RedHat Linux Auxiliary utilities Downloading & Data Transfer AOA Ashtech Trimble Other Pre-Processing TEQC Other Processing GAMIT/GLOBK Bernese GIPSY-OASIS II Trimble Geomatics (TGO)
Bernese - Tutorial: Scripts Used in Tutorial

The PCF defines which scripts are to be run, and in what sequence. These scripts reside in the directory $U/SCRIPT. The Bernese V4.0 documentation discusses these scripts in section 21.6.

A script used in the UNIX version of the BPE is essentially a Bourne, or BASH (Bourne Again Shell) script with an additional wrapper at the beginning and ending of the script for the BPE environment. In addition, the BPE has programs and functions that were specifically written to be used in a BPE script. These additional utilities are discussed in section 21.9 of the Bernese V4.0 manual. The scripts are located in the directory $X/SCRIPT and the programs are in the directory $XB.


yochi[braunj]:V40-$ cd $U/SCRIPT
yochi[braunj]:V40-$ ls
ADDNEQ    COMPAR    GPSBAS    GPSQIFAP  ORBGEN    RXOBV3
CODCHK    EURO_COP  GPSEDT    GPSQIF_P  PRETAB    SNGDIF
CODSPP    EURO_DEL  GPSEST    MAUPRP    QIFXTR

A description of these files is given in section 21.6, but it is useful to look at one before blindly using it. The script RXOBV3 is shown below. The purpose of this script is to run the Bernese program RXOBV3.

yochi[braunj]:V40-$ cat RXOBV3


#!/bin/sh # RNXOBV3 # sh script file written by bds # ----------------------------- # functions used by shell do_rm( ) { if [ "$1" ] then if test -f echo $1 | tr ' ' '\012' | head -1 then eval rm $1 fi fi } # toupper( ) { eval $1=echo $2 | tr '[a-z]' '[A-Z]' eval export $1 } # seterr( ) { if [ $? = 0 ] then ERRSTAT=OK else ERRSTAT=ERR fi } # # ----------------------------- # SHELL STARTS HERE # ----------------------------- # # SHELL VARIABLES: # ---------------- # # YEAR : Year of the session to be processed (2 digit) # SESSION : Session number (4 characters) # CAMPAIGN: Campaign name # CAMP_PTH: Campaign path # CAMP_DRV: Drive letter for campain (i.e. P) # OPT_DIR : Directory for panels # PID : Process identification number (3 digits) # SUB_PID : Subprocess id (3 digits) # PRT_FILE: Protocol file name including path # SCRIPT : Name of script # TASKID : Task id of script, usually 00 # PRIORITY: Priority of the script # CPU : CPU the script is running on # DAYYEAR : Julian day of the year # DAY : Day of the Month # MONTH : Month, 1=JAN, 12=DEC # GPSWEEK : GPS week # DAYWEEK : Day of the week, 0=SUN, 6=SAT # V_X : X Variable in DAT151__.PAN # V_O : O Variable in DAT151__.PAN # V_Z : Z Variable in DAT151__.PAN # V_PLUS : Plus variable in DAT151__.PAN # V_MINUS : Minus variable in DAT151__.PAN # V_x : User variable # PARAMx : Script specific parameter, x is 1 thru 9 # U : Directory path to U: # # See if this shell is being run from the PCS # script, or directly for testing. If testing, # no the header script is not passed in as %1% # if [ "$1" = "" ] then # # set variables for testing here # TEST_START_DIR=pwd cd $U/WORK TESTING="YES" export TESTING else TESTING="NO" export TESTING . "$1" seterr fi # # START THE MENU SYSTEM IN NON-INTERACTIVE MODE # --------------------------------------------- . $X/SCRIPT/BEG_MENU seterr # # SET VARIABLES IN DAT151__.PAN # ----------------------------- . $X/SCRIPT/SET_SESS seterr # # SHELL RXOBV3 BODY # ----------------- # PGMNAM="RXOBV3" export PGMNAM $X/SCRIPT/RUN_PGMS seterr # # -------------- # end the script # -------------- . $X/SCRIPT/END_MENU seterr if [ "$TESTING" = "YES" ] then cd "$TEST_START_DIR" else . $X/SCRIPT/DO_TAIL seterr fi

Return to the tutorial index page.

Last modified Wednesday, 16-Nov-2005 20:58:00 MST

 

Home | About Us | Contact Us | Support | Search | Facility | PBO | Education & Outreach

Comments: webmasterATunavco.org
© 2008 UNAVCO, Inc.