[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 |
---|
| 17 | USE trcnam_trp ! passive tracers transport namelist variables |
---|
| 18 | USE trabbl ! bottom boundary layer (trc_bbl routine) |
---|
[941] | 19 | USE trcbbl ! bottom boundary layer (trc_bbl routine) |
---|
[2528] | 20 | USE zdfkpp ! KPP non-local tracer fluxes (trc_kpp routine) |
---|
[941] | 21 | USE trcdmp ! internal damping (trc_dmp routine) |
---|
[2528] | 22 | USE trcldf ! lateral mixing (trc_ldf routine) |
---|
| 23 | USE trcadv ! advection (trc_adv routine) |
---|
| 24 | USE trczdf ! vertical diffusion (trc_zdf routine) |
---|
[941] | 25 | USE trcnxt ! time-stepping (trc_nxt routine) |
---|
| 26 | USE trcrad ! positivity (trc_rad routine) |
---|
| 27 | USE trcsbc ! surface boundary condition (trc_sbc routine) |
---|
[2528] | 28 | USE zpshde ! partial step: hor. derivative (zps_hde routine) |
---|
[10156] | 29 | USE trcbdy ! BDY open boundaries |
---|
| 30 | USE bdy_par, only: lk_bdy |
---|
[941] | 31 | |
---|
[1271] | 32 | #if defined key_agrif |
---|
[3680] | 33 | USE agrif_top_sponge ! tracers sponges |
---|
| 34 | USE agrif_top_update ! tracers updates |
---|
[1271] | 35 | #endif |
---|
| 36 | |
---|
[941] | 37 | IMPLICIT NONE |
---|
| 38 | PRIVATE |
---|
| 39 | |
---|
| 40 | PUBLIC trc_trp ! called by trc_stp |
---|
| 41 | |
---|
| 42 | !! * Substitutions |
---|
[1800] | 43 | # include "top_substitute.h90" |
---|
[941] | 44 | !!---------------------------------------------------------------------- |
---|
[2528] | 45 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
[8058] | 46 | !! $Id$ |
---|
[2528] | 47 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[941] | 48 | !!---------------------------------------------------------------------- |
---|
| 49 | |
---|
| 50 | CONTAINS |
---|
| 51 | |
---|
[2528] | 52 | SUBROUTINE trc_trp( kstp ) |
---|
[941] | 53 | !!---------------------------------------------------------------------- |
---|
| 54 | !! *** ROUTINE trc_trp *** |
---|
| 55 | !! |
---|
| 56 | !! ** Purpose : Management of passive tracers transport |
---|
| 57 | !! |
---|
| 58 | !! ** Method : - Compute the passive tracers trends |
---|
| 59 | !! - Update the passive tracers |
---|
| 60 | !!---------------------------------------------------------------------- |
---|
[2528] | 61 | INTEGER, INTENT( in ) :: kstp ! ocean time-step index |
---|
[941] | 62 | !! --------------------------------------------------------------------- |
---|
[3294] | 63 | ! |
---|
| 64 | IF( nn_timing == 1 ) CALL timing_start('trc_trp') |
---|
| 65 | ! |
---|
[2528] | 66 | IF( .NOT. lk_c1d ) THEN |
---|
| 67 | ! |
---|
| 68 | CALL trc_sbc( kstp ) ! surface boundary condition |
---|
| 69 | IF( lk_trabbl ) CALL trc_bbl( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme |
---|
[4148] | 70 | IF( ln_trcdmp ) CALL trc_dmp( kstp ) ! internal damping trends |
---|
| 71 | IF( ln_trcdmp_clo ) CALL trc_dmp_clo( kstp ) ! internal damping trends on closed seas only |
---|
[10156] | 72 | IF( lk_bdy ) CALL trc_bdy_dmp( kstp ) ! BDY damping trends |
---|
[2528] | 73 | CALL trc_adv( kstp ) ! horizontal & vertical advection |
---|
| 74 | CALL trc_ldf( kstp ) ! lateral mixing |
---|
| 75 | IF( .NOT. lk_offline .AND. lk_zdfkpp ) & |
---|
| 76 | & CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes |
---|
[1271] | 77 | #if defined key_agrif |
---|
[2528] | 78 | IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc ! tracers sponge |
---|
[1271] | 79 | #endif |
---|
[2528] | 80 | CALL trc_zdf( kstp ) ! vertical mixing and after tracer fields |
---|
| 81 | CALL trc_nxt( kstp ) ! tracer fields at next time step |
---|
| 82 | IF( ln_trcrad ) CALL trc_rad( kstp ) ! Correct artificial negative concentrations |
---|
[3680] | 83 | |
---|
| 84 | #if defined key_agrif |
---|
| 85 | IF( .NOT. Agrif_Root()) CALL Agrif_Update_Trc( kstp ) ! Update tracer at AGRIF zoom boundaries : children only |
---|
| 86 | #endif |
---|
[5120] | 87 | |
---|
| 88 | IF( ln_zps .AND. .NOT. ln_isfcav) & |
---|
| 89 | & CALL zps_hde ( kstp, jptra, trn, gtru, gtrv ) ! Partial steps: now horizontal gradient of passive |
---|
| 90 | IF( ln_zps .AND. ln_isfcav) & |
---|
| 91 | & CALL zps_hde_isf( kstp, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! Partial steps: now horizontal gradient of passive |
---|
[2528] | 92 | ! tracers at the bottom ocean level |
---|
| 93 | ! |
---|
| 94 | ELSE ! 1D vertical configuration |
---|
| 95 | CALL trc_sbc( kstp ) ! surface boundary condition |
---|
| 96 | IF( .NOT. lk_offline .AND. lk_zdfkpp ) & |
---|
| 97 | & CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes |
---|
| 98 | CALL trc_zdf( kstp ) ! vertical mixing and after tracer fields |
---|
| 99 | CALL trc_nxt( kstp ) ! tracer fields at next time step |
---|
| 100 | IF( ln_trcrad ) CALL trc_rad( kstp ) ! Correct artificial negative concentrations |
---|
| 101 | ! |
---|
| 102 | END IF |
---|
[941] | 103 | ! |
---|
[3294] | 104 | IF( nn_timing == 1 ) CALL timing_stop('trc_trp') |
---|
| 105 | ! |
---|
[941] | 106 | END SUBROUTINE trc_trp |
---|
| 107 | |
---|
| 108 | #else |
---|
| 109 | !!---------------------------------------------------------------------- |
---|
| 110 | !! Dummy module : No TOP models |
---|
| 111 | !!---------------------------------------------------------------------- |
---|
| 112 | CONTAINS |
---|
[3680] | 113 | SUBROUTINE trc_trp( kstp ) ! Empty routine |
---|
| 114 | INTEGER, INTENT(in) :: kstp |
---|
| 115 | WRITE(*,*) 'trc_trp: You should not have seen this print! error?', kstp |
---|
[941] | 116 | END SUBROUTINE trc_trp |
---|
| 117 | #endif |
---|
| 118 | |
---|
| 119 | !!====================================================================== |
---|
| 120 | END MODULE trctrp |
---|