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