[go: up one dir, main page]

Menu

[r34]: / civ2 / rd_corr.f90  Maximize  Restore  History

Download this file

153 lines (123 with data), 4.1 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
subroutine rd_corr
! 17/02/2003 : ADD CONVECT FLOW
use modresultats
use modgrille
use modvsv
use modnetcdf
cptnul=0
nbFvect=0
nbMasked=0
nbAvgLessThan=0
nbAvgNull=0
nbAvgLessThanANDMaxCorrLessThan=0
nbInstable=0
nbIsTooSmall=0
nbInstableHart=0
nbInstableHartBis=0
nbHartPrefered=0
nbHartCorrTooLow=0
nbCptError=0
nbDiffCIV2CIV1=0
!goto 1001
! ADD THE NULL VECTORS
nb_vectors2=nbnodes+cpt2
allocate(VD2(nb_vectors2,6))
VD2=0.
VD2(1:nbnodes,1:2)=grille(:,1:2)
VD2(1:nbnodes,3:5)=grille(:,4:6)
VD2(1:nbnodes,6)=grille(:,3)
!grille(:,3)=0
!VD2(1:nbnodes,3)=grille0(:,3)
!VD2(1:nbnodes,1:4)=grille0(1:nbnodes,1:4)
!do i=1,nbnodes
! if(VD2(i,3)>0) then
! print*,"U>0 ",VD2(i,1:3)
! endif
! print*,VD2(i,3:4),grille(i,4:6),pixcmx,dt2
!enddo
!!!!!!!!!! PROBLEM OF SIGN +- U,V + convect flow
!goto 444
print*,'PIXCM',pixcmx,pixcmy,pixcmx_out,pixcmy_out
pixcmx_out=pixcmx
pixcmy_out=pixcmy
VD2(1:nbnodes,1)=(VD2(1:nbnodes,1)+VD2(1:nbnodes,3)/2.)/pixcmx_out
VD2(1:nbnodes,2)=(VD2(1:nbnodes,2)+VD2(1:nbnodes,4)/2.)/pixcmy_out
VD2(1:nbnodes,3)=VD2(1:nbnodes,3)/pixcmx/dt2
VD2(1:nbnodes,4)=VD2(1:nbnodes,4)/pixcmy/dt2
!ADD NULL VECTORS (MASKED)
444 continue
do i=1,cpt2
VD2(nbnodes+i,1)=grilletmp2(i,1)/pixcmx_out
VD2(nbnodes+i,2)=grilletmp2(i,2)/pixcmy_out
VD2(nbnodes+i,3:6)=(/0.,0.,1.,0./)
enddo
nbnodes=nbnodes+cpt2
!do i=1,nbnodes
! print*,VD2(i,3:4)
!enddo
!goto 1001
do i=1,nbnodes
! print*,VD2(i,3:4)
!grille(i,3)=1.
!goto 1002
!if((abs(grille(i,4))>30.).or.(abs(grille(i,5))>30.)) grille(i,3)=2
if((grille(i,3)==0.).or.(grille(i,3)==4).or.(grille(i,3)==4)) grille(i,6)=0.
if (grille(i,3)==4.) grille(i,6)=1.
if( (floor(grille(i,3))==3).or.((hole).and.((grille(i,3)==-2.).or.(grille(i,3)==4.)))) then !.or.(grille(i,3)==0.)) then
cptnul=cptnul+1
! grille(i,6)=0.
endif
if(grille(i,3)==0) nbMasked=nbMasked+1
if(grille(i,3)==3) nbAvgLessThan=nbAvgLessThan+1
if(grille(i,3)==3.1) nbAvgNull=nbAvgNull+1
if(grille(i,3)==3.2) nbAvgLessThanANDMAxCorrLessThan=nbAvgLessThanANDMaxCorrLessThan+1
if(grille(i,3)==3.3) nbInstable=nbInstable+1
if(grille(i,3)==-2.)then
! Print*,'Rarely this vectors are false'
ppp=ppp+1
grille(i,6)=0.
nbIsTooSmall=nbIsTooSmall+1
endif
if(grille(i,3)==9) nbInstableHart=nbInstableHart+1
if(grille(i,3)==9.1) nbInstableHartBis=nbInstableHartBis+1
if(grille(i,3)==4) nbDiffCIV2CIV1=nbDiffCIV2CIV1+1
if(grille(i,3)==4.1) nbCptError=nbCptError+1
!if(grille(i,3)==2.) cptnul=cptnul+1 !grille(i,6)=0.75
!if(grille(i,3)==-2.) then
! grille(i,6)=0.75
! print*,'putain ca chie ',i
!endif
1002 continue
enddo
1001 continue
!print*,mg,ng,cptnul,666
if(nbMasked/=0) print*,"nbMasked = ",nbMasked
if(nbAvgLessThan/=0) print*,"nbAvgLessThan = ",nbAvgLessThan
if(nbAvgNull/=0) print*,"nbAvgNull = ",nbAvgNull
if(nbAvgLessThanANDMaxCorrLessThan/=0) print*,"nbAvgLessThanANDMaxCorrLessThan = ",nbAvgLessThanANDMaxCorrLessThan
if(nbInstable/=0) print*,"nbInstable = ",nbInstable
if(nbIsTooSmall/=0) print*,"nbIsTooSmall = ",nbIsTooSmall
if(nbInstableHart/=0) print*,"nbInstableHart = ",nbInstableHart
if(nbInstableHartBis/=0) print*,"nbInstableHartBis = ",nbInstableHartBis
if(nbCptError/=0) print*,"nbCptError = ",nbCptError
if(nbDiffCIV2CIV1/=0) print*,"nbDiffCIV2CIV1 = ",nbDiffCIV2CIV1
return
end
! GRILLE(I,3) EXPLANATIONS :
!
! THIS VALUE IS USED TO KNOW THE LOCAL STATE OF THE NODE, AND KNOW HOW IT HAS SUPPORTED THE DIFFERENT
! CONDITIONNAL ESTIMATIONS
!
! GRILLE2 (INITIAL CONDITIONS)
! IF MASKED (HARD) THEN GRILLE(I,3)==0.
! IF MASKED (SOFT) THEN GRILLE(I,3)==3.
! IF NON MASKED THEN GRILLE(I,3)== -1.
! XCORR IF ARMS(LOCAL A||B BOX)==0. THEN GRILLE(I,3)== 3.
! FIND PEAK
! IF INSTABLE (MAXIMUM IS OUTSIDE !!!!) THEN GRILLE(I,3)== 3.
! IF CLOSE TO THE BORDER THEN GRILLE(I,3)== -2.
! IF EVERYTHING IS FINE THEN GRILLE(I,3)== 1.
! IF THE DIFFERENCE BETWEEN THE ESTIMATOR AND THE RESULT IS MORE THAN 1 PIXEL THEN GRILLE(I,3)== 4.
! RD_CORR
! IF HOLE THEN REMOVE VECTORS FLAGED WITH -2 || 4.
! ALWAYS REMOVE VECTORS FLAGED WITH 3.