Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- getcruise

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
getcruise
Synopsis
/infobank/programs/share/getcruise.for
Description
  Subroutine to extract cruise ID info. from a filename.

   
       
USAGE
  "a" = argument, "r" = referenced, "s" = set

  
  call getcruise                        (with the following arguments)
         FileName                    [variable char*80 ar]
         CruiseId                    [variable char*7 s]
         Ship                        [variable char*1 s]
         Leg                         [variable char*2 s]
         Year                        [variable i*4 sr]
         Place                       [variable char*2 s]
         Other                       [variable char*39 s]
         FileType                    [variable char*39 s]
         LengthLeg                   [variable i*4 sr]
         LengthOther                 [variable i*4 sr]
         LengthFileType              [variable i*4 sr]
     
  Input:
     FileName  = character string containing the filename 
    
  Output:
     CruiseId  =  6 or 7 character alphanumeric string
     Ship      =  1 character string
     Leg       =  2 character alphanumeric string
     Year      =  4 digit Year
     Place     =  2 character alphanumeric string
     Other     =  remainder of first component of FileName, if any
     FileType  =  second component of FileName
     Lengthxxx =  length of significant character string returned
               
    
SUBROUTINES
  stringlen           (shared DRS external routine) 

  parsename           (shared DRS external routine)
    
    
FUNCTIONS
  index               (FORTRAN intrinsic function)  

               
    
DISCLAIMER
  Although this program has been used by the U.S. Geological Survey,

  no warranty, expressed or implied, is made by the Survey as to the
  accuracy and functioning of the program and related program
  material nor shall the fact of distribution constitute any such
  warranty, and no responsibility is assured by the Survey in
  connection therewith.
       
    
AUTHOR
  Clint Steele  .for  12/20/85

  Jean  Riordan        1/21/88   Modified for DRS$SHARE cleanup and 
                                   UNIX compatibility
  Clint Steele         1/25/88   Re-structure program to avoid GOTO's
  Clint Steele         9/27/88   Replaced filename analysis with call
                                   to PARSENAME.
  Carolyn Degnan       9/23/04   Added implicit none.

    
Reads
          read (FileName2(5:5), fmt='(i1)', iostat = ErrorCode) Year
              read (FileName2(4:5), fmt='(i2)', iostat = ErrorCode) Year
              read (FileName2(3:4), fmt='(i2)', iostat = ErrorCode) Year
Writes
Opens
Calls
      call parsename (InputName, 
     *                Node,         LengthNode,
     *                Device,       LengthDevice,
     *                Directory,    LengthDirectory,
     *                SubDirectory, LengthSubDir,      SubDirCount, 
     *                FileName2,    LengthName,
     *                FileType2,    LengthFileType,
     *                Version,      LengthVersion)
          call getcentury (Year, Century)

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/share/getcruise.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:36:48 PDT 2013  (chd)