%N w2wsfco %F $MIR/src/subs/cosubs.for
%D Convert a coordinate for a single axis and format
%P nebk
%: coordinates
%B
      subroutine w2wsfco (lun, iax, typei, win, typeo, nounit, strout,
     *                    strlen)

      integer   lun, iax, strlen
      double precision win
      character*(*) typei, typeo, strout
      logical   nounit
  ---------------------------------------------------------------------
  Convert one NEBK style coordinate with the COCVT routines and format
  into a string.  Coordinates for the other axes are assumed to be at
  the reference pixel

  Input
    lun     Handle of open file
    iax     Axis of interest
    typei   Coordinate type, should be from list
               'hms',    'dms',    'arcsec', 'arcmin', 'absdeg',
               'reldeg', 'abspix', 'relpix', 'absghz', 'relghz',
               'abskms', 'relkms', 'absnat', 'relnat', 'none'
    win     Coordinate to be converted
               'hms', 'dms' in radians
               '*  deg'     in degrees
               'arcsec'     in arcsec
               'arcmin'     in arcmin
               '*  pix'     in pixels
               '*  ghz'     in GHz
               '*  kms'     in km/s
    typeo   Output coordinate type from above list
    nounit  Don't append units
  Output
    strout  Formatted converted output coordinate
    strlen  Length of string in STROUT
