- Timestamp:
- 2020-04-03T18:22:05+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12377_KERNEL-06_techene_e3/src/OCE/DOM/domqe.F90
r12644 r12679 45 45 PUBLIC dom_qe_sf_update ! called by steplf.F90 46 46 PUBLIC dom_h_nxt ! called by steplf.F90 47 PUBLIC dom_h_update ! called by steplf.F9048 47 PUBLIC dom_qe_r3c ! called by steplf.F90 49 48 … … 441 440 ! 442 441 END SUBROUTINE dom_qe_sf_update 443 444 445 SUBROUTINE dom_h_update( kt, Kbb, Kmm, Kaa )446 !!----------------------------------------------------------------------447 !! *** ROUTINE dom_qe_sf_update ***448 !!449 !! ** Purpose : for z tilde case: compute time filter and swap of scale factors450 !! compute all depths and related variables for next time step451 !! write outputs and restart file452 !!453 !! ** Method : - reconstruct scale factor at other grid points (interpolate)454 !! - recompute depths and water height fields455 !!456 !! ** Action : - Recompute:457 !! gdept(:,:,:,Kmm), gdepw(:,:,:,Kmm) and gde3w458 !! h(u/v) and h(u/v)r459 !!460 !! Reference : Leclair, M., and G. Madec, 2009, Ocean Modelling.461 !! Leclair, M., and G. Madec, 2011, Ocean Modelling.462 !!----------------------------------------------------------------------463 INTEGER, INTENT( in ) :: kt ! time step464 INTEGER, INTENT( in ) :: Kbb, Kmm, Kaa ! time level indices465 !466 INTEGER :: ji, jj, jk ! dummy loop indices467 REAL(wp) :: zcoef ! local scalar468 !!----------------------------------------------------------------------469 !470 IF( ln_linssh ) RETURN ! No calculation in linear free surface471 !472 IF( ln_timing ) CALL timing_start('dom_qe_sf_update')473 !474 IF( kt == nit000 ) THEN475 IF(lwp) WRITE(numout,*)476 IF(lwp) WRITE(numout,*) 'dom_qe_sf_update : - interpolate scale factors and compute depths for next time step'477 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~'478 ENDIF479 !480 ! Compute all missing vertical scale factor and depths481 ! ====================================================482 ! Horizontal scale factor interpolations483 ! --------------------------------------484 ! - JC - hu(:,:,:,Kbb), hv(:,:,:,:,Kbb), hur_b, hvr_b also485 486 IF( ln_isf ) THEN !** IceShelF cavities487 ! ! to be created depending of the new names in isf488 ! ! it should be something like that : (with h_isf = thickness of iceshelf)489 ! ! in fact currently, h_isf(:,:) is called : risfdep(:,:)490 !!gm - depth idea 0 : just realize that mask is not needed ===>>>> with ISF, rescale all grid point position below ISF : no mask !491 gdept(:,:,1,Kmm) = gdept_0(:,:,1) * ( 1._wp + r3t(:,:,Kmm) )492 gdepw(:,:,1,Kmm) = 0._wp ! Initialized to zero one for all493 gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm) ! reference to a common level z=0 for hpg494 DO jk = 2, jpk495 gdept(:,:,jk,Kmm) = MIN( risfdep(:,:) , gdept_0(:,:,jk) ) &496 + MAX( 0._wp , gdept_0(:,:,jk)-risfdep(:,:) ) * ( 1._wp + r3t(:,:,Kmm) )497 gdepw(:,:,jk,Kmm) = MIN( risfdep(:,:) , gdepw_0(:,:,jk) ) &498 + MAX( 0._wp , gdepw_0(:,:,jk)-risfdep(:,:) ) * ( 1._wp + r3t(:,:,Kmm) )499 gde3w(:,:,jk) = gdept(:,:,jk,Kmm) - ssh(:,:,Kmm)500 gdept(:,:,jk,Kbb) = MIN( risfdep(:,:) , gdept_0(:,:,jk) ) &501 + MAX( 0._wp , gdept_0(:,:,jk)-risfdep(:,:) ) * ( 1._wp + r3t(:,:,Kbb) )502 gdepw(:,:,jk,Kbb) = MIN( risfdep(:,:) , gdepw_0(:,:,jk) ) &503 + MAX( 0._wp , gdepw_0(:,:,jk)-risfdep(:,:) ) * ( 1._wp + r3t(:,:,Kbb) )504 END DO505 !506 ELSE !** No cavities (all depth rescaled, even inside topography: no mask)507 !508 !!gm idea 0 : just realize that mask is not needed ===>>>> without ISF, rescale all grid point position : no mask !509 DO jk = 1, jpk510 gdept(:,:,jk,Kmm) = gdept_0(:,:,jk) * ( 1._wp + r3t(:,:,Kmm) )511 gdepw(:,:,jk,Kmm) = gdepw_0(:,:,jk) * ( 1._wp + r3t(:,:,Kmm) )512 gde3w(:,:,jk) = gdept (:,:,jk,Kmm) - ssh(:,:,Kmm)513 gdept(:,:,jk,Kbb) = gdept_0(:,:,jk) * ( 1._wp + r3t(:,:,Kbb) )514 gdepw(:,:,jk,Kbb) = gdepw_0(:,:,jk) * ( 1._wp + r3t(:,:,Kbb) )515 END DO516 !517 ENDIF518 519 ! Local depth and Inverse of the local depth of the water520 ! -------------------------------------------------------521 !522 ht(:,:) = ht_0(:,:) + ssh(:,:,Kmm)523 524 ! write restart file525 ! ==================526 IF( lrst_oce ) CALL dom_qe_rst( kt, Kbb, Kmm, 'WRITE' )527 !528 IF( ln_timing ) CALL timing_stop('dom_qe_sf_update')529 !530 END SUBROUTINE dom_h_update531 442 532 443
Note: See TracChangeset
for help on using the changeset viewer.