Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- degrees

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
degrees
Synopsis
/infobank/programs/share/degrees.for
Description
  Subroutine to allow N/S/W/E input in Dec. Degrees, Deg. Dec. Min., or

  Deg. Min. Dec. Sec. gracefully.
       
COMMENTS
  NOTE: returned values are double precision reals (i.e.: real * 8)

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

  
  call degrees                          (with the following arguments)
         North                       [variable r*8 asr]
         South                       [variable r*8 asr]
         West                        [variable r*8 asr]
         East                        [variable r*8 asr]
    
SUBROUTINES
  stringlen           (shared DRS external routine) 

  parsedegree         (internal)                    
    
FILES_USED
  unit=*(write)

  unit=5(read)
    
AUTHOR
  Clint Steele    9/30/91     .for

  Clint Steele    1/30/92   Cleaned up, documented, and installed in
                            shareable image library
  Michael Hamer   9/9/93    Added capabilities to handle UTM inputs
  Carolyn Degnan  9/23/04   Added implicit none.

    
Reads
      read (5, '(a)', end = 99) NorthString
      read (5, '(a)', end = 99) SouthString
      read (5, '(a)', end = 99) WestString
      read (5, '(a)', end = 99) EastString
         read (5, '(i)', err=500) Zone
      read (String(1:Length), *) Degree, Minute, Second
Writes
Opens
Calls
      call stringlen (NorthString, Length)
      call parsedegree (NorthString, North)
      call stringlen (SouthString, Length)
      call parsedegree (SouthString, South)
      call stringlen (WestString, Length)
      call parsedegree (WestString,  West)
      call stringlen (EastString, Length)
      call parsedegree (EastString,  East)
         call geoutm (2, South, West, MinUTMx, MinUTMy, Zone)
         call geoutm (2, North, East, MaxUTMx, MaxUTMy, Zone)
      call stringlen (String, Length)
      call changecase ('SMALL', String(1:Length))
      call stringlen (String(1:Length), Length)

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/degrees.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:36:58 PDT 2013  (chd)