Subroutine vom_get_perc_cov
755 :
756 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
757 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
758 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
759 : !*-----READING TIMESERIES OF SEASONAL VEGETATION COVER---------------------------
760 :
761 : subroutine vom_get_perc_cov ()
762 : use vom_vegwat_mod
763 : implicit none
764 :
765 : INTEGER :: iostat, i, j
766 : INTEGER, ALLOCATABLE :: fyear_pc(:) ! Year for each day
767 : INTEGER, ALLOCATABLE :: fmonth_pc(:) ! Month for each day
768 : INTEGER, ALLOCATABLE :: fday_pc(:) ! Day of month
769 : INTEGER, ALLOCATABLE :: dayyear_pc(:) ! Day of year
770 :
771 :
772 :
773 : allocate(dayyear_pc( c_maxday ) )
774 : allocate(fday_pc( c_maxday ) )
775 : allocate(fmonth_pc( c_maxday ) )
776 : allocate(fyear_pc( c_maxday ) )
777 : allocate(perc_cov_veg( c_maxday ) )
778 :
779 :
780 : open(kfile_perc_cov, FILE=trim(adjustl(i_inputpath))// &
781 : trim(adjustl(sfile_perc_cov)), &
782 : & STATUS='old', IOSTAT=iostat)
783 : if (iostat .eq. 0) then
784 : do i = 1, c_maxday
785 : read(kfile_perc_cov,'(4i8,f8.2)') dayyear_pc(i), fday_pc(i), &
786 : & fmonth_pc(i), fyear_pc(i), perc_cov_veg(i)
787 : enddo
788 : end if
789 : close(kfile_perc_cov)
790 :
791 : !check if timeseries match
792 :
793 : if( (fyear_pc(1) .ne. fyear(1)) .or. &
794 : (fday_pc(1) .ne. fday(1)) .or. &
795 : (fmonth_pc(1) .ne. fmonth(1)) ) then
796 : stop 'startdate of perc_cov doesnot match with dailyweather'
797 : end if
798 :
799 : if( (fyear_pc(c_maxday) .ne. fyear(c_maxday)) .or. &
800 : (fday_pc(c_maxday) .ne. fday(c_maxday)) .or. &
801 : (fmonth_pc(c_maxday) .ne. fmonth(c_maxday)) ) then
802 : stop 'enddate of perc_cov doesnot match with dailyweather'
803 : end if
804 :
805 :
806 : return
807 : end subroutine vom_get_perc_cov