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