Go to the documentation of this file.00001
00002 subroutine bc_interp_old( sib, time )
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 use sibtype
00017 use timetype
00018 use sib_const_module
00019 use sib_bc_module
00020 implicit none
00021
00022
00023 type(sib_t), dimension(subcount), intent(inout) :: sib
00024 type(time_struct), intent(in) :: time
00025
00026
00027 integer i, k
00028 real tpgf1
00029 real tpgf2
00030 integer k1
00031 integer k2
00032
00033
00034 if ( time%doy < time%mid_month(time%month) ) then
00035 k1 = time%month - 1
00036 k2 = time%month
00037 if ( k1 < 1 ) k1 = 12
00038 tpgf1 = (time%mid_month(k2) - time%doy) * 2.0 / &
00039 real(time%days_per_month(k1) + time%days_per_month(k2))
00040 tpgf2 = 1.0 - tpgf1
00041 else
00042 k1 = time%month
00043 k2 = time%month + 1
00044 if ( k2 > 12 ) k2 = 1
00045 tpgf2 = (time%doy - time%mid_month(k1)) * 2.0 / &
00046 real(time%days_per_month(k1) + time%days_per_month(k2))
00047 tpgf1 = 1.0 - tpgf2
00048 endif
00049
00050
00051
00052 do i = 1, subcount
00053 sib(i)%param%aparc = tpgf1*sib(i)%param%aparc1 + tpgf2*sib(i)%param%aparc2
00054 sib(i)%param%zlt = tpgf1*sib(i)%param%zlt1 + tpgf2*sib(i)%param%zlt2
00055 sib(i)%param%green = tpgf1*sib(i)%param%green1 + tpgf2*sib(i)%param%green2
00056 sib(i)%param%z0d = tpgf1*sib(i)%param%z0d1 + tpgf2*sib(i)%param%z0d2
00057 sib(i)%param%zp_disp = tpgf1*sib(i)%param%zp_disp1 + tpgf2*sib(i)%param%zp_disp2
00058
00059
00060
00061 sib(i)%param%cc1 = tpgf1*sib(i)%param%rbc1 + tpgf2*sib(i)%param%rbc2
00062 sib(i)%param%cc2 = tpgf1*sib(i)%param%rdc1 + tpgf2*sib(i)%param%rdc2
00063 sib(i)%param%gmudmu = tpgf1*sib(i)%param%gmudmu1 + tpgf2*sib(i)%param%gmudmu2
00064 sib(i)%param%d13cresp = tpgf1*sib(i)%param%d13cresp1 + tpgf2*sib(i)%param%d13cresp2
00065
00066 do k=1,physmax
00067 sib(i)%param%physfrac(k) = tpgf1*sib(i)%param%physfrac1(k) + &
00068 tpgf2*sib(i)%param%physfrac2(k)
00069 enddo
00070
00071
00072
00073 enddo
00074
00075 end subroutine bc_interp_old