[941] | 1 | MODULE trctrp |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trctrp *** |
---|
| 4 | !! Ocean Physics : manage the passive tracer transport |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : 1.0 ! 2004-03 (C. Ethe) Original code |
---|
[2528] | 7 | !! 3.3 ! 2010-07 (C. Ethe) Merge TRA-TRC |
---|
[941] | 8 | !!---------------------------------------------------------------------- |
---|
| 9 | #if defined key_top |
---|
| 10 | !!---------------------------------------------------------------------- |
---|
| 11 | !! 'key_top' TOP models |
---|
| 12 | !!---------------------------------------------------------------------- |
---|
| 13 | !! trc_trp : passive tracer transport |
---|
| 14 | !!---------------------------------------------------------------------- |
---|
| 15 | USE oce_trc ! ocean dynamics and active tracers variables |
---|
[2528] | 16 | USE trc ! ocean passive tracers variables |
---|
[941] | 17 | USE trcbbl ! bottom boundary layer (trc_bbl routine) |
---|
| 18 | USE trcdmp ! internal damping (trc_dmp routine) |
---|
[2528] | 19 | USE trcldf ! lateral mixing (trc_ldf routine) |
---|
| 20 | USE trcadv ! advection (trc_adv routine) |
---|
| 21 | USE trczdf ! vertical diffusion (trc_zdf routine) |
---|
[12377] | 22 | USE trcatf ! time filtering (trc_atf routine) |
---|
[941] | 23 | USE trcrad ! positivity (trc_rad routine) |
---|
| 24 | USE trcsbc ! surface boundary condition (trc_sbc routine) |
---|
[12377] | 25 | USE trcbc ! Tracers boundary condtions ( trc_bc routine) |
---|
[2528] | 26 | USE zpshde ! partial step: hor. derivative (zps_hde routine) |
---|
[7646] | 27 | USE bdy_oce , ONLY: ln_bdy |
---|
[6140] | 28 | USE trcbdy ! BDY open boundaries |
---|
[941] | 29 | |
---|
[1271] | 30 | #if defined key_agrif |
---|
[3680] | 31 | USE agrif_top_sponge ! tracers sponges |
---|
[1271] | 32 | #endif |
---|
| 33 | |
---|
[941] | 34 | IMPLICIT NONE |
---|
| 35 | PRIVATE |
---|
| 36 | |
---|
| 37 | PUBLIC trc_trp ! called by trc_stp |
---|
| 38 | |
---|
| 39 | !!---------------------------------------------------------------------- |
---|
[10067] | 40 | !! NEMO/TOP 4.0 , NEMO Consortium (2018) |
---|
[1146] | 41 | !! $Id$ |
---|
[10068] | 42 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[941] | 43 | !!---------------------------------------------------------------------- |
---|
| 44 | |
---|
| 45 | CONTAINS |
---|
| 46 | |
---|
[12377] | 47 | SUBROUTINE trc_trp( kt, Kbb, Kmm, Krhs, Kaa ) |
---|
[941] | 48 | !!---------------------------------------------------------------------- |
---|
| 49 | !! *** ROUTINE trc_trp *** |
---|
| 50 | !! |
---|
| 51 | !! ** Purpose : Management of passive tracers transport |
---|
| 52 | !! |
---|
| 53 | !! ** Method : - Compute the passive tracers trends |
---|
| 54 | !! - Update the passive tracers |
---|
| 55 | !!---------------------------------------------------------------------- |
---|
[12377] | 56 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 57 | INTEGER, INTENT( in ) :: Kbb, Kmm, Krhs, Kaa ! time level indices (not swapped in this routine) |
---|
[941] | 58 | !! --------------------------------------------------------------------- |
---|
[3294] | 59 | ! |
---|
[9124] | 60 | IF( ln_timing ) CALL timing_start('trc_trp') |
---|
[3294] | 61 | ! |
---|
[2528] | 62 | IF( .NOT. lk_c1d ) THEN |
---|
| 63 | ! |
---|
[12377] | 64 | CALL trc_sbc ( kt, Kmm, tr, Krhs ) ! surface boundary condition |
---|
| 65 | IF( ln_trcbc .AND. lltrcbc .AND. kt /= nit000 ) & |
---|
| 66 | CALL trc_bc ( kt, Kmm, tr, Krhs ) ! tracers: surface and lateral Boundary Conditions |
---|
| 67 | IF( ln_trabbl ) CALL trc_bbl ( kt, Kbb, Kmm, tr, Krhs ) ! advective (and/or diffusive) bottom boundary layer scheme |
---|
| 68 | IF( ln_trcdmp ) CALL trc_dmp ( kt, Kbb, Kmm, tr, Krhs ) ! internal damping trends |
---|
| 69 | IF( ln_bdy ) CALL trc_bdy_dmp( kt, Kbb, Krhs ) ! BDY damping trends |
---|
| 70 | CALL trc_adv ( kt, Kbb, Kmm, tr, Krhs ) ! horizontal & vertical advection |
---|
[5836] | 71 | ! ! Partial top/bottom cell: GRADh( trb ) |
---|
| 72 | IF( ln_zps ) THEN |
---|
[12377] | 73 | IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, Kmm, jptra, tr(:,:,:,:,Kbb), pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! both top & bottom |
---|
| 74 | ELSE ; CALL zps_hde ( kt, Kmm, jptra, tr(:,:,:,:,Kbb), gtru, gtrv ) ! only bottom |
---|
[5836] | 75 | ENDIF |
---|
| 76 | ENDIF |
---|
| 77 | ! |
---|
[12377] | 78 | CALL trc_ldf ( kt, Kbb, Kmm, tr, Krhs ) ! lateral mixing |
---|
[1271] | 79 | #if defined key_agrif |
---|
[5836] | 80 | IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc ! tracers sponge |
---|
[1271] | 81 | #endif |
---|
[12377] | 82 | CALL trc_zdf ( kt, Kbb, Kmm, Krhs, tr, Kaa ) ! vert. mixing & after tracer ==> after |
---|
| 83 | CALL trc_atf ( kt, Kbb, Kmm, Kaa , tr ) ! time filtering of "now" tracer fields |
---|
| 84 | ! |
---|
| 85 | ! Subsequent calls use the filtered values: Kmm and Kaa |
---|
| 86 | ! These are used explicitly here since time levels will not be swapped until after tra_atf/dyn_atf/ssh_atf in stp |
---|
| 87 | ! |
---|
| 88 | IF( ln_trcrad ) CALL trc_rad ( kt, Kmm, Kaa, tr ) ! Correct artificial negative concentrations |
---|
| 89 | IF( ln_trcdmp_clo ) CALL trc_dmp_clo( kt, Kmm, Kaa ) ! internal damping trends on closed seas only |
---|
[3680] | 90 | |
---|
[2528] | 91 | ! |
---|
| 92 | ELSE ! 1D vertical configuration |
---|
[12377] | 93 | CALL trc_sbc( kt, Kmm, tr, Krhs ) ! surface boundary condition |
---|
| 94 | IF( ln_trcdmp ) CALL trc_dmp( kt, Kbb, Kmm, tr, Krhs ) ! internal damping trends |
---|
| 95 | CALL trc_zdf( kt, Kbb, Kmm, Krhs, tr, Kaa ) ! vert. mixing & after tracer ==> after |
---|
| 96 | CALL trc_atf( kt, Kbb, Kmm, Kaa , tr ) ! time filtering of "now" tracer fields |
---|
[2528] | 97 | ! |
---|
[12377] | 98 | ! Subsequent calls use the filtered values: Kmm and Kaa |
---|
| 99 | ! These are used explicitly here since time levels will not be swapped until after tra_atf/dyn_atf/ssh_atf in stp |
---|
| 100 | ! |
---|
| 101 | IF( ln_trcrad ) CALL trc_rad( kt, Kmm, Kaa, tr ) ! Correct artificial negative concentrations |
---|
| 102 | ! |
---|
[2528] | 103 | END IF |
---|
[941] | 104 | ! |
---|
[9124] | 105 | IF( ln_timing ) CALL timing_stop('trc_trp') |
---|
[3294] | 106 | ! |
---|
[941] | 107 | END SUBROUTINE trc_trp |
---|
| 108 | |
---|
| 109 | #else |
---|
| 110 | !!---------------------------------------------------------------------- |
---|
| 111 | !! Dummy module : No TOP models |
---|
| 112 | !!---------------------------------------------------------------------- |
---|
| 113 | CONTAINS |
---|
[5836] | 114 | SUBROUTINE trc_trp( kt ) ! Empty routine |
---|
| 115 | INTEGER, INTENT(in) :: kt |
---|
| 116 | WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kt |
---|
[941] | 117 | END SUBROUTINE trc_trp |
---|
| 118 | #endif |
---|
| 119 | |
---|
| 120 | !!====================================================================== |
---|
| 121 | END MODULE trctrp |
---|