C+
C NAME:
C	Time1YDoy
C PURPOSE:
C	Converts year/doy of year to 1-element standard time and v.v.
C CATEGORY:
C	gen/for/lib
C CALLING SEQUENCE:
	subroutine Time1YDoy(id,t,yr,doy)
C INPUTS:
C	id		integer		=0  time to year/doy
C					=1  year/doy to time
C	t		integer		id=0: time relative to current origin
C	yr		integer		id=1: year
C	doy(2)		integer		id=1: day of year (doy(2) is fraction of
C						day in units set by Time2SetOrigin2000)
C OUTPUTS:
C	yr		integer		id=1: year
C	doy(2)		integer		id=1: day of year (doy(2) is fraction of
C						day in units set by Time2SetOrigin2000)
C	t		integer		id=0: times relative to current origin
C CALLS:
C	Time2YDoy, Time1to2, Time2to1
C PROCEDURE:
C	See Time2YDoy
C MODIFICATION HISTORY:
C	JAN-2004, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
C-
	    integer	id
	    integer	t
	    integer	yr
	    integer	doy(2)

	integer		u(2)

	if (id .eq. 0) then			! Time to Yr, Doy

	    call Time1to2(t,u)
	    call Time2YDoy(id,u,yr,doy)

	else					! Yr, Doy ---> Time

	    call Time2YDoy(id,u,yr,doy)
	    call Time2to1(u,t)

	end if

	return
	end
