[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 trcnam_trp ! passive tracers transport namelist variables |
---|
| 25 | USE trabbl ! |
---|
[941] | 26 | USE prtctl_trc ! Print control for debbuging |
---|
[4990] | 27 | USE trd_oce |
---|
[2528] | 28 | USE trdtra |
---|
[941] | 29 | |
---|
[2528] | 30 | PUBLIC trc_bbl ! routine called by step.F90 |
---|
[941] | 31 | |
---|
| 32 | |
---|
| 33 | !! * Substitutions |
---|
| 34 | # include "top_substitute.h90" |
---|
| 35 | !!---------------------------------------------------------------------- |
---|
[2528] | 36 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[6486] | 37 | !! $Id$ |
---|
[2528] | 38 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[941] | 39 | !!---------------------------------------------------------------------- |
---|
| 40 | |
---|
| 41 | CONTAINS |
---|
| 42 | |
---|
[2528] | 43 | |
---|
| 44 | SUBROUTINE trc_bbl( kt ) |
---|
[941] | 45 | !!---------------------------------------------------------------------- |
---|
[2528] | 46 | !! *** ROUTINE bbl *** |
---|
| 47 | !! |
---|
| 48 | !! ** Purpose : Compute the before tracer (t & s) trend associated |
---|
| 49 | !! with the bottom boundary layer and add it to the general trend |
---|
| 50 | !! of tracer equations. |
---|
[941] | 51 | !! |
---|
[2528] | 52 | !!---------------------------------------------------------------------- |
---|
[9975] | 53 | IMPLICIT NONE |
---|
[2528] | 54 | INTEGER, INTENT( in ) :: kt ! ocean time-step |
---|
[941] | 55 | CHARACTER (len=22) :: charout |
---|
[7771] | 56 | REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztrtrd |
---|
[9975] | 57 | INTEGER :: jn ! Local loop index |
---|
[941] | 58 | !!---------------------------------------------------------------------- |
---|
[3294] | 59 | ! |
---|
| 60 | IF( nn_timing == 1 ) CALL timing_start('trc_bbl') |
---|
| 61 | ! |
---|
| 62 | IF( .NOT. lk_offline .AND. nn_dttrc == 1 ) THEN |
---|
| 63 | CALL bbl( kt, nittrc000, 'TRC' ) ! Online coupling with dynamics : Computation of bbl coef and bbl transport |
---|
| 64 | l_bbl = .FALSE. ! Offline coupling with dynamics : Read bbl coef and bbl transport from input files |
---|
[2528] | 65 | ENDIF |
---|
[941] | 66 | |
---|
[2528] | 67 | IF( l_trdtrc ) THEN |
---|
[7771] | 68 | ALLOCATE(ztrtrd( 1:jpi, 1:jpj, 1:jpk, 1:jptra )) ! temporary save of trends |
---|
[2528] | 69 | ztrtrd(:,:,:,:) = tra(:,:,:,:) |
---|
[1175] | 70 | ENDIF |
---|
[941] | 71 | |
---|
[2528] | 72 | !* Diffusive bbl : |
---|
| 73 | IF( nn_bbl_ldf == 1 ) THEN |
---|
| 74 | ! |
---|
| 75 | CALL tra_bbl_dif( trb, tra, jptra ) |
---|
| 76 | IF( ln_ctl ) THEN |
---|
| 77 | WRITE(charout, FMT="(' bbl_dif')") ; CALL prt_ctl_trc_info(charout) |
---|
| 78 | CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) |
---|
| 79 | ENDIF |
---|
| 80 | ! |
---|
| 81 | END IF |
---|
[941] | 82 | |
---|
[2528] | 83 | !* Advective bbl : bbl upstream advective trends added to the tracer trends |
---|
| 84 | IF( nn_bbl_adv /= 0 ) THEN |
---|
| 85 | ! |
---|
| 86 | CALL tra_bbl_adv( trb, tra, jptra ) |
---|
| 87 | IF( ln_ctl ) THEN |
---|
| 88 | WRITE(charout, FMT="(' bbl_adv')") ; CALL prt_ctl_trc_info(charout) |
---|
| 89 | CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) |
---|
| 90 | ENDIF |
---|
| 91 | ! |
---|
| 92 | END IF |
---|
[941] | 93 | |
---|
[2528] | 94 | IF( l_trdtrc ) THEN ! save the horizontal diffusive trends for further diagnostics |
---|
| 95 | DO jn = 1, jptra |
---|
| 96 | ztrtrd(:,:,:,jn) = tra(:,:,:,jn) - ztrtrd(:,:,:,jn) |
---|
[4990] | 97 | CALL trd_tra( kt, 'TRC', jn, jptra_bbl, ztrtrd(:,:,:,jn) ) |
---|
[941] | 98 | END DO |
---|
[7771] | 99 | DEALLOCATE(ztrtrd ) ! temporary save of trends |
---|
[941] | 100 | ENDIF |
---|
[2528] | 101 | ! |
---|
[3294] | 102 | IF( nn_timing == 1 ) CALL timing_stop('trc_bbl') |
---|
| 103 | ! |
---|
[2528] | 104 | END SUBROUTINE trc_bbl |
---|
[941] | 105 | |
---|
| 106 | #else |
---|
| 107 | !!---------------------------------------------------------------------- |
---|
| 108 | !! Dummy module : No bottom boundary layer scheme |
---|
| 109 | !!---------------------------------------------------------------------- |
---|
| 110 | CONTAINS |
---|
[2528] | 111 | SUBROUTINE trc_bbl( kt ) ! Empty routine |
---|
[9975] | 112 | IMPLICIT NONE |
---|
| 113 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
[2528] | 114 | WRITE(*,*) 'tra_bbl: You should not have seen this print! error?', kt |
---|
| 115 | END SUBROUTINE trc_bbl |
---|
[941] | 116 | #endif |
---|
| 117 | |
---|
| 118 | !!====================================================================== |
---|
| 119 | END MODULE trcbbl |
---|