Changeset 13888
- Timestamp:
- 2020-11-26T16:27:57+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r2052_ENHANCE-09_rbourdal_massfluxconvection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r2052_ENHANCE-09_rbourdal_massfluxconvection/src/OCE/TRA/eosbn2.F90
r13826 r13888 602 602 ! 603 603 END SELECT 604 !RBB IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=prd, clinfo1=' eos-pot: ', tab2d_2=prhop, clinfo2=' pot : ', kdim=1 ) 604 ! 605 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=prhop, clinfo1=' eos-pot: ' ) 605 606 ! 606 607 IF( ln_timing ) CALL timing_stop('eos-pot') -
NEMO/branches/2020/dev_r2052_ENHANCE-09_rbourdal_massfluxconvection/src/OCE/ZDF/zdfmfc.F90
r13832 r13888 158 158 ! Initialisation of prognostic variables 159 159 !------------------------------------------- 160 zrwp (:,:,:) = 0. ; zrwp2(:,:,:) = 0. ; zedmf(:,:,:) = 0.161 zph (:,:) = 0. ; zphm1(:,:) = 0. ; zphpm1(:,:) = 0.162 ztsp(:,:,:,:)= 0. 160 zrwp (:,:,:) = 0._wp ; zrwp2(:,:,:) = 0._wp ; zedmf(:,:,:) = 0._wp 161 zph (:,:) = 0._wp ; zphm1(:,:) = 0._wp ; zphpm1(:,:) = 0._wp 162 ztsp(:,:,:,:)= 0._wp 163 163 164 164 ! Tracers inside plume (ztsp) and environment (ztse) … … 175 175 !------------------------------------------- 176 176 zhcmo(:,:) = e3t(:,:,1,Kmm) 177 zfbuo(:,:) = 0. 177 zfbuo(:,:) = 0._wp 178 178 WHERE ( ABS(zrautb(:,:)) > 1.e-20 ) zfbuo(:,:) = & 179 179 & grav * ( 2.e-4_wp *zfnet(:,:) - 7.6E-4_wp*pts(:,:,1,jp_sal,Kmm)*zsws(:,:)/zrautb(:,:)) * zhcmo(:,:) … … 192 192 zrwp(:,:,1) = zwpsurf(:,:) 193 193 zrwp2(:,:,1) = zwpsurf(:,:)**2 194 zepsT(:,:,:) = 0.001 195 zepsW(:,:,:) = 0.001 194 zepsT(:,:,:) = 0.001_wp 195 zepsW(:,:,:) = 0.001_wp 196 196 197 197 … … 208 208 ! Compute the buoyancy acceleration on T-points at jk-1 209 209 zrautbm1(:,:) = zrautb(:,:) 210 !CALL eos( pts (:,:,jk-1,:,Kmm) , zrautbm1(:,:) )211 210 CALL eos( pts (:,:,jk ,:,Kmm) , zrautb(:,:) ) 212 211 CALL eos( ztsp(:,:,jk-1,: ) , zraupl(:,:) ) … … 231 230 232 231 ! Non-hydrostatic pressure terms in the wp2 equation 233 zcnh = 0.2 232 zcnh = 0.2_wp 234 233 znum = 0.5_wp + zcnh - & 235 234 (zcnh*grav*zraupl(ji,jj)/zph(ji,jj)+zcb*zepsW(ji,jj,jk-1)) & … … 261 260 IF (zxl .LT. 0._wp) THEN 262 261 zctre = -1.*rn_cap*zxl 263 zcdet = 0. 262 zcdet = 0._wp 264 263 ELSE 265 zctre = 0. 264 zctre = 0._wp 266 265 zcdet = rn_cap*zxl 267 266 END IF … … 281 280 ! Compute Entrainment coefficient 282 281 IF(rn_cemf .GT. 0.) THEN 283 zxw = 0.5 *(zrwp(ji,jj,jk-1)+ zrwp(ji,jj,jk) )284 zepsT(ji,jj,jk) = 0.01 282 zxw = 0.5_wp*(zrwp(ji,jj,jk-1)+ zrwp(ji,jj,jk) ) 283 zepsT(ji,jj,jk) = 0.01_wp 285 284 IF( zxw > 0. ) THEN 286 285 zepsT(ji,jj,jk) = zepsT(ji,jj,jk) + & 287 & 1.*ABS( zrwp(ji,jj,jk-1)-zrwp(ji,jj,jk) ) &286 & ABS( zrwp(ji,jj,jk-1)-zrwp(ji,jj,jk) ) & 288 287 & / ( e3t(ji,jj,jk-1,Kmm) * zxw ) 289 288 zepsT(ji,jj,jk) = zepsT(ji,jj,jk) * rn_cemf * wmask(ji,jj,jk) … … 303 302 ! Compute the plume properties on T-points 304 303 !--------------------------------------------------------------- 305 IF(zrwp (ji,jj,jk) .LT. 1.e-12 .AND. zrwp (ji,jj,jk-1) .LT. 1.e-12) THEN304 IF(zrwp (ji,jj,jk) .LT. 1.e-12_wp .AND. zrwp (ji,jj,jk-1) .LT. 1.e-12_wp) THEN 306 305 ztsp(ji,jj,jk-1,jp_tem) = pts(ji,jj,jk-1,jp_tem,Kmm) 307 306 ztsp(ji,jj,jk-1,jp_sal) = pts(ji,jj,jk-1,jp_sal,Kmm) … … 324 323 ! Compute Mass Flux on T-point 325 324 DO jk=1,jpk-1 326 edmfm(:,:,jk) = (zedmf(:,:,jk+1) + zedmf(:,:,jk) )*0.5 325 edmfm(:,:,jk) = (zedmf(:,:,jk+1) + zedmf(:,:,jk) )*0.5_wp 327 326 END DO 328 327 edmfm(:,:,jpk) = zedmf(:,:,jpk) … … 339 338 ! Computation of a tridiagonal matrix and right hand side terms of the linear system 340 339 !================================================================================= 341 edmfa(:,:,:) = 0. 342 edmfb(:,:,:) = 0. 343 edmfc(:,:,:) = 0. 344 edmftra(:,:,:,:) = 0. 340 edmfa(:,:,:) = 0._wp 341 edmfb(:,:,:) = 0._wp 342 edmfc(:,:,:) = 0._wp 343 edmftra(:,:,:,:) = 0._wp 345 344 346 345 !--------------------------------------------------------------- … … 348 347 !--------------------------------------------------------------- 349 348 DO jk=1,jpk-1 350 edmfa(:,:,jk) = 0. 349 edmfa(:,:,jk) = 0._wp 351 350 edmfb(:,:,jk) = -edmfm(:,:,jk ) / e3w(:,:,jk+1,Kmm) 352 351 edmfc(:,:,jk) = edmfm(:,:,jk+1) / e3w(:,:,jk+1,Kmm) … … 354 353 edmfa(:,:,jpk) = -edmfm(:,:,jpk-1) / e3w(:,:,jpk,Kmm) 355 354 edmfb(:,:,jpk) = edmfm(:,:,jpk ) / e3w(:,:,jpk,Kmm) 356 edmfc(:,:,jpk) = 0. 355 edmfc(:,:,jpk) = 0._wp 357 356 358 357 !--------------------------------------------------------------- … … 461 460 !* allocate edmf arrays 462 461 IF( zdf_mfc_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'zdf_edmf_init : unable to allocate arrays' ) 463 edmfa(:,:,:) = 0. 464 edmfb(:,:,:) = 0. 465 edmfc(:,:,:) = 0. 466 edmftra(:,:,:,:) = 0. 462 edmfa(:,:,:) = 0._wp 463 edmfb(:,:,:) = 0._wp 464 edmfc(:,:,:) = 0._wp 465 edmftra(:,:,:,:) = 0._wp 467 466 ! 468 467 END SUBROUTINE zdf_mfc_init -
NEMO/branches/2020/dev_r2052_ENHANCE-09_rbourdal_massfluxconvection/tests/ISOMIP+/MY_SRC/eosbn2.F90
r13583 r13888 55 55 ! !! * Interface 56 56 INTERFACE eos 57 MODULE PROCEDURE eos_insitu, eos_insitu_pot, eos_insitu_2d 57 MODULE PROCEDURE eos_insitu, eos_insitu_pot, eos_insitu_2d, eos_insitu_pot_2d 58 58 END INTERFACE 59 59 ! … … 587 587 588 588 589 SUBROUTINE eos_insitu_pot_2d( pts, prhop ) 590 !!---------------------------------------------------------------------- 591 !! *** ROUTINE eos_insitu_pot *** 592 !! 593 !! ** Purpose : Compute the in situ density (ratio rho/rho0) and the 594 !! potential volumic mass (Kg/m3) from potential temperature and 595 !! salinity fields using an equation of state selected in the 596 !! namelist. 597 !! 598 !! ** Action : 599 !! - prhop, the potential volumic mass (Kg/m3) 600 !! 601 !!---------------------------------------------------------------------- 602 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: pts ! 1 : potential temperature [Celsius] 603 ! ! 2 : salinity [psu] 604 REAL(wp), DIMENSION(jpi,jpj ), INTENT( out) :: prhop ! potential density (surface referenced) 605 ! 606 INTEGER :: ji, jj, jk, jsmp ! dummy loop indices 607 INTEGER :: jdof 608 REAL(wp) :: zt , zh , zstemp, zs , ztm ! local scalars 609 REAL(wp) :: zn , zn0, zn1, zn2, zn3 ! - - 610 REAL(wp), DIMENSION(:), ALLOCATABLE :: zn0_sto, zn_sto, zsign ! local vectors 611 !!---------------------------------------------------------------------- 612 ! 613 IF( ln_timing ) CALL timing_start('eos-pot') 614 ! 615 SELECT CASE ( neos ) 616 ! 617 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 618 ! 619 DO_2D( 1, 1, 1, 1 ) 620 ! 621 zt = pts (ji,jj,jp_tem) * r1_T0 ! temperature 622 zs = SQRT( ABS( pts(ji,jj,jp_sal) + rdeltaS ) * r1_S0 ) ! square root salinity 623 ztm = tmask(ji,jj,1) ! tmask 624 ! 625 zn0 = (((((EOS060*zt & 626 & + EOS150*zs+EOS050)*zt & 627 & + (EOS240*zs+EOS140)*zs+EOS040)*zt & 628 & + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt & 629 & + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt & 630 & + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt & 631 & + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 632 ! 633 ! 634 prhop(ji,jj) = zn0 * ztm ! potential density referenced at the surface 635 ! 636 END_2D 637 638 CASE( np_seos ) !== simplified EOS ==! 639 ! 640 DO_2D( 1, 1, 1, 1 ) 641 zt = pts (ji,jj,jp_tem) - 10._wp 642 zs = pts (ji,jj,jp_sal) - 35._wp 643 ztm = tmask(ji,jj,1) 644 ! ! potential density referenced at the surface 645 zn = - rn_a0 * ( 1._wp + 0.5_wp*rn_lambda1*zt ) * zt & 646 & + rn_b0 * ( 1._wp - 0.5_wp*rn_lambda2*zs ) * zs & 647 & - rn_nu * zt * zs 648 prhop(ji,jj) = ( rho0 + zn ) * ztm 649 ! 650 END_2D 651 ! 652 CASE( np_leos ) !== ISOMIP EOS ==! 653 ! 654 DO_2D( 1, 1, 1, 1 ) 655 ! 656 zt = pts (ji,jj,jp_tem) - (-1._wp) 657 zs = pts (ji,jj,jp_sal) - 34.2_wp 658 !zh = pdep (ji,jj) ! depth at the partial step level 659 ! 660 zn = rho0 * ( - rn_a0 * zt + rn_b0 * zs ) 661 ! 662 prhop(ji,jj) = zn * r1_rho0 ! unmasked in situ density anomaly 663 ! 664 END_2D 665 ! 666 END SELECT 667 ! 668 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab2d_1=prhop, clinfo1=' eos-pot: ' ) 669 ! 670 IF( ln_timing ) CALL timing_stop('eos-pot') 671 ! 672 END SUBROUTINE eos_insitu_pot_2d 673 674 589 675 SUBROUTINE rab_3d( pts, pab, Kmm ) 590 676 !!----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.