[941] | 1 | MODULE trcsbc |
---|
| 2 | !!============================================================================== |
---|
| 3 | !! *** MODULE trcsbc *** |
---|
| 4 | !! Ocean passive tracers: surface boundary condition |
---|
[1175] | 5 | !!====================================================================== |
---|
[2030] | 6 | !! History : 8.2 ! 1998-10 (G. Madec, G. Roullet, M. Imbard) Original code |
---|
| 7 | !! 8.2 ! 2001-02 (D. Ludicone) sea ice and free surface |
---|
| 8 | !! 8.5 ! 2002-06 (G. Madec) F90: Free form and module |
---|
| 9 | !! 9.0 ! 2004-03 (C. Ethe) adapted for passive tracers |
---|
| 10 | !! ! 2006-08 (C. Deltel) Diagnose ML trends for passive tracers |
---|
[941] | 11 | !!============================================================================== |
---|
| 12 | #if defined key_top |
---|
| 13 | !!---------------------------------------------------------------------- |
---|
| 14 | !! 'key_top' TOP models |
---|
| 15 | !!---------------------------------------------------------------------- |
---|
| 16 | !! trc_sbc : update the tracer trend at ocean surface |
---|
| 17 | !!---------------------------------------------------------------------- |
---|
| 18 | !! * Modules used |
---|
| 19 | USE oce_trc ! ocean dynamics and active tracers variables |
---|
[2030] | 20 | USE trc ! ocean passive tracers variables |
---|
[941] | 21 | USE prtctl_trc ! Print control for debbuging |
---|
[2030] | 22 | USE trdmod_oce |
---|
| 23 | USE trdtra |
---|
[941] | 24 | |
---|
| 25 | IMPLICIT NONE |
---|
| 26 | PRIVATE |
---|
| 27 | |
---|
| 28 | !! * Routine accessibility |
---|
| 29 | PUBLIC trc_sbc ! routine called by step.F90 |
---|
| 30 | |
---|
| 31 | !! * Substitutions |
---|
| 32 | # include "top_substitute.h90" |
---|
| 33 | !!---------------------------------------------------------------------- |
---|
| 34 | !! TOP 1.0 , LOCEAN-IPSL (2005) |
---|
[1152] | 35 | !! $Id$ |
---|
[941] | 36 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
| 37 | !!---------------------------------------------------------------------- |
---|
| 38 | |
---|
| 39 | CONTAINS |
---|
| 40 | |
---|
| 41 | SUBROUTINE trc_sbc ( kt ) |
---|
| 42 | !!---------------------------------------------------------------------- |
---|
| 43 | !! *** ROUTINE trc_sbc *** |
---|
| 44 | !! |
---|
| 45 | !! ** Purpose : Compute the tracer surface boundary condition trend of |
---|
| 46 | !! (concentration/dilution effect) and add it to the general |
---|
| 47 | !! trend of tracer equations. |
---|
| 48 | !! |
---|
| 49 | !! ** Method : |
---|
| 50 | !! * concentration/dilution effect: |
---|
| 51 | !! The surface freshwater flux modify the ocean volume |
---|
| 52 | !! and thus the concentration of a tracer as : |
---|
| 53 | !! tra = tra + emp * trn / e3t for k=1 |
---|
| 54 | !! where emp, the surface freshwater budget (evaporation minus |
---|
| 55 | !! precipitation minus runoff) given in kg/m2/s is divided |
---|
[1739] | 56 | !! by 1035 kg/m3 (density of ocean water) to obtain m/s. |
---|
[941] | 57 | !! |
---|
| 58 | !! ** Action : - Update the 1st level of tra with the trend associated |
---|
| 59 | !! with the tracer surface boundary condition |
---|
| 60 | !! |
---|
| 61 | !!---------------------------------------------------------------------- |
---|
| 62 | !! * Arguments |
---|
| 63 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 64 | |
---|
| 65 | !! * Local declarations |
---|
| 66 | INTEGER :: ji, jj, jn ! dummy loop indices |
---|
[2148] | 67 | REAL(wp) :: zsrau, zse3t ! temporary scalars |
---|
[2052] | 68 | REAL(wp), DIMENSION(jpi,jpj) :: zemps ! surface freshwater flux |
---|
[1175] | 69 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztrtrd |
---|
[941] | 70 | CHARACTER (len=22) :: charout |
---|
| 71 | !!---------------------------------------------------------------------- |
---|
| 72 | |
---|
[2148] | 73 | IF( kt == nit000 ) THEN |
---|
[941] | 74 | IF(lwp) WRITE(numout,*) |
---|
| 75 | IF(lwp) WRITE(numout,*) 'trc_sbc : Passive tracers surface boundary condition' |
---|
| 76 | IF(lwp) WRITE(numout,*) '~~~~~~~ ' |
---|
| 77 | ENDIF |
---|
| 78 | |
---|
[2052] | 79 | |
---|
[1175] | 80 | IF( l_trdtrc ) ALLOCATE( ztrtrd(jpi,jpj,jpk) ) |
---|
| 81 | |
---|
[2052] | 82 | #if ! defined key_offline |
---|
| 83 | ! Concentration dilution effect on tracer due to evaporation, precipitation, and river runoff |
---|
[2148] | 84 | IF( lk_vvl ) THEN ! volume variable |
---|
| 85 | zemps(:,:) = emps(:,:) - emp(:,:) |
---|
| 86 | !!ch zemps(:,:) = 0. |
---|
| 87 | ELSE ! linear free surface |
---|
| 88 | IF( ln_rnf ) THEN ; zemps(:,:) = emps(:,:) - rnf(:,:) ! E-P-R |
---|
| 89 | ELSE ; zemps(:,:) = emps(:,:) |
---|
| 90 | ENDIF |
---|
[2052] | 91 | ENDIF |
---|
| 92 | #else |
---|
| 93 | ! emps in dynamical files contains emps - rnf |
---|
| 94 | IF( lk_vvl ) THEN ; zemps(:,:) = 0. ! No concentration/dilution effect |
---|
| 95 | ELSE ; zemps(:,:) = emps(:,:) ! emps -rnf |
---|
| 96 | ENDIF |
---|
| 97 | #endif |
---|
[2148] | 98 | |
---|
[941] | 99 | ! 0. initialization |
---|
[1739] | 100 | zsrau = 1. / rau0 |
---|
[941] | 101 | DO jn = 1, jptra |
---|
[2052] | 102 | ! |
---|
[1175] | 103 | IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends |
---|
[2148] | 104 | ! ! add the trend to the general tracer trend |
---|
[941] | 105 | DO jj = 2, jpj |
---|
| 106 | DO ji = fs_2, fs_jpim1 ! vector opt. |
---|
[2030] | 107 | zse3t = 1. / fse3t(ji,jj,1) |
---|
[2148] | 108 | tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + zemps(ji,jj) * zsrau * trn(ji,jj,1,jn) * zse3t |
---|
[941] | 109 | END DO |
---|
| 110 | END DO |
---|
| 111 | |
---|
[1175] | 112 | IF( l_trdtrc ) THEN |
---|
| 113 | ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) |
---|
[2030] | 114 | CALL trd_tra( kt, 'TRC', jn, jptra_trd_nsr, ztrtrd ) |
---|
[1175] | 115 | END IF |
---|
| 116 | ! ! =========== |
---|
| 117 | END DO ! tracer loop |
---|
| 118 | ! ! =========== |
---|
[2052] | 119 | IF( l_trdtrc ) DEALLOCATE( ztrtrd ) |
---|
[1175] | 120 | |
---|
[2030] | 121 | IF( ln_ctl ) THEN |
---|
| 122 | WRITE(charout, FMT="('sbc ')") ; CALL prt_ctl_trc_info(charout) |
---|
| 123 | CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) |
---|
[941] | 124 | ENDIF |
---|
| 125 | |
---|
| 126 | END SUBROUTINE trc_sbc |
---|
| 127 | |
---|
| 128 | #else |
---|
| 129 | !!---------------------------------------------------------------------- |
---|
| 130 | !! Dummy module : NO passive tracer |
---|
| 131 | !!---------------------------------------------------------------------- |
---|
| 132 | CONTAINS |
---|
| 133 | SUBROUTINE trc_sbc (kt) ! Empty routine |
---|
| 134 | INTEGER, INTENT(in) :: kt |
---|
| 135 | WRITE(*,*) 'trc_sbc: You should not have seen this print! error?', kt |
---|
| 136 | END SUBROUTINE trc_sbc |
---|
| 137 | #endif |
---|
| 138 | |
---|
| 139 | !!====================================================================== |
---|
| 140 | END MODULE trcsbc |
---|