      FUNCTION lvl2file(yeardoy_x)

      IMPLICIT NONE

      INCLUDE "ovpindex.prm"
      INCLUDE "ovpindex.cmn"

      INTEGER*4 l1, l2, str_1st_blank
      CHARACTER*(*) lvl2file
      CHARACTER*(*) yeardoy_x

      l1= str_1st_blank(lvl2dir)-1
      l2= str_1st_blank(lvl2ext)-1
 
      lvl2file= lvl2dir(1:l1) // '/y' // yeardoy_x(1:4) //'/s' //
     &     yeardoy_x(3:7) // lvl2ext(1:l2)

      RETURN


      END
