Initial commit
This commit is contained in:
@@ -0,0 +1,299 @@
|
||||
subroutine ALightCombinatorial()
|
||||
implicit none
|
||||
include '../testarea/LeafGasHybridFit.h'
|
||||
integer i,ilastrubp1,ilastrubis1,ilastrubp2,ilastrubis2,
|
||||
&ilastrubp3,ilastrubis3,ilastrubp4,ilastrubis4,
|
||||
&ilastrubp5,ilastrubis5,ilastrubp6,ilastrubis6,
|
||||
&ilastrubp7,ilastrubis7,ilastrubp8,ilastrubis8,
|
||||
&ilastrubp9,ilastrubis9,ilastrubp10,ilastrubis10,
|
||||
&ilastrubp11,ilastrubis11,ilastrubp12,ilastrubis12,
|
||||
&ilastrubp13,ilastrubis13,ilastrubp14,ilastrubis14,
|
||||
&ilastrubp15,ilastrubis15
|
||||
!common block variables: numALightcurves,nALightPoints(numALightcurves),
|
||||
!ALightiphotolimit(nALightPoints,numALightcurves)
|
||||
|
||||
if(numALightcurves.eq.0)then
|
||||
!no conventional A/Light curves. go to free-style measurements directly and then return
|
||||
call FreeCombinatorial()
|
||||
return
|
||||
endif
|
||||
!(before 17/09/2014 remarks.) Assume rubp, rubisco and tpu limitations in the order of (rubp, rubisco, tpu) but any limitation can be missing in any light response curves
|
||||
!the nALightPoints data in each light response curve must be ordered from low to high PAR. When ordered in such, the three limitation states
|
||||
!should occur in the order of (rubp, rubisco, tpu)
|
||||
!
|
||||
!17/09/2014 Wenting found (RuBP, TPU, Rubisco) is more likely for A/Light curves if Ci decreases with increased light. Thus the following
|
||||
!changes are made:
|
||||
!we generally assume the points of an A/Light curve are lined up in a sequence of (RuBP, TPU and Rubisco), which is indicated by
|
||||
!ialightorder=0. However, if Ci increases steadily from nstartalight to the end, we assume a sequence of (RuBP, Rubisco and TPU),
|
||||
!which is indicated by ialightorder=2.
|
||||
do ilastrubp1=nstartalight(1),nendalight(1)
|
||||
do i=1,ilastrubp1
|
||||
ALightiphotolimit(i,1)=2
|
||||
enddo
|
||||
do 1 ilastrubis1=ilastrubp1,nALightPoints(1)
|
||||
do i=ilastrubp1+1,ilastrubis1
|
||||
ALightiphotolimit(i,1)=3-ialightorder(1)
|
||||
enddo
|
||||
do i=ilastrubis1+1,nALightPoints(1)
|
||||
ALightiphotolimit(i,1)=1+ialightorder(1)
|
||||
enddo
|
||||
if(numALightcurves.eq.1)then
|
||||
call FreeCombinatorial()
|
||||
goto 1
|
||||
endif
|
||||
|
||||
do ilastrubp2=nstartalight(2),nendalight(2)
|
||||
do i=1,ilastrubp2
|
||||
ALightiphotolimit(i,2)=2
|
||||
enddo
|
||||
do 2 ilastrubis2=ilastrubp2,nALightPoints(2)
|
||||
do i=ilastrubp2+1,ilastrubis2
|
||||
ALightiphotolimit(i,2)=3-ialightorder(2)
|
||||
enddo
|
||||
do i=ilastrubis2+1,nALightPoints(2)
|
||||
ALightiphotolimit(i,2)=1+ialightorder(2)
|
||||
enddo
|
||||
if(numALightcurves.eq.2)then
|
||||
call FreeCombinatorial()
|
||||
goto 2
|
||||
endif
|
||||
|
||||
do ilastrubp3=nstartalight(3),nendalight(3)
|
||||
do i=1,ilastrubp3
|
||||
ALightiphotolimit(i,3)=2
|
||||
enddo
|
||||
do 3 ilastrubis3=ilastrubp3,nALightPoints(3)
|
||||
do i=ilastrubp3+1,ilastrubis3
|
||||
ALightiphotolimit(i,3)=3-ialightorder(3)
|
||||
enddo
|
||||
do i=ilastrubis3+1,nALightPoints(3)
|
||||
ALightiphotolimit(i,3)=1+ialightorder(3)
|
||||
enddo
|
||||
if(numALightcurves.eq.3)then
|
||||
call FreeCombinatorial()
|
||||
goto 3
|
||||
endif
|
||||
|
||||
do ilastrubp4=nstartalight(4),nendalight(4)
|
||||
do i=1,ilastrubp4
|
||||
ALightiphotolimit(i,4)=2
|
||||
enddo
|
||||
do 4 ilastrubis4=ilastrubp4,nALightPoints(4)
|
||||
do i=ilastrubp4+1,ilastrubis4
|
||||
ALightiphotolimit(i,4)=3-ialightorder(4)
|
||||
enddo
|
||||
do i=ilastrubis4+1,nALightPoints(4)
|
||||
ALightiphotolimit(i,4)=1+ialightorder(4)
|
||||
enddo
|
||||
if(numALightcurves.eq.4)then
|
||||
call FreeCombinatorial()
|
||||
goto 4
|
||||
endif
|
||||
|
||||
do ilastrubp5=nstartalight(5),nendalight(5)
|
||||
do i=1,ilastrubp5
|
||||
ALightiphotolimit(i,5)=2
|
||||
enddo
|
||||
do 5 ilastrubis5=ilastrubp5,nALightPoints(5)
|
||||
do i=ilastrubp5+1,ilastrubis5
|
||||
ALightiphotolimit(i,5)=3-ialightorder(5)
|
||||
enddo
|
||||
do i=ilastrubis5+1,nALightPoints(5)
|
||||
ALightiphotolimit(i,5)=1+ialightorder(5)
|
||||
enddo
|
||||
if(numALightcurves.eq.5)then
|
||||
call FreeCombinatorial()
|
||||
goto 5
|
||||
endif
|
||||
|
||||
do ilastrubp6=nstartalight(6),nendalight(6)
|
||||
do i=1,ilastrubp6
|
||||
ALightiphotolimit(i,6)=2
|
||||
enddo
|
||||
do 6 ilastrubis6=ilastrubp6,nALightPoints(6)
|
||||
do i=ilastrubp6+1,ilastrubis6
|
||||
ALightiphotolimit(i,6)=3-ialightorder(6)
|
||||
enddo
|
||||
do i=ilastrubis6+1,nALightPoints(6)
|
||||
ALightiphotolimit(i,6)=1+ialightorder(6)
|
||||
enddo
|
||||
if(numALightcurves.eq.6)then
|
||||
call FreeCombinatorial()
|
||||
goto 6
|
||||
endif
|
||||
|
||||
do ilastrubp7=nstartalight(7),nendalight(7)
|
||||
do i=1,ilastrubp7
|
||||
ALightiphotolimit(i,7)=2
|
||||
enddo
|
||||
do 7 ilastrubis7=ilastrubp7,nALightPoints(7)
|
||||
do i=ilastrubp7+1,ilastrubis7
|
||||
ALightiphotolimit(i,7)=3-ialightorder(7)
|
||||
enddo
|
||||
do i=ilastrubis7+1,nALightPoints(7)
|
||||
ALightiphotolimit(i,7)=1+ialightorder(7)
|
||||
enddo
|
||||
if(numALightcurves.eq.7)then
|
||||
call FreeCombinatorial()
|
||||
goto 7
|
||||
endif
|
||||
|
||||
do ilastrubp8=nstartalight(8),nendalight(8)
|
||||
do i=1,ilastrubp8
|
||||
ALightiphotolimit(i,8)=2
|
||||
enddo
|
||||
do 8 ilastrubis8=ilastrubp8,nALightPoints(8)
|
||||
do i=ilastrubp8+1,ilastrubis8
|
||||
ALightiphotolimit(i,8)=3-ialightorder(8)
|
||||
enddo
|
||||
do i=ilastrubis8+1,nALightPoints(8)
|
||||
ALightiphotolimit(i,8)=1+ialightorder(8)
|
||||
enddo
|
||||
if(numALightcurves.eq.8)then
|
||||
call FreeCombinatorial()
|
||||
goto 8
|
||||
endif
|
||||
|
||||
do ilastrubp9=nstartalight(9),nendalight(9)
|
||||
do i=1,ilastrubp9
|
||||
ALightiphotolimit(i,9)=2
|
||||
enddo
|
||||
do 9 ilastrubis9=ilastrubp9,nALightPoints(9)
|
||||
do i=ilastrubp9+1,ilastrubis9
|
||||
ALightiphotolimit(i,9)=3-ialightorder(9)
|
||||
enddo
|
||||
do i=ilastrubis9+1,nALightPoints(9)
|
||||
ALightiphotolimit(i,9)=1+ialightorder(9)
|
||||
enddo
|
||||
if(numALightcurves.eq.9)then
|
||||
call FreeCombinatorial()
|
||||
goto 9
|
||||
endif
|
||||
|
||||
do ilastrubp10=nstartalight(10),nendalight(10)
|
||||
do i=1,ilastrubp10
|
||||
ALightiphotolimit(i,10)=2
|
||||
enddo
|
||||
do 10 ilastrubis10=ilastrubp10,nALightPoints(10)
|
||||
do i=ilastrubp10+1,ilastrubis10
|
||||
ALightiphotolimit(i,10)=3-ialightorder(10)
|
||||
enddo
|
||||
do i=ilastrubis10+1,nALightPoints(10)
|
||||
ALightiphotolimit(i,10)=1+ialightorder(10)
|
||||
enddo
|
||||
if(numALightcurves.eq.10)then
|
||||
call FreeCombinatorial()
|
||||
goto 10
|
||||
endif
|
||||
|
||||
do ilastrubp11=nstartalight(11),nendalight(11)
|
||||
do i=1,ilastrubp11
|
||||
ALightiphotolimit(i,11)=2
|
||||
enddo
|
||||
do 11 ilastrubis11=ilastrubp11,nALightPoints(11)
|
||||
do i=ilastrubp11+1,ilastrubis11
|
||||
ALightiphotolimit(i,11)=3-ialightorder(11)
|
||||
enddo
|
||||
do i=ilastrubis11+1,nALightPoints(11)
|
||||
ALightiphotolimit(i,11)=1+ialightorder(11)
|
||||
enddo
|
||||
if(numALightcurves.eq.11)then
|
||||
call FreeCombinatorial()
|
||||
goto 11
|
||||
endif
|
||||
|
||||
do ilastrubp12=nstartalight(12),nendalight(12)
|
||||
do i=1,ilastrubp12
|
||||
ALightiphotolimit(i,12)=2
|
||||
enddo
|
||||
do 12 ilastrubis12=ilastrubp12,nALightPoints(12)
|
||||
do i=ilastrubp12+1,ilastrubis12
|
||||
ALightiphotolimit(i,12)=3-ialightorder(12)
|
||||
enddo
|
||||
do i=ilastrubis12+1,nALightPoints(12)
|
||||
ALightiphotolimit(i,12)=1+ialightorder(12)
|
||||
enddo
|
||||
if(numALightcurves.eq.12)then
|
||||
call FreeCombinatorial()
|
||||
goto 12
|
||||
endif
|
||||
|
||||
do ilastrubp13=nstartalight(13),nendalight(13)
|
||||
do i=1,ilastrubp13
|
||||
ALightiphotolimit(i,13)=2
|
||||
enddo
|
||||
do 13 ilastrubis13=ilastrubp13,nALightPoints(13)
|
||||
do i=ilastrubp13+1,ilastrubis13
|
||||
ALightiphotolimit(i,13)=3-ialightorder(13)
|
||||
enddo
|
||||
do i=ilastrubis13+1,nALightPoints(13)
|
||||
ALightiphotolimit(i,13)=1+ialightorder(13)
|
||||
enddo
|
||||
if(numALightcurves.eq.13)then
|
||||
call FreeCombinatorial()
|
||||
goto 13
|
||||
endif
|
||||
|
||||
do ilastrubp14=nstartalight(14),nendalight(14)
|
||||
do i=1,ilastrubp14
|
||||
ALightiphotolimit(i,14)=2
|
||||
enddo
|
||||
do 14 ilastrubis14=ilastrubp14,nALightPoints(14)
|
||||
do i=ilastrubp14+1,ilastrubis14
|
||||
ALightiphotolimit(i,14)=3-ialightorder(14)
|
||||
enddo
|
||||
do i=ilastrubis14+1,nALightPoints(14)
|
||||
ALightiphotolimit(i,14)=1+ialightorder(14)
|
||||
enddo
|
||||
if(numALightcurves.eq.14)then
|
||||
call FreeCombinatorial()
|
||||
goto 14
|
||||
endif
|
||||
|
||||
do ilastrubp15=nstartalight(15),nendalight(15)
|
||||
do i=1,ilastrubp15
|
||||
ALightiphotolimit(i,15)=2
|
||||
enddo
|
||||
do 15 ilastrubis15=ilastrubp15,nALightPoints(15)
|
||||
do i=ilastrubp15+1,ilastrubis15
|
||||
ALightiphotolimit(i,15)=3-ialightorder(15)
|
||||
enddo
|
||||
do i=ilastrubis15+1,nALightPoints(15)
|
||||
ALightiphotolimit(i,15)=1+ialightorder(15)
|
||||
enddo
|
||||
if(numALightcurves.eq.15)then
|
||||
call FreeCombinatorial()
|
||||
goto 15
|
||||
endif
|
||||
15 continue
|
||||
enddo
|
||||
14 continue
|
||||
enddo
|
||||
13 continue
|
||||
enddo
|
||||
12 continue
|
||||
enddo
|
||||
11 continue
|
||||
enddo
|
||||
10 continue
|
||||
enddo
|
||||
9 continue
|
||||
enddo
|
||||
8 continue
|
||||
enddo
|
||||
7 continue
|
||||
enddo
|
||||
6 continue
|
||||
enddo
|
||||
5 continue
|
||||
enddo
|
||||
4 continue
|
||||
enddo
|
||||
3 continue
|
||||
enddo
|
||||
2 continue
|
||||
enddo
|
||||
1 continue
|
||||
enddo
|
||||
return
|
||||
end subroutine ALightCombinatorial
|
||||
@@ -0,0 +1,364 @@
|
||||
subroutine FreeCombinatorial()
|
||||
include '../testarea/LeafGasHybridFit.h'
|
||||
integer
|
||||
&i01,i02,i03,i04,i05,i06,i07,i08,i09,i10,
|
||||
&i11,i12,i13,i14,i15,i16,i17,i18,i19,i20,
|
||||
&i21,i22,i23,i24,i25,i26,i27,i28,i29,i30,
|
||||
&i31,i32,i33,i34,i35,i36,i37,i38,i39,i40,
|
||||
&i41,i42,i43,i44,i45,i46,i47,i48,i49,i50
|
||||
if(nFreePoints.eq.0)then
|
||||
call UnivPhotoFit()
|
||||
return
|
||||
endif
|
||||
do 1 i01=1,3
|
||||
Freeiphotolimit(1)=i01
|
||||
if(nFreePoints.eq.1)then
|
||||
call UnivPhotoFit()
|
||||
goto 1
|
||||
endif
|
||||
do 2 i02=1,3
|
||||
Freeiphotolimit(2)=i02
|
||||
if(nFreePoints.eq.2)then
|
||||
call UnivPhotoFit()
|
||||
goto 2
|
||||
endif
|
||||
do 3 i03=1,3
|
||||
Freeiphotolimit(3)=i03
|
||||
if(nFreePoints.eq.3)then
|
||||
call UnivPhotoFit()
|
||||
goto 3
|
||||
endif
|
||||
do 4 i04=1,3
|
||||
Freeiphotolimit(4)=i04
|
||||
if(nFreePoints.eq.4)then
|
||||
call UnivPhotoFit()
|
||||
goto 4
|
||||
endif
|
||||
do 5 i05=1,3
|
||||
Freeiphotolimit(5)=i05
|
||||
if(nFreePoints.eq.5)then
|
||||
call UnivPhotoFit()
|
||||
goto 5
|
||||
endif
|
||||
do 6 i06=1,3
|
||||
Freeiphotolimit(6)=i06
|
||||
if(nFreePoints.eq.6)then
|
||||
call UnivPhotoFit()
|
||||
goto 6
|
||||
endif
|
||||
do 7 i07=1,3
|
||||
Freeiphotolimit(7)=i07
|
||||
if(nFreePoints.eq.7)then
|
||||
call UnivPhotoFit()
|
||||
goto 7
|
||||
endif
|
||||
do 8 i08=1,3
|
||||
Freeiphotolimit(8)=i08
|
||||
if(nFreePoints.eq.8)then
|
||||
call UnivPhotoFit()
|
||||
goto 8
|
||||
endif
|
||||
do 9 i09=1,3
|
||||
Freeiphotolimit(9)=i09
|
||||
if(nFreePoints.eq.9)then
|
||||
call UnivPhotoFit()
|
||||
goto 9
|
||||
endif
|
||||
do 10 i10=1,3
|
||||
Freeiphotolimit(10)=i10
|
||||
if(nFreePoints.eq.10)then
|
||||
call UnivPhotoFit()
|
||||
goto 10
|
||||
endif
|
||||
do 11 i11=1,3
|
||||
Freeiphotolimit(11)=i11
|
||||
if(nFreePoints.eq.11)then
|
||||
call UnivPhotoFit()
|
||||
goto 11
|
||||
endif
|
||||
do 12 i12=1,3
|
||||
Freeiphotolimit(12)=i12
|
||||
if(nFreePoints.eq.12)then
|
||||
call UnivPhotoFit()
|
||||
goto 12
|
||||
endif
|
||||
do 13 i13=1,3
|
||||
Freeiphotolimit(13)=i13
|
||||
if(nFreePoints.eq.13)then
|
||||
call UnivPhotoFit()
|
||||
goto 13
|
||||
endif
|
||||
do 14 i14=1,3
|
||||
Freeiphotolimit(14)=i14
|
||||
if(nFreePoints.eq.14)then
|
||||
call UnivPhotoFit()
|
||||
goto 14
|
||||
endif
|
||||
do 15 i15=1,3
|
||||
Freeiphotolimit(15)=i15
|
||||
if(nFreePoints.eq.15)then
|
||||
call UnivPhotoFit()
|
||||
goto 15
|
||||
endif
|
||||
do 16 i16=1,3
|
||||
Freeiphotolimit(16)=i16
|
||||
if(nFreePoints.eq.16)then
|
||||
call UnivPhotoFit()
|
||||
goto 16
|
||||
endif
|
||||
do 17 i17=1,3
|
||||
Freeiphotolimit(17)=i17
|
||||
if(nFreePoints.eq.17)then
|
||||
call UnivPhotoFit()
|
||||
goto 17
|
||||
endif
|
||||
do 18 i18=1,3
|
||||
Freeiphotolimit(18)=i18
|
||||
if(nFreePoints.eq.18)then
|
||||
call UnivPhotoFit()
|
||||
goto 18
|
||||
endif
|
||||
do 19 i19=1,3
|
||||
Freeiphotolimit(19)=i19
|
||||
if(nFreePoints.eq.19)then
|
||||
call UnivPhotoFit()
|
||||
goto 19
|
||||
endif
|
||||
do 20 i20=1,3
|
||||
Freeiphotolimit(20)=i20
|
||||
if(nFreePoints.eq.20)then
|
||||
call UnivPhotoFit()
|
||||
goto 20
|
||||
endif
|
||||
do 21 i21=1,3
|
||||
Freeiphotolimit(21)=i21
|
||||
if(nFreePoints.eq.21)then
|
||||
call UnivPhotoFit()
|
||||
goto 21
|
||||
endif
|
||||
do 22 i22=1,3
|
||||
Freeiphotolimit(22)=i22
|
||||
if(nFreePoints.eq.22)then
|
||||
call UnivPhotoFit()
|
||||
goto 22
|
||||
endif
|
||||
do 23 i23=1,3
|
||||
Freeiphotolimit(23)=i23
|
||||
if(nFreePoints.eq.23)then
|
||||
call UnivPhotoFit()
|
||||
goto 23
|
||||
endif
|
||||
do 24 i24=1,3
|
||||
Freeiphotolimit(24)=i24
|
||||
if(nFreePoints.eq.24)then
|
||||
call UnivPhotoFit()
|
||||
goto 24
|
||||
endif
|
||||
do 25 i25=1,3
|
||||
Freeiphotolimit(25)=i25
|
||||
if(nFreePoints.eq.25)then
|
||||
call UnivPhotoFit()
|
||||
goto 25
|
||||
endif
|
||||
do 26 i26=1,3
|
||||
Freeiphotolimit(26)=i26
|
||||
if(nFreePoints.eq.26)then
|
||||
call UnivPhotoFit()
|
||||
goto 26
|
||||
endif
|
||||
do 27 i27=1,3
|
||||
Freeiphotolimit(27)=i27
|
||||
if(nFreePoints.eq.27)then
|
||||
call UnivPhotoFit()
|
||||
goto 27
|
||||
endif
|
||||
do 28 i28=1,3
|
||||
Freeiphotolimit(28)=i28
|
||||
if(nFreePoints.eq.28)then
|
||||
call UnivPhotoFit()
|
||||
goto 28
|
||||
endif
|
||||
do 29 i29=1,3
|
||||
Freeiphotolimit(29)=i29
|
||||
if(nFreePoints.eq.29)then
|
||||
call UnivPhotoFit()
|
||||
goto 29
|
||||
endif
|
||||
do 30 i30=1,3
|
||||
Freeiphotolimit(30)=i30
|
||||
if(nFreePoints.eq.30)then
|
||||
call UnivPhotoFit()
|
||||
goto 30
|
||||
endif
|
||||
do 31 i31=1,3
|
||||
Freeiphotolimit(31)=i31
|
||||
if(nFreePoints.eq.31)then
|
||||
call UnivPhotoFit()
|
||||
goto 31
|
||||
endif
|
||||
do 32 i32=1,3
|
||||
Freeiphotolimit(32)=i32
|
||||
if(nFreePoints.eq.32)then
|
||||
call UnivPhotoFit()
|
||||
goto 32
|
||||
endif
|
||||
do 33 i33=1,3
|
||||
Freeiphotolimit(33)=i33
|
||||
if(nFreePoints.eq.33)then
|
||||
call UnivPhotoFit()
|
||||
goto 33
|
||||
endif
|
||||
do 34 i34=1,3
|
||||
Freeiphotolimit(34)=i34
|
||||
if(nFreePoints.eq.34)then
|
||||
call UnivPhotoFit()
|
||||
goto 34
|
||||
endif
|
||||
do 35 i35=1,3
|
||||
Freeiphotolimit(35)=i35
|
||||
if(nFreePoints.eq.35)then
|
||||
call UnivPhotoFit()
|
||||
goto 35
|
||||
endif
|
||||
do 36 i36=1,3
|
||||
Freeiphotolimit(36)=i36
|
||||
if(nFreePoints.eq.36)then
|
||||
call UnivPhotoFit()
|
||||
goto 36
|
||||
endif
|
||||
do 37 i37=1,3
|
||||
Freeiphotolimit(37)=i37
|
||||
if(nFreePoints.eq.37)then
|
||||
call UnivPhotoFit()
|
||||
goto 37
|
||||
endif
|
||||
do 38 i38=1,3
|
||||
Freeiphotolimit(38)=i38
|
||||
if(nFreePoints.eq.38)then
|
||||
call UnivPhotoFit()
|
||||
goto 38
|
||||
endif
|
||||
do 39 i39=1,3
|
||||
Freeiphotolimit(39)=i39
|
||||
if(nFreePoints.eq.39)then
|
||||
call UnivPhotoFit()
|
||||
goto 39
|
||||
endif
|
||||
do 40 i40=1,3
|
||||
Freeiphotolimit(40)=i40
|
||||
if(nFreePoints.eq.40)then
|
||||
call UnivPhotoFit()
|
||||
goto 40
|
||||
endif
|
||||
do 41 i41=1,3
|
||||
Freeiphotolimit(41)=i41
|
||||
if(nFreePoints.eq.41)then
|
||||
call UnivPhotoFit()
|
||||
goto 41
|
||||
endif
|
||||
do 42 i42=1,3
|
||||
Freeiphotolimit(42)=i42
|
||||
if(nFreePoints.eq.42)then
|
||||
call UnivPhotoFit()
|
||||
goto 42
|
||||
endif
|
||||
do 43 i43=1,3
|
||||
Freeiphotolimit(43)=i43
|
||||
if(nFreePoints.eq.43)then
|
||||
call UnivPhotoFit()
|
||||
goto 43
|
||||
endif
|
||||
do 44 i44=1,3
|
||||
Freeiphotolimit(44)=i44
|
||||
if(nFreePoints.eq.44)then
|
||||
call UnivPhotoFit()
|
||||
goto 44
|
||||
endif
|
||||
do 45 i45=1,3
|
||||
Freeiphotolimit(45)=i45
|
||||
if(nFreePoints.eq.45)then
|
||||
call UnivPhotoFit()
|
||||
goto 45
|
||||
endif
|
||||
do 46 i46=1,3
|
||||
Freeiphotolimit(46)=i46
|
||||
if(nFreePoints.eq.46)then
|
||||
call UnivPhotoFit()
|
||||
goto 46
|
||||
endif
|
||||
do 47 i47=1,3
|
||||
Freeiphotolimit(47)=i47
|
||||
if(nFreePoints.eq.47)then
|
||||
call UnivPhotoFit()
|
||||
goto 47
|
||||
endif
|
||||
do 48 i48=1,3
|
||||
Freeiphotolimit(48)=i48
|
||||
if(nFreePoints.eq.48)then
|
||||
call UnivPhotoFit()
|
||||
goto 48
|
||||
endif
|
||||
do 49 i49=1,3
|
||||
Freeiphotolimit(49)=i49
|
||||
if(nFreePoints.eq.49)then
|
||||
call UnivPhotoFit()
|
||||
goto 49
|
||||
endif
|
||||
do 50 i50=1,3
|
||||
Freeiphotolimit(50)=i50
|
||||
if(nFreePoints.eq.50)then
|
||||
call UnivPhotoFit()
|
||||
goto 50
|
||||
endif
|
||||
50 continue
|
||||
49 continue
|
||||
48 continue
|
||||
47 continue
|
||||
46 continue
|
||||
45 continue
|
||||
44 continue
|
||||
43 continue
|
||||
42 continue
|
||||
41 continue
|
||||
40 continue
|
||||
39 continue
|
||||
38 continue
|
||||
37 continue
|
||||
36 continue
|
||||
35 continue
|
||||
34 continue
|
||||
33 continue
|
||||
32 continue
|
||||
31 continue
|
||||
30 continue
|
||||
29 continue
|
||||
28 continue
|
||||
27 continue
|
||||
26 continue
|
||||
25 continue
|
||||
24 continue
|
||||
23 continue
|
||||
22 continue
|
||||
21 continue
|
||||
20 continue
|
||||
19 continue
|
||||
18 continue
|
||||
17 continue
|
||||
16 continue
|
||||
15 continue
|
||||
14 continue
|
||||
13 continue
|
||||
12 continue
|
||||
11 continue
|
||||
10 continue
|
||||
9 continue
|
||||
8 continue
|
||||
7 continue
|
||||
6 continue
|
||||
5 continue
|
||||
4 continue
|
||||
3 continue
|
||||
2 continue
|
||||
1 continue
|
||||
return
|
||||
end subroutine FreeCombinatorial
|
||||
@@ -0,0 +1,587 @@
|
||||
!We consider four types of leaf gas exchange measurements. These four types must be clearly indicated in the input:
|
||||
!1. Points whose limitation states are known from other means (e.g. chlorophyll fluorescence): these points will be called fixed points and
|
||||
! their limitation states will not be changed by the parameter estimation program.
|
||||
!2. Points from conventional CO2 response measurements (A/Ci curves) that are done without fluorescence. Limitation states are not known but follow
|
||||
! the order of Rubisco, RuBP and TPU along the CO2i axis as suggested in Gu et al. (2010) PCE paper. We call these points ACi points.
|
||||
! The ACi points must be already ordered from low to high CO2i.
|
||||
!3. Points from conventional light response measurements (A/PAR curves) that are done without fluorescence. Limitation states are not known but follow
|
||||
! the order of RuBP, Rubisco and TPU along the PAR axis. We call these points ALight points. The ALight points must be already ordered from low to high PAR.
|
||||
!4. Points whose limitation states follow no order. We call these points free points. They are obtained with no control of environmental conditions.
|
||||
subroutine HybridCombinatorial()
|
||||
implicit none
|
||||
include '../testarea/LeafGasParams.h'
|
||||
include '../testarea/LeafGasHybridFit.h'
|
||||
integer i,ilastrubis1,ilastrubp1,ilastrubis2,ilastrubp2,
|
||||
&ilastrubis3,ilastrubp3,ilastrubis4,ilastrubp4,
|
||||
&ilastrubis5,ilastrubp5,ilastrubis6,ilastrubp6,
|
||||
&ilastrubis7,ilastrubp7,ilastrubis8,ilastrubp8,
|
||||
&ilastrubis9,ilastrubp9,ilastrubis10,ilastrubp10,
|
||||
&ilastrubis11,ilastrubp11,ilastrubis12,ilastrubp12,
|
||||
&ilastrubis13,ilastrubp13,ilastrubis14,ilastrubp14,
|
||||
&ilastrubis15,ilastrubp15,k1,k2,k3,k4,k5,k6,k7,k8,
|
||||
&k9,k10,k11,k12,k13,k14,k15,ilasttpu1,ilasttpu2,
|
||||
&ilasttpu3,ilasttpu4,ilasttpu5,ilasttpu6,ilasttpu7,
|
||||
&ilasttpu8,ilasttpu9,ilasttpu10,ilasttpu11,ilasttpu12,
|
||||
&ilasttpu13,ilasttpu14,ilasttpu15
|
||||
double precision rdlight,atp,resistwp,resistch,stargamma,
|
||||
&realizedfjelect,term
|
||||
!
|
||||
!common block variables:idokco,idoalpha,minimumrubis,minimumfj,minimumvt,nACiPoints,ACiiphotolimit(nACiPoints)
|
||||
minimumfj=3
|
||||
if(idokc.eq.0.and.idoko.eq.0)then
|
||||
minimumrubis=3
|
||||
else
|
||||
if(idokc.eq.0.or.idoko.eq.0)then
|
||||
minimumrubis=4
|
||||
else
|
||||
minimumrubis=5
|
||||
endif
|
||||
endif
|
||||
if((nFixedPoints+numACicurves+nFreePoints).eq.0)minimumrubis=2
|
||||
if(idoalpha.eq.0)then
|
||||
minimumvt=2
|
||||
else
|
||||
minimumvt=3
|
||||
endif
|
||||
i=0
|
||||
do k1=1,numACicurves
|
||||
do k2=nendaci(k1)+1,nACiPoints(k1)
|
||||
i=i+1
|
||||
enddo
|
||||
enddo
|
||||
if(i.gt.0)minimumvt=i
|
||||
!
|
||||
ntotunivparams=13
|
||||
univparamsmin(1)=resistwp25min
|
||||
univparamsmax(1)=resistwp25max
|
||||
univparamsmin(2)=resistch25min
|
||||
univparamsmax(2)=resistch25max
|
||||
univparamsmin(3)=rdlight25min
|
||||
univparamsmax(3)=rdlight25max
|
||||
univparamsmin(4)=stargamma25min
|
||||
univparamsmax(4)=stargamma25max
|
||||
univparamsmin(5)=vcmax25min
|
||||
univparamsmax(5)=vcmax25max
|
||||
univparamsmin(6)=fkc25min
|
||||
univparamsmax(6)=fkc25max
|
||||
univparamsmin(7)=fko25min
|
||||
univparamsmax(7)=fko25max
|
||||
univparamsmin(8)=fjmax25min
|
||||
univparamsmax(8)=fjmax25max
|
||||
univparamsmin(9)=tpu25min
|
||||
univparamsmax(9)=tpu25max
|
||||
univparamsmin(10)=alpha25min
|
||||
univparamsmax(10)=alpha25max
|
||||
univparamsmin(11)=phifactormin
|
||||
univparamsmax(11)=phifactormax
|
||||
univparamsmin(12)=thetafactormin
|
||||
univparamsmax(12)=thetafactormax
|
||||
univparamsmin(13)=betaPSIImin
|
||||
univparamsmax(13)=betaPSIImax
|
||||
|
||||
bestilimittype=-9999
|
||||
do ilastrubis1=1,7
|
||||
subbestsumsquare(ilastrubis1)=1.0d+100
|
||||
subbestunivparams(1,ilastrubis1)=resistwp25_ori
|
||||
subbestunivparams(2,ilastrubis1)=resistch25_ori
|
||||
subbestunivparams(3,ilastrubis1)=rdlight25_ori
|
||||
subbestunivparams(4,ilastrubis1)=stargamma25_ori
|
||||
subbestunivparams(5,ilastrubis1)=vcmax25_ori
|
||||
subbestunivparams(6,ilastrubis1)=fkc25_ori
|
||||
subbestunivparams(7,ilastrubis1)=fko25_ori
|
||||
subbestunivparams(8,ilastrubis1)=fjmax25_ori
|
||||
subbestunivparams(9,ilastrubis1)=tpu25_ori
|
||||
subbestunivparams(10,ilastrubis1)=alpha25_ori
|
||||
subbestunivparams(11,ilastrubis1)=phifactor_ori
|
||||
subbestunivparams(12,ilastrubis1)=thetafactor_ori
|
||||
subbestunivparams(13,ilastrubis1)=betaPSII_ori
|
||||
do i=1,ntotsamples
|
||||
subbestiphotolimit(i,ilastrubis1)=-9999
|
||||
enddo
|
||||
enddo
|
||||
do i=1,ntotsamples
|
||||
forcings(i,1)=pco2i_ori(i)
|
||||
forcings(i,2)=aPPFDlf_ori(i)
|
||||
forcings(i,3)=templeaf_ori(i)
|
||||
forcings(i,4)=po2i_ori(i)
|
||||
responses(i,1)=anet_obs(i)
|
||||
weitforcings(i,1)=1.0d0
|
||||
weitforcings(i,2)=1.0d0
|
||||
weitforcings(i,3)=1.0d0
|
||||
weitforcings(i,4)=1.0d0
|
||||
weitresponses(i,1)=1.0d0
|
||||
if(ntotphips2.ge.1)then
|
||||
if(chlflphips2_ori(i).gt.0.0d0)then
|
||||
!for least square regression
|
||||
responses(i,2)=chlflphips2_ori(i)
|
||||
!a factor of 50 makes PhiPSII comparable to Anet in magnitude
|
||||
weitresponses(i,2)=50.0d0
|
||||
else
|
||||
responses(i,2)=chlflphips2_ori(i)
|
||||
weitresponses(i,2)=0.0d0
|
||||
endif
|
||||
endif
|
||||
if(Prioriknowlimit.eq.-1)then
|
||||
!fluorescence fit only. chlflphips2 becomes a response variable
|
||||
forcings(i,5)=chlflphips2_ori(i)
|
||||
weitforcings(i,5)=1.0d0
|
||||
if(chlflphips2_ori(i).le.0.0d0)then
|
||||
weitforcings(i,5)=0.0d0
|
||||
weitresponses(i,1)=0.0d0
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
do i=1,12
|
||||
gacontrol(i)=-1.0d0
|
||||
enddo
|
||||
gacontrol(1)=250.0d0
|
||||
gacontrol(2)=5000.0d0
|
||||
gacontrol(3)=8.0d0
|
||||
|
||||
!Priorilimittype: indicator for the choice of overall mixtures of limitation types
|
||||
! = 1, Rubisco+RuBP+TPU
|
||||
! = 2, Rubisco+RuBP
|
||||
! = 3, Rubisco+TPU
|
||||
! = 4, RuBP+TPU
|
||||
! = 5, Rubisco Only
|
||||
! = 6, RuBP Only
|
||||
! = 7, TPU Only
|
||||
|
||||
!Prioriknowlimit: indicator for how the limitation type of each point is set before the fitting
|
||||
! = 0, the limitation type of each individual point has not been pre-set when mixed
|
||||
! limitation states are present in the dataset. When Priorilimittype = 5, 6, 7,
|
||||
! all points are limited by one type.
|
||||
! = 1, the limit type of each individual point has been pre-set. Don't allow the fitting
|
||||
! algorithm to change the limitation type of each point during the first fit. But
|
||||
! check the admissibility after the first fit. If the admissibility is violated,
|
||||
! treat the osicilation points as colimited; if there is no osicilation, use the penalty
|
||||
! approach to refit.
|
||||
! = 2, the limit type of each individual point has been pre-set. Allow the fitting
|
||||
! algorithm to change the limitation type of each point during the fit. Penalize any fit
|
||||
! that results in any point to have a limitation type different from the pre-set type.
|
||||
! =-1, only do a fluorescence fit
|
||||
!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
if(Prioriknowlimit.eq.-1)then
|
||||
!fluorescence only fit
|
||||
Priorilimittype=6
|
||||
Currentilimittype=Priorilimittype
|
||||
Currentiknowlimit=Prioriknowlimit
|
||||
!we pass UnivPhotoFit and call DoUnivPhotoFit directly
|
||||
call DoUnivPhotoFit()
|
||||
if(numALightcurves.gt.0.and.idorch.eq.1)then
|
||||
call fluorescencejmax()
|
||||
endif
|
||||
return
|
||||
endif
|
||||
!$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
Prioriknowlimit=0
|
||||
bestsumsquare=1.0d+100
|
||||
do Priorilimittype=1,7
|
||||
call UnivPhotoFit()
|
||||
if(subbestsumsquare(Priorilimittype).le.bestsumsquare)then
|
||||
bestilimittype=Priorilimittype
|
||||
bestsumsquare=subbestsumsquare(Priorilimittype)
|
||||
do i=1,ntotunivparams
|
||||
bestunivparams(i)=subbestunivparams(i,Priorilimittype)
|
||||
enddo
|
||||
do i=1,ntotsamples
|
||||
bestiphotolimit(i)=subbestiphotolimit(i,Priorilimittype)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
! goto 1000
|
||||
bestilimittype=-9999
|
||||
Prioriknowlimit=1
|
||||
Priorilimittype=-9999
|
||||
!
|
||||
c gacontrol( 1) - number of individuals in a population (default
|
||||
c is 100)
|
||||
c gacontrol( 2) - number of generations over which solution is
|
||||
c to evolve (default is 500)
|
||||
c gacontrol( 3) - number of significant digits (i.e., number of
|
||||
c genes) retained in chromosomal encoding (default
|
||||
c is 6) (Note: This number is limited by the
|
||||
c machine floating point precision. Most 32-bit
|
||||
c floating point representations have only 6 full
|
||||
c digits of precision. To achieve greater preci-
|
||||
c sion this routine could be converted to double
|
||||
c precision, but note that this would also require
|
||||
c a double precision random number generator, which
|
||||
c likely would not have more than 9 digits of
|
||||
c precision if it used 4-byte integers internally.)
|
||||
c gacontrol( 4) - crossover probability; must be <= 1.0 (default
|
||||
c is 0.85). If crossover takes place, either one
|
||||
c or two splicing points are used, with equal
|
||||
c probabilities
|
||||
c gacontrol( 5) - mutation mode; 1/2/3/4/5 (default is 2)
|
||||
c 1=one-point mutation, fixed rate
|
||||
c 2=one-point, adjustable rate based on fitness
|
||||
c 3=one-point, adjustable rate based on distance
|
||||
c 4=one-point+creep, fixed rate
|
||||
c 5=one-point+creep, adjustable rate based on fitness
|
||||
c 6=one-point+creep, adjustable rate based on distance
|
||||
c gacontrol( 6) - initial mutation rate; should be small (default
|
||||
c is 0.005) (Note: the mutation rate is the proba-
|
||||
c bility that any one gene locus will mutate in
|
||||
c any one generation.)
|
||||
c gacontrol( 7) - minimum mutation rate; must be >= 0.0 (default
|
||||
c is 0.0005)
|
||||
c gacontrol( 8) - maximum mutation rate; must be <= 1.0 (default
|
||||
c is 0.25)
|
||||
c gacontrol( 9) - relative fitness differential; range from 0
|
||||
c (none) to 1 (maximum). (default is 1.)
|
||||
c gacontrol(10) - reproduction plan; 1/2/3=Full generational
|
||||
c replacement/Steady-state-replace-random/Steady-
|
||||
c state-replace-worst (default is 3)
|
||||
c gacontrol(11) - elitism flag; 0/1=off/on (default is 0)
|
||||
c (Applies only to reproduction plans 1 and 2)
|
||||
c gacontrol(12) - printed output 0/1/2=None/Minimal/Verbose
|
||||
c (default is 0)
|
||||
c
|
||||
if(numACicurves.eq.0)then
|
||||
!no conventional A/Ci curves. go to light response curves directly.
|
||||
call ALightCombinatorial()
|
||||
goto 1000
|
||||
endif
|
||||
!Assume rubisco, rubp and tpu limitations in the order of (rubisco, rubp, tpu) but any limitation can be missing in any ACi curves.
|
||||
!The nACiPoints points of each ACi curve must have been already ordered from low to high Ci within each individual ACi curve.
|
||||
do ilastrubis1=0,nendaci(1)
|
||||
do i=1,ilastrubis1
|
||||
ACiiphotolimit(i,1)=1
|
||||
enddo
|
||||
k1=max0(nstartaci(1)-1,ilastrubis1)
|
||||
do 1 ilasttpu1=k1,nendaci(1)
|
||||
do i=ilasttpu1+1,nACiPoints(1)
|
||||
ACiiphotolimit(i,1)=3
|
||||
enddo
|
||||
do i=ilastrubis1+1,ilasttpu1
|
||||
ACiiphotolimit(i,1)=2
|
||||
enddo
|
||||
if(numACicurves.eq.1)then
|
||||
call ALightCombinatorial()
|
||||
goto 1
|
||||
endif
|
||||
|
||||
do ilastrubis2=0,nendaci(2)
|
||||
do i=1,ilastrubis2
|
||||
ACiiphotolimit(i,2)=1
|
||||
enddo
|
||||
k2=max0(nstartaci(2)-1,ilastrubis2)
|
||||
do 2 ilasttpu2=k2,nendaci(2)
|
||||
do i=ilasttpu2+1,nACiPoints(2)
|
||||
ACiiphotolimit(i,2)=3
|
||||
enddo
|
||||
do i=ilastrubis2+1,ilasttpu2
|
||||
ACiiphotolimit(i,2)=2
|
||||
enddo
|
||||
if(numACicurves.eq.2)then
|
||||
call ALightCombinatorial()
|
||||
goto 2
|
||||
endif
|
||||
|
||||
do ilastrubis3=0,nendaci(3)
|
||||
do i=1,ilastrubis3
|
||||
ACiiphotolimit(i,3)=1
|
||||
enddo
|
||||
k3=max0(nstartaci(3)-1,ilastrubis3)
|
||||
do 3 ilasttpu3=k3,nendaci(3)
|
||||
do i=ilasttpu3+1,nACiPoints(3)
|
||||
ACiiphotolimit(i,3)=3
|
||||
enddo
|
||||
do i=ilastrubis3+1,ilasttpu3
|
||||
ACiiphotolimit(i,3)=2
|
||||
enddo
|
||||
if(numACicurves.eq.3)then
|
||||
call ALightCombinatorial()
|
||||
goto 3
|
||||
endif
|
||||
|
||||
do ilastrubis4=0,nendaci(4)
|
||||
do i=1,ilastrubis4
|
||||
ACiiphotolimit(i,4)=1
|
||||
enddo
|
||||
k4=max0(nstartaci(4)-1,ilastrubis4)
|
||||
do 4 ilasttpu4=k4,nendaci(4)
|
||||
do i=ilasttpu4+1,nACiPoints(4)
|
||||
ACiiphotolimit(i,4)=3
|
||||
enddo
|
||||
do i=ilastrubis4+1,ilasttpu4
|
||||
ACiiphotolimit(i,4)=2
|
||||
enddo
|
||||
if(numACicurves.eq.4)then
|
||||
call ALightCombinatorial()
|
||||
goto 4
|
||||
endif
|
||||
|
||||
do ilastrubis5=0,nendaci(5)
|
||||
do i=1,ilastrubis5
|
||||
ACiiphotolimit(i,5)=1
|
||||
enddo
|
||||
k5=max0(nstartaci(5)-1,ilastrubis5)
|
||||
do 5 ilasttpu5=k5,nendaci(5)
|
||||
do i=ilasttpu5+1,nACiPoints(5)
|
||||
ACiiphotolimit(i,5)=3
|
||||
enddo
|
||||
do i=ilastrubis5+1,ilasttpu5
|
||||
ACiiphotolimit(i,5)=2
|
||||
enddo
|
||||
if(numACicurves.eq.5)then
|
||||
call ALightCombinatorial()
|
||||
goto 5
|
||||
endif
|
||||
|
||||
do ilastrubis6=0,nendaci(6)
|
||||
do i=1,ilastrubis6
|
||||
ACiiphotolimit(i,6)=1
|
||||
enddo
|
||||
k6=max0(nstartaci(6)-1,ilastrubis6)
|
||||
do 6 ilasttpu6=k6,nendaci(6)
|
||||
do i=ilasttpu6+1,nACiPoints(6)
|
||||
ACiiphotolimit(i,6)=3
|
||||
enddo
|
||||
do i=ilastrubis6+1,ilasttpu6
|
||||
ACiiphotolimit(i,6)=2
|
||||
enddo
|
||||
if(numACicurves.eq.6)then
|
||||
call ALightCombinatorial()
|
||||
goto 6
|
||||
endif
|
||||
|
||||
do ilastrubis7=0,nendaci(7)
|
||||
do i=1,ilastrubis7
|
||||
ACiiphotolimit(i,7)=1
|
||||
enddo
|
||||
k7=max0(nstartaci(7)-1,ilastrubis7)
|
||||
do 7 ilasttpu7=k7,nendaci(7)
|
||||
do i=ilasttpu7+1,nACiPoints(7)
|
||||
ACiiphotolimit(i,7)=3
|
||||
enddo
|
||||
do i=ilastrubis7+1,ilasttpu7
|
||||
ACiiphotolimit(i,7)=2
|
||||
enddo
|
||||
if(numACicurves.eq.7)then
|
||||
call ALightCombinatorial()
|
||||
goto 7
|
||||
endif
|
||||
|
||||
do ilastrubis8=0,nendaci(8)
|
||||
do i=1,ilastrubis8
|
||||
ACiiphotolimit(i,8)=1
|
||||
enddo
|
||||
k8=max0(nstartaci(8)-1,ilastrubis8)
|
||||
do 8 ilasttpu8=k8,nendaci(8)
|
||||
do i=ilasttpu8+1,nACiPoints(8)
|
||||
ACiiphotolimit(i,8)=3
|
||||
enddo
|
||||
do i=ilastrubis8+1,ilasttpu8
|
||||
ACiiphotolimit(i,8)=2
|
||||
enddo
|
||||
if(numACicurves.eq.8)then
|
||||
call ALightCombinatorial()
|
||||
goto 8
|
||||
endif
|
||||
|
||||
do ilastrubis9=0,nendaci(9)
|
||||
do i=1,ilastrubis9
|
||||
ACiiphotolimit(i,9)=1
|
||||
enddo
|
||||
k9=max0(nstartaci(9)-1,ilastrubis9)
|
||||
do 9 ilasttpu9=k9,nendaci(9)
|
||||
do i=ilasttpu9+1,nACiPoints(9)
|
||||
ACiiphotolimit(i,9)=3
|
||||
enddo
|
||||
do i=ilastrubis9+1,ilasttpu9
|
||||
ACiiphotolimit(i,9)=2
|
||||
enddo
|
||||
if(numACicurves.eq.9)then
|
||||
call ALightCombinatorial()
|
||||
goto 9
|
||||
endif
|
||||
|
||||
do ilastrubis10=0,nendaci(10)
|
||||
do i=1,ilastrubis10
|
||||
ACiiphotolimit(i,10)=1
|
||||
enddo
|
||||
k10=max0(nstartaci(10)-1,ilastrubis10)
|
||||
do 10 ilasttpu10=k10,nendaci(10)
|
||||
do i=ilasttpu10+1,nACiPoints(10)
|
||||
ACiiphotolimit(i,10)=3
|
||||
enddo
|
||||
do i=ilastrubis10+1,ilasttpu10
|
||||
ACiiphotolimit(i,10)=2
|
||||
enddo
|
||||
if(numACicurves.eq.10)then
|
||||
call ALightCombinatorial()
|
||||
goto 10
|
||||
endif
|
||||
|
||||
do ilastrubis11=0,nendaci(11)
|
||||
do i=1,ilastrubis11
|
||||
ACiiphotolimit(i,11)=1
|
||||
enddo
|
||||
k11=max0(nstartaci(11)-1,ilastrubis11)
|
||||
do 11 ilasttpu11=k11,nendaci(11)
|
||||
do i=ilasttpu11+1,nACiPoints(11)
|
||||
ACiiphotolimit(i,11)=3
|
||||
enddo
|
||||
do i=ilastrubis11+1,ilasttpu11
|
||||
ACiiphotolimit(i,11)=2
|
||||
enddo
|
||||
if(numACicurves.eq.11)then
|
||||
call ALightCombinatorial()
|
||||
goto 11
|
||||
endif
|
||||
|
||||
do ilastrubis12=0,nendaci(12)
|
||||
do i=1,ilastrubis12
|
||||
ACiiphotolimit(i,12)=1
|
||||
enddo
|
||||
k12=max0(nstartaci(12)-1,ilastrubis12)
|
||||
do 12 ilasttpu12=k12,nendaci(12)
|
||||
do i=ilasttpu12+1,nACiPoints(12)
|
||||
ACiiphotolimit(i,12)=3
|
||||
enddo
|
||||
do i=ilastrubis12+1,ilasttpu12
|
||||
ACiiphotolimit(i,12)=2
|
||||
enddo
|
||||
if(numACicurves.eq.12)then
|
||||
call ALightCombinatorial()
|
||||
goto 12
|
||||
endif
|
||||
|
||||
do ilastrubis13=0,nendaci(13)
|
||||
do i=1,ilastrubis13
|
||||
ACiiphotolimit(i,13)=1
|
||||
enddo
|
||||
k13=max0(nstartaci(13)-1,ilastrubis13)
|
||||
do 13 ilasttpu13=k13,nendaci(13)
|
||||
do i=ilasttpu13+1,nACiPoints(13)
|
||||
ACiiphotolimit(i,13)=3
|
||||
enddo
|
||||
do i=ilastrubis13+1,ilasttpu13
|
||||
ACiiphotolimit(i,13)=2
|
||||
enddo
|
||||
if(numACicurves.eq.13)then
|
||||
call ALightCombinatorial()
|
||||
goto 13
|
||||
endif
|
||||
|
||||
do ilastrubis14=0,nendaci(14)
|
||||
do i=1,ilastrubis14
|
||||
ACiiphotolimit(i,14)=1
|
||||
enddo
|
||||
k14=max0(nstartaci(14)-1,ilastrubis14)
|
||||
do 14 ilasttpu14=k14,nendaci(14)
|
||||
do i=ilasttpu14+1,nACiPoints(14)
|
||||
ACiiphotolimit(i,14)=3
|
||||
enddo
|
||||
do i=ilastrubis14+1,ilasttpu14
|
||||
ACiiphotolimit(i,14)=2
|
||||
enddo
|
||||
if(numACicurves.eq.14)then
|
||||
call ALightCombinatorial()
|
||||
goto 14
|
||||
endif
|
||||
|
||||
do ilastrubis15=0,nendaci(15)
|
||||
do i=1,ilastrubis15
|
||||
ACiiphotolimit(i,15)=1
|
||||
enddo
|
||||
k15=max0(nstartaci(15)-1,ilastrubis15)
|
||||
do 15 ilasttpu15=k15,nendaci(15)
|
||||
do i=ilasttpu15+1,nACiPoints(15)
|
||||
ACiiphotolimit(i,15)=3
|
||||
enddo
|
||||
do i=ilastrubis15+1,ilasttpu15
|
||||
ACiiphotolimit(i,15)=2
|
||||
enddo
|
||||
if(numACicurves.eq.15)then
|
||||
call ALightCombinatorial()
|
||||
goto 15
|
||||
endif
|
||||
15 continue
|
||||
enddo
|
||||
14 continue
|
||||
enddo
|
||||
13 continue
|
||||
enddo
|
||||
12 continue
|
||||
enddo
|
||||
11 continue
|
||||
enddo
|
||||
10 continue
|
||||
enddo
|
||||
9 continue
|
||||
enddo
|
||||
8 continue
|
||||
enddo
|
||||
7 continue
|
||||
enddo
|
||||
6 continue
|
||||
enddo
|
||||
5 continue
|
||||
enddo
|
||||
4 continue
|
||||
enddo
|
||||
3 continue
|
||||
enddo
|
||||
2 continue
|
||||
enddo
|
||||
1 continue
|
||||
enddo
|
||||
bestsumsquare=1.0d+100
|
||||
do Priorilimittype=1,7
|
||||
if(subbestsumsquare(Priorilimittype).le.bestsumsquare)then
|
||||
bestilimittype=Priorilimittype
|
||||
bestsumsquare=subbestsumsquare(Priorilimittype)
|
||||
do i=1,ntotunivparams
|
||||
bestunivparams(i)=subbestunivparams(i,Priorilimittype)
|
||||
enddo
|
||||
do i=1,ntotsamples
|
||||
bestiphotolimit(i)=subbestiphotolimit(i,Priorilimittype)
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
1000 do i=1,ntotunivparams
|
||||
univparams(i)=bestunivparams(i)
|
||||
enddo
|
||||
call UnivParamsAlloc(2)
|
||||
call ilimittypestats(ntotsamples,bestiphotolimit,
|
||||
&bestilimittype,bestnumrubis,bestnumrubp,bestnumtpu)
|
||||
if(bestnumrubis.eq.0)then
|
||||
vcmax25=-9999
|
||||
if(idokc.eq.1)fkc25=-9999.0d0
|
||||
if(idoko.eq.1)fko25=-9999.0d0
|
||||
endif
|
||||
if(bestnumrubp.eq.0)fjmax25=-9999
|
||||
if(bestnumtpu.eq.0)then
|
||||
tpu25=-9999
|
||||
if(idoalpha.eq.1)alpha25=-9999
|
||||
endif
|
||||
do i=1,ntotsamples
|
||||
ilastrubp1=bestiphotolimit(i)+4
|
||||
call leafunivphotosyn(Prioriknowlimit,ilastrubp1,ifitmode,
|
||||
&aPPFDlf(i),templeaf(i),pco2i(i),po2i(i),chlflphips2(i),
|
||||
&anet_obs(i),weitresponses(i:i,1:1),weitresponses(i:i,1:1),
|
||||
&weitresponses(i:i,2:2),weitresponses(i:i,1:1),
|
||||
&pco2i_pred(i),anet_pred(i),Postiphotolimit(i),pco2c(i),
|
||||
&PhiPSII_pred(i),anet_pred_flu(i),pco2i_pred_flu(i),
|
||||
&pco2c_anet_flu(i),pco2c_pco2i_flu(i),term)
|
||||
if(chlflphips2(i).lt.0.0d0)then
|
||||
anet_pred_flu(i)=-9999.0d0
|
||||
pco2i_pred_flu(i)=-9999.0d0
|
||||
pco2c_anet_flu(i)=-9999.0d0
|
||||
pco2c_pco2i_flu(i)=-9999.0d0
|
||||
else
|
||||
if(iabs(ifitmode).eq.1)then
|
||||
pco2i_pred_flu(i)=-9999.0d0
|
||||
pco2c_pco2i_flu(i)=-9999.0d0
|
||||
endif
|
||||
if(iabs(ifitmode).eq.2)then
|
||||
anet_pred_flu(i)=-9999.0d0
|
||||
pco2c_anet_flu(i)=-9999.0d0
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
return
|
||||
end subroutine HybridCombinatorial
|
||||
Reference in New Issue
Block a user