- Timestamp:
- Aug 2, 2024, 2:12:03 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_stats.F90
r5099 r5158 81 81 r = 0._wp 82 82 83 doi=1,Npoints83 DO i=1,Npoints 84 84 ! Calculate tops and bottoms of new and old grids 85 85 oldgrid_bot = zhalf(i,:) … … 88 88 l = 0 ! Index of level in the old grid 89 89 ! Loop over levels in the new grid 90 dok = 1,Nglevels90 DO k = 1,Nglevels 91 91 Nw = 0 ! Number of weigths 92 92 wt = 0._wp ! Sum of weights 93 93 ! Loop over levels in the old grid and accumulate total for weighted average 94 do94 DO 95 95 l = l + 1 96 96 w = 0.0 ! Initialise weight to 0 … … 119 119 Nw = Nw + 1 120 120 wt = wt + w 121 doj=1,Ncolumns121 DO j=1,Ncolumns 122 122 if (lunits) then 123 123 if (y(i,j,l) /= R_UNDEF) then … … 138 138 ! Calculate average in new grid 139 139 if (Nw > 0) then 140 doj=1,Ncolumns140 DO j=1,Ncolumns 141 141 r(i,j,k) = r(i,j,k)/wt 142 142 enddo … … 146 146 147 147 ! Set points under surface to R_UNDEF, and change to dBZ if necessary 148 dok=1,Nglevels149 doj=1,Ncolumns150 doi=1,Npoints148 DO k=1,Nglevels 149 DO j=1,Ncolumns 150 DO i=1,Npoints 151 151 if (newgrid_top(k) > zhalf(i,1)) then ! Level above model bottom level 152 152 if (lunits) then … … 202 202 radar_tcc = 0._wp 203 203 radar_tcc2 = 0._wp 204 dopr=1,Npoints205 doi=1,Ncolumns204 DO pr=1,Npoints 205 DO i=1,Ncolumns 206 206 flag_sat = 0 207 207 flag_cld = 0 … … 210 210 ! look for j_1km from bottom to top 211 211 j = 1 212 dowhile (Ze_tot(pr,i,j) .eq. R_GROUND)212 DO while (Ze_tot(pr,i,j) .eq. R_GROUND) 213 213 j = j+1 214 214 enddo 215 215 j_1km = j+1 !this is the vertical index of 1km above surface 216 216 217 doj=1,Nlevels217 DO j=1,Nlevels 218 218 sc_ratio = beta_tot(pr,i,j)/beta_mol(pr,j) 219 219 if ((sc_ratio .le. s_att) .and. (flag_sat .eq. 0)) flag_sat = j … … 266 266 integer :: ij 267 267 268 do ij=2,Nbins+1268 DO ij=2,Nbins+1 269 269 hist1D(ij-1) = count(var .ge. bins(ij-1) .and. var .lt. bins(ij)) 270 270 if (count(var .eq. R_GROUND) .ge. 1) hist1D(ij-1)=R_UNDEF … … 298 298 integer :: ij,ik 299 299 300 doij=2,nbin1+1301 doik=2,nbin2+1300 DO ij=2,nbin1+1 301 DO ik=2,nbin2+1 302 302 jointHist(ij-1,ik-1)=count(var1 .ge. bin1(ij-1) .and. var1 .lt. bin1(ij) .and. & 303 303 var2 .ge. bin2(ik-1) .and. var2 .lt. bin2(ik))
Note: See TracChangeset
for help on using the changeset viewer.