Changeset 96 for palm/trunk/SOURCE/flow_statistics.f90
 Timestamp:
 Jun 4, 2007 8:07:41 AM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/flow_statistics.f90
r94 r96 4 4 ! Actual revisions: 5 5 !  6 ! Calculation of Deardorff velocity scale adjusted to be used with the ocean 6 ! Statistics for ocean version (salinity, density) added, 7 ! calculation of Deardorff velocity scale adjusted to be used with the ocean 7 8 ! version (HAS STILL TO BE COMPLETED!!!) 8 9 ! … … 123 124 ENDDO 124 125 ENDDO 126 127 ! 128 ! Horizontally averaged profile of salinity 129 IF ( ocean ) THEN 130 !$OMP DO 131 DO i = nxl, nxr 132 DO j = nys, nyn 133 DO k = nzb_s_outer(j,i), nzt+1 134 sums_l(k,23,tn) = sums_l(k,23,tn) + & 135 sa(k,j,i) * rmask(j,i,sr) 136 ENDDO 137 ENDDO 138 ENDDO 139 ENDIF 125 140 126 141 ! … … 177 192 sums_l(:,2,0) = sums_l(:,2,0) + sums_l(:,2,i) 178 193 sums_l(:,4,0) = sums_l(:,4,0) + sums_l(:,4,i) 194 IF ( ocean ) THEN 195 sums_l(:,23,0) = sums_l(:,23,0) + sums_l(:,23,i) 196 ENDIF 179 197 IF ( humidity ) THEN 180 198 sums_l(:,41,0) = sums_l(:,41,0) + sums_l(:,41,i) … … 200 218 CALL MPI_ALLREDUCE( sums_l(nzb,4,0), sums(nzb,4), nzt+2nzb, MPI_REAL, & 201 219 MPI_SUM, comm2d, ierr ) 220 IF ( ocean ) THEN 221 CALL MPI_ALLREDUCE( sums_l(nzb,23,0), sums(nzb,23), nzt+2nzb, & 222 MPI_REAL, MPI_SUM, comm2d, ierr ) 223 ENDIF 202 224 IF ( humidity ) THEN 203 225 CALL MPI_ALLREDUCE( sums_l(nzb,44,0), sums(nzb,44), nzt+2nzb, & … … 221 243 sums(:,2) = sums_l(:,2,0) 222 244 sums(:,4) = sums_l(:,4,0) 245 IF ( ocean ) sums(:,23) = sums_l(:,23,0) 223 246 IF ( humidity ) THEN 224 247 sums(:,44) = sums_l(:,44,0) … … 241 264 hom(:,1,2,sr) = sums(:,2) ! v 242 265 hom(:,1,4,sr) = sums(:,4) ! pt 266 267 ! 268 ! Salinity 269 IF ( ocean ) THEN 270 sums(:,23) = sums(:,23) / ngp_2dh_outer(:,sr) 271 hom(:,1,23,sr) = sums(:,23) ! sa 272 ENDIF 243 273 244 274 ! … … 377 407 378 408 ! 409 ! Salinity flux w"sa" 410 IF ( ocean ) THEN 411 sums_l(k,65,tn) = sums_l(k,65,tn) & 412  0.5 * ( kh(k,j,i) + kh(k+1,j,i) ) & 413 * ( sa(k+1,j,i)  sa(k,j,i) ) & 414 * ddzu(k+1) * rmask(j,i,sr) 415 ENDIF 416 417 ! 379 418 ! Buoyancy flux, water flux (humidity flux) w"q" 380 419 IF ( humidity ) THEN … … 420 459 sums_l(nzb,61,tn) = sums_l(nzb,61,tn) + & 421 460 0.0 * rmask(j,i,sr) ! v"pt" 461 IF ( ocean ) THEN 462 sums_l(nzb,65,tn) = sums_l(nzb,65,tn) + & 463 saswsb(j,i) * rmask(j,i,sr) ! w"sa" 464 ENDIF 422 465 IF ( humidity ) THEN 423 466 sums_l(nzb,48,tn) = sums_l(nzb,48,tn) + & … … 450 493 sums_l(nzt,61,tn) = sums_l(nzt,61,tn) + & 451 494 0.0 * rmask(j,i,sr) ! v"pt" 495 IF ( ocean ) THEN 496 sums_l(nzt,65,tn) = sums_l(nzt,65,tn) + & 497 saswst(j,i) * rmask(j,i,sr) ! w"sa" 498 ENDIF 452 499 IF ( humidity ) THEN 453 500 sums_l(nzt,48,tn) = sums_l(nzt,48,tn) + & … … 508 555 sums_l(k,36,tn) = sums_l(k,36,tn) + pts**2 * w(k,j,i) * & 509 556 rmask(j,i,sr) 557 558 ! 559 ! Salinity flux and density (density does not belong to here, 560 ! but so far there is no suitable place to calculate) 561 IF ( ocean ) THEN 562 pts = 0.5 * ( sa(k,j,i)  hom(k,1,23,sr) + & 563 sa(k+1,j,i)  hom(k+1,1,23,sr) ) 564 sums_l(k,66,tn) = sums_l(k,66,tn) + pts * w(k,j,i) * & 565 rmask(j,i,sr) 566 sums_l(k,64,tn) = sums_l(k,64,tn) + rho(k,j,i) * & 567 rmask(j,i,sr) 568 ENDIF 510 569 511 570 ! … … 739 798 hom(:,1,21,sr) = sums(:,21) ! w*pt*BC 740 799 hom(:,1,22,sr) = sums(:,16) + sums(:,21) ! wptBC 741 ! profiles 2329 left empty for initial 800 ! profile 24 is initial profile (sa) 801 ! profiles 2529 left empty for initial 742 802 ! profiles 743 803 hom(:,1,30,sr) = sums(:,30) ! u*2 … … 771 831 hom(:,1,62,sr) = sums(:,62) ! v*pt* 772 832 hom(:,1,63,sr) = sums(:,61) + sums(:,62) ! vpt_t 833 hom(:,1,64,sr) = sums(:,64) ! rho 834 hom(:,1,65,sr) = sums(:,65) ! w"sa" 835 hom(:,1,66,sr) = sums(:,66) ! w*sa* 836 hom(:,1,67,sr) = sums(:,65) + sums(:,66) ! wsa 773 837 774 838 hom(:,1,pr_palm1,sr) = sums(:,pr_palm1)
Note: See TracChangeset
for help on using the changeset viewer.