60 INTEGER :: ireg, ilev, iregbin
62 TYPE(t_region
) :: region
68 CHARACTER(CHRLEN) :: rcsidentstring
69 CHARACTER(CHRLEN+4) :: fname
71 INTEGER :: errorflag, ndimplag
72 INTEGER :: pidini,regini,
icell,indexi,indexj,indexk
74 INTEGER :: icontal,icontalox
75 INTEGER,
POINTER :: cvmass(:)
76 INTEGER,
POINTER :: aiv(:,:)
77 INTEGER,
DIMENSION(0:500) :: sizebin
79 REAL(RFREAL) :: diammicron,deltay,xposplag,yposplag,yposplagshift
80 REAL(RFREAL) :: massl,yheight,yheightchan,yheightnozz,yheightmin
81 REAL(RFREAL) :: xminrange
82 REAL(RFREAL),
DIMENSION(0:500) :: compalbin,compaloxbin,diam32bin,diam43bin,&
83 diam2bin,diam3bin,diam4bin,massalbin, &
84 massaloxbin,masstotbin,uvelbin,vvelbin, &
85 volbin,wvelbin,xmombin,ybin,ymombin,zmombin
86 REAL(RFREAL),
POINTER :: cv(:,:), dv(:,:)
92 rcsidentstring =
'$RCSfile: PLAG_BinSortSpatialDist.F90,v $ $Revision: 1.3 $'
94 global => region%global
96 CALL
registerfunction( global,
'PLAG_BinSortSpatialDist',
'PLAG_BinSortSpatialDist.F90' )
100 ndimplag = region%levels(ilev)%plag%nPcls
103 diam2bin(0:500) = 0.0_rfreal
104 diam3bin(0:500) = 0.0_rfreal
105 diam4bin(0:500) = 0.0_rfreal
106 diam32bin(0:500) = 0.0_rfreal
107 diam43bin(0:500) = 0.0_rfreal
113 compalbin(0:500) = 0.0_rfreal
114 compaloxbin(0:500) = 0.0_rfreal
116 massalbin(0:500) = 0.0_rfreal
117 massaloxbin(0:500) = 0.0_rfreal
118 masstotbin(0:500) = 0.0_rfreal
119 volbin(0:500) = 0.0_rfreal
121 uvelbin(0:500) = 0.0_rfreal
122 vvelbin(0:500) = 0.0_rfreal
123 wvelbin(0:500) = 0.0_rfreal
125 xmombin(0:500) = 0.0_rfreal
126 ymombin(0:500) = 0.0_rfreal
127 zmombin(0:500) = 0.0_rfreal
129 IF (ireg /= iregbin) goto 1999
131 print*,
'PLAG_BinSortSpatialDist: iRegBin, nDimPlag = ',iregbin,ndimplag
137 yheightchan = 0.09_rfreal
138 yheightnozz = 0.0481267_rfreal
140 SELECT CASE (iregbin)
142 yheight = yheightchan
143 yheightmin = 0.0_rfreal
144 xminrange = 0.0_rfreal
147 yheight = yheightnozz
148 yheightmin = 0.0209367_rfreal
149 xminrange = 0.465_rfreal
155 deltay = yheight/
REAL(nbins,kind=rfreal)
159 ybin(
i) = ybin(
i-1) +deltay
164 aiv => region%levels(ilev)%plag%aiv
165 cv => region%levels(ilev)%plag%cv
166 dv => region%levels(ilev)%plag%dv
167 cvmass => region%levels(ilev)%plag%cvPlagMass
172 xposplag = cv(cv_plag_xpos,
i)
174 IF ( xposplag >= xminrange )
THEN
175 yposplag = cv(cv_plag_ypos,
i)
176 yposplagshift = yposplag -yheightmin
178 ibin=nint(yposplagshift/deltay)
179 sizebin(ibin) = sizebin(ibin)+1
181 diammicron = dv(dv_plag_diam,
i)*1.0e+06_rfreal
182 massl =
sum( cv(cvmass(:),
i) )
184 massalbin(ibin) = massalbin(ibin) +cv(cvmass(icontal),
i)
185 massaloxbin(ibin) = massaloxbin(ibin) +cv(cvmass(icontalox),
i)
186 masstotbin(ibin) = masstotbin(ibin) +massl
187 diam2bin(ibin) = diam2bin(ibin) +diammicron**2
188 diam3bin(ibin) = diam3bin(ibin) +diammicron**3
189 diam4bin(ibin) = diam4bin(ibin) +diammicron**4
191 xmombin(ibin) = xmombin(ibin) +cv(cv_plag_xmom,
i)
192 ymombin(ibin) = ymombin(ibin) +cv(cv_plag_ymom,
i)
193 zmombin(ibin) = zmombin(ibin) +cv(cv_plag_zmom,
i)
198 IF ( sizebin(ibin) > 0 )
THEN
199 compalbin(ibin) = massalbin(ibin)/masstotbin(ibin)
200 compaloxbin(ibin) = massaloxbin(ibin)/masstotbin(ibin)
202 diam43bin(ibin) = diam4bin(ibin)/diam3bin(ibin)
203 diam32bin(ibin) = diam3bin(ibin)/diam2bin(ibin)
205 uvelbin(ibin) = xmombin(ibin)/masstotbin(ibin)
206 vvelbin(ibin) = ymombin(ibin)/masstotbin(ibin)
207 wvelbin(ibin) = zmombin(ibin)/masstotbin(ibin)
213 WRITE(fname,
'(A,I2,A,1PE11.5,A)') &
214 trim(global%casename)//
'.plag_ydist_bin_reg_',iregbin,
'_',global%currentTime,
'.dat'
215 OPEN(if_plot,file=fname,
status=
'unknown',
form=
'formatted',iostat=errorflag)
216 global%error = errorflag
217 IF (global%error /= 0) CALL
errorstop( global,err_file_open,__line__,fname )
219 IF (global%currentTime <= 0._rfreal)
THEN
220 WRITE(if_plot,1005,err=10) trim(global%casename),global%timeStamp
222 WRITE(if_plot,1005,err=10) trim(global%casename),global%currentTime
225 WRITE(if_plot,1010,err=10)
'iBin yBin size compAl compAlOx diam32 diam43 u v w'
227 WRITE(if_plot,1015) iregbin, nbins
230 WRITE(if_plot,1020,err=10) ibin,(ybin(ibin)-yheightmin)/yheight,sizebin(ibin),&
231 nint(compalbin(ibin)*100.0_rfreal),&
232 nint(compaloxbin(ibin)*100.0_rfreal), &
233 nint(diam32bin(ibin)),nint(diam43bin(ibin)),&
234 uvelbin(ibin),vvelbin(ibin),wvelbin(ibin)
239 CLOSE(if_plot,iostat=errorflag)
240 global%error = errorflag
241 IF (global%error /= 0) CALL
errorstop( global,err_file_close,__line__,fname )
245 WRITE(fname,
'(A,I2,A,1PE11.5,A)') &
246 trim(global%casename)//
'.plag_cv_ydist_bin_reg_',iregbin,
'_',global%currentTime,
'.dat'
247 OPEN(if_plot,file=fname,
status=
'unknown',
form=
'formatted',iostat=errorflag)
248 global%error = errorflag
249 IF (global%error /= 0) CALL
errorstop( global,err_file_open,__line__,fname )
251 IF (global%currentTime <= 0._rfreal)
THEN
252 WRITE(if_plot,1005,err=10) trim(global%casename),global%timeStamp
254 WRITE(if_plot,1005,err=10) trim(global%casename),global%currentTime
257 WRITE(if_plot,1010,err=10)
'iBin yBin size massAl massAlOxBin massTot diam2 diam3 diam4 xMom yMom zMom '
259 WRITE(if_plot,1015) iregbin, nbins
262 WRITE(if_plot,1030,err=10) ibin,(ybin(ibin)-yheightmin)/yheight,sizebin(ibin),&
263 massalbin(ibin),massaloxbin(ibin),masstotbin(ibin),&
264 diam2bin(ibin),diam3bin(ibin),diam4bin(ibin),&
265 xmombin(ibin),ymombin(ibin),zmombin(ibin)
270 CLOSE(if_plot,iostat=errorflag)
271 global%error = errorflag
272 IF (global%error /= 0) CALL
errorstop( global,err_file_close,__line__,fname )
279 CALL
errorstop( global,err_file_write,__line__,fname )
283 1005
FORMAT(
'TITLE="',
a,
'. Time: ',1pe11.5,
'."')
284 1010
FORMAT(
'VARIABLES= ',
a)
285 1015
FORMAT(
'ZONE T="',i5.5,
'", I=',i10,
', F=POINT')
286 1020
FORMAT(1
x,i5,1
x,1pe12.5,5(1
x,i5),3(1
x,1pe12.5))
287 1030
FORMAT(1
x,i5,1
x,1pe12.5,1
x,i5,9(1
x,1e23.16))
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine registerfunction(global, funName, fileName)
int status() const
Obtain the status of the attribute.
subroutine plag_binsortspatialdist(iReg, iLev, region, iRegBin)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE icell
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)