      subroutine readco2

!!     ~ ~ ~ PURPOSE ~ ~ ~
!!     reads in the input data for the yearly CO2 concentration
     
!!     ~ ~ ~ INCOMING VARIABLES ~ ~ ~
!!     name         |units         |definition
!!     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!!     iyr          |year          |beginning year of simulation
!!     nbyr         |none          |number of years simulated
!!     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

!!     ~ ~ ~ OUTGOING VARIABLES ~ ~ ~
!!     name         |units         |definition
!!     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!!     co2(:)       |ppmv          |atmospheric CO2 concentration
!!     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

!!     ~ ~ ~ LOCAL DEFINITIONS ~ ~ ~
!!     name         |units         |definition
!!     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!!     i            |none          |counter
!!     iyear        |none          |current year being read
!!     ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

!!     ~ ~ ~ ~ ~ ~ END SPECIFICATIONS ~ ~ ~ ~ ~ ~

      use parm
      implicit none

      integer :: ii, iyear


!!    initialize variables
      ii = 0
      iyear = 0

!!    open co2.dat file
      open (330,file="co2.txt")
      
!!    skip first line
      read (330,*)
      
!!    read co2.dat file and attribute co2 concentrations to co2(:) array
      do
        read (330,3301) iyear, co2(1)
		!! check if read year is equal to iyr beginning year of simulation
          if (iyear == iyr) then
		    do ii = 2, nbyr
			  read (330,3301) iyear, co2(ii)
			end do
			exit
		  end if
      end do
      
!!    close the co2.dat file
      close (330)

3301  format (i4,f6.2)

      return
      
      end
