[941] | 1 | MODULE trcbbl |
---|
[2528] | 2 | !!====================================================================== |
---|
[941] | 3 | !! *** MODULE trcbbl *** |
---|
| 4 | !! Ocean passive tracers physics : advective and/or diffusive bottom boundary |
---|
| 5 | !! layer scheme |
---|
[1175] | 6 | !!====================================================================== |
---|
[2528] | 7 | !!============================================================================== |
---|
| 8 | !! History : OPA ! 1996-06 (L. Mortier) Original code |
---|
| 9 | !! 8.0 ! 1997-11 (G. Madec) Optimization |
---|
| 10 | !! NEMO 1.0 ! 2002-08 (G. Madec) free form + modules |
---|
| 11 | !! - ! 2004-01 (A. de Miranda, G. Madec, J.M. Molines ) add advective bbl |
---|
| 12 | !! 3.3 ! 2009-11 (G. Madec) merge trabbl and trabbl_adv + style + optimization |
---|
| 13 | !! - ! 2010-04 (G. Madec) Campin & Goosse advective bbl |
---|
| 14 | !! - ! 2010-06 (C. Ethe, G. Madec) merge TRA-TRC |
---|
[941] | 15 | !!---------------------------------------------------------------------- |
---|
[2528] | 16 | #if defined key_top && defined key_trabbl |
---|
[941] | 17 | !!---------------------------------------------------------------------- |
---|
[2528] | 18 | !! 'key_trabbl diffusive or/and adevective bottom boundary layer |
---|
[941] | 19 | !!---------------------------------------------------------------------- |
---|
[2528] | 20 | !! trc_bbl : update the tracer trends due to the bottom boundary layer (advective and/or diffusive) |
---|
[941] | 21 | !!---------------------------------------------------------------------- |
---|
| 22 | USE oce_trc ! ocean dynamics and active tracers variables |
---|
[1175] | 23 | USE trc ! ocean passive tracers variables |
---|
[2528] | 24 | USE trabbl ! |
---|
[941] | 25 | USE prtctl_trc ! Print control for debbuging |
---|
[4990] | 26 | USE trd_oce |
---|
[2528] | 27 | USE trdtra |
---|
[941] | 28 | |
---|
[2528] | 29 | PUBLIC trc_bbl ! routine called by step.F90 |
---|
[941] | 30 | |
---|
| 31 | !!---------------------------------------------------------------------- |
---|
[2528] | 32 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[7753] | 33 | !! $Id$ |
---|
[2528] | 34 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[941] | 35 | !!---------------------------------------------------------------------- |
---|
| 36 | |
---|
| 37 | CONTAINS |
---|
| 38 | |
---|
[2528] | 39 | |
---|
| 40 | SUBROUTINE trc_bbl( kt ) |
---|
[941] | 41 | !!---------------------------------------------------------------------- |
---|
[2528] | 42 | !! *** ROUTINE bbl *** |
---|
| 43 | !! |
---|
| 44 | !! ** Purpose : Compute the before tracer (t & s) trend associated |
---|
| 45 | !! with the bottom boundary layer and add it to the general trend |
---|
| 46 | !! of tracer equations. |
---|
[941] | 47 | !! |
---|
[2528] | 48 | !!---------------------------------------------------------------------- |
---|
| 49 | INTEGER, INTENT( in ) :: kt ! ocean time-step |
---|
[941] | 50 | CHARACTER (len=22) :: charout |
---|
[3294] | 51 | REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrtrd |
---|
[941] | 52 | !!---------------------------------------------------------------------- |
---|
[3294] | 53 | ! |
---|
| 54 | IF( nn_timing == 1 ) CALL timing_start('trc_bbl') |
---|
| 55 | ! |
---|
[7646] | 56 | IF( .NOT. l_offline .AND. nn_dttrc == 1 ) THEN |
---|
[3294] | 57 | CALL bbl( kt, nittrc000, 'TRC' ) ! Online coupling with dynamics : Computation of bbl coef and bbl transport |
---|
| 58 | l_bbl = .FALSE. ! Offline coupling with dynamics : Read bbl coef and bbl transport from input files |
---|
[2528] | 59 | ENDIF |
---|
[941] | 60 | |
---|
[2528] | 61 | IF( l_trdtrc ) THEN |
---|
[3294] | 62 | CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) ! temporary save of trends |
---|
[7753] | 63 | ztrtrd(:,:,:,:) = tra(:,:,:,:) |
---|
[1175] | 64 | ENDIF |
---|
[941] | 65 | |
---|
[2528] | 66 | !* Diffusive bbl : |
---|
| 67 | IF( nn_bbl_ldf == 1 ) THEN |
---|
| 68 | ! |
---|
| 69 | CALL tra_bbl_dif( trb, tra, jptra ) |
---|
| 70 | IF( ln_ctl ) THEN |
---|
| 71 | WRITE(charout, FMT="(' bbl_dif')") ; CALL prt_ctl_trc_info(charout) |
---|
| 72 | CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) |
---|
| 73 | ENDIF |
---|
| 74 | ! |
---|
| 75 | END IF |
---|
[941] | 76 | |
---|
[2528] | 77 | !* Advective bbl : bbl upstream advective trends added to the tracer trends |
---|
| 78 | IF( nn_bbl_adv /= 0 ) THEN |
---|
| 79 | ! |
---|
| 80 | CALL tra_bbl_adv( trb, tra, jptra ) |
---|
| 81 | IF( ln_ctl ) THEN |
---|
| 82 | WRITE(charout, FMT="(' bbl_adv')") ; CALL prt_ctl_trc_info(charout) |
---|
| 83 | CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) |
---|
| 84 | ENDIF |
---|
| 85 | ! |
---|
| 86 | END IF |
---|
[941] | 87 | |
---|
[2528] | 88 | IF( l_trdtrc ) THEN ! save the horizontal diffusive trends for further diagnostics |
---|
| 89 | DO jn = 1, jptra |
---|
[7753] | 90 | ztrtrd(:,:,:,jn) = tra(:,:,:,jn) - ztrtrd(:,:,:,jn) |
---|
[4990] | 91 | CALL trd_tra( kt, 'TRC', jn, jptra_bbl, ztrtrd(:,:,:,jn) ) |
---|
[941] | 92 | END DO |
---|
[3294] | 93 | CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd ) ! temporary save of trends |
---|
[941] | 94 | ENDIF |
---|
[2528] | 95 | ! |
---|
[3294] | 96 | IF( nn_timing == 1 ) CALL timing_stop('trc_bbl') |
---|
| 97 | ! |
---|
[2528] | 98 | END SUBROUTINE trc_bbl |
---|
[941] | 99 | |
---|
| 100 | #else |
---|
| 101 | !!---------------------------------------------------------------------- |
---|
| 102 | !! Dummy module : No bottom boundary layer scheme |
---|
| 103 | !!---------------------------------------------------------------------- |
---|
| 104 | CONTAINS |
---|
[2528] | 105 | SUBROUTINE trc_bbl( kt ) ! Empty routine |
---|
| 106 | WRITE(*,*) 'tra_bbl: You should not have seen this print! error?', kt |
---|
| 107 | END SUBROUTINE trc_bbl |
---|
[941] | 108 | #endif |
---|
| 109 | |
---|
| 110 | !!====================================================================== |
---|
| 111 | END MODULE trcbbl |
---|