[259] | 1 | MODULE initrc |
---|
[763] | 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE initrc *** |
---|
| 4 | !! TOP : Initialisation of passive tracers |
---|
| 5 | !!====================================================================== |
---|
| 6 | !! History : - ! 1991-03 () original code |
---|
| 7 | !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 |
---|
| 8 | !! - ! 2005-10 (C. Ethe) print control |
---|
[772] | 9 | !! 2.0 ! 2005-10 (C. Ethe, G. Madec) revised architecture |
---|
[763] | 10 | !!---------------------------------------------------------------------- |
---|
[772] | 11 | #if defined key_top |
---|
[763] | 12 | !!---------------------------------------------------------------------- |
---|
[772] | 13 | !! 'key_top' TOP models |
---|
[763] | 14 | !!---------------------------------------------------------------------- |
---|
| 15 | !! ini_trc : initialisation of passive tracers |
---|
| 16 | !!---------------------------------------------------------------------- |
---|
[335] | 17 | USE oce_trc |
---|
| 18 | USE trc |
---|
| 19 | USE trcrst |
---|
| 20 | USE trcctl |
---|
| 21 | USE trclec |
---|
| 22 | USE trcdtr |
---|
| 23 | USE trcini |
---|
[345] | 24 | USE prtctl_trc ! Print control passive tracers (prt_ctl_trc_init routine) |
---|
[335] | 25 | |
---|
| 26 | IMPLICIT NONE |
---|
| 27 | PRIVATE |
---|
| 28 | |
---|
[763] | 29 | PUBLIC ini_trc ! called by ??? |
---|
[617] | 30 | |
---|
| 31 | !! * Substitutions |
---|
| 32 | # include "domzgr_substitute.h90" |
---|
[763] | 33 | !!---------------------------------------------------------------------- |
---|
| 34 | !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) |
---|
[772] | 35 | !! $Id$ |
---|
[763] | 36 | !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) |
---|
| 37 | !!---------------------------------------------------------------------- |
---|
[617] | 38 | |
---|
[259] | 39 | CONTAINS |
---|
[335] | 40 | |
---|
| 41 | SUBROUTINE ini_trc |
---|
| 42 | !!--------------------------------------------------------------------- |
---|
[763] | 43 | !! *** ROUTINE ini_trc *** |
---|
[335] | 44 | !! |
---|
[763] | 45 | !! ** Purpose : Initialization of the passive tracer fields |
---|
[335] | 46 | !! |
---|
[763] | 47 | !! ** Method : - read namelist |
---|
| 48 | !! - control the consistancy |
---|
| 49 | !! - compute specific initialisations |
---|
| 50 | !! - set initial tracer fields (either read restart |
---|
| 51 | !! or read data or analytical formulation |
---|
[335] | 52 | !!--------------------------------------------------------------------- |
---|
[773] | 53 | INTEGER :: jk, jn ! dummy loop indices |
---|
[763] | 54 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: zbt ! workspace: masked grid volume |
---|
[335] | 55 | !!--------------------------------------------------------------------- |
---|
[259] | 56 | |
---|
[763] | 57 | IF(lwp) WRITE(numout,*) |
---|
| 58 | IF(lwp) WRITE(numout,*) 'ini_trc : initial set up of the passive tracers' |
---|
| 59 | IF(lwp) WRITE(numout,*) '~~~~~~~' |
---|
[259] | 60 | |
---|
[763] | 61 | ! ! masked grid volume |
---|
[617] | 62 | DO jk = 1, jpk |
---|
[763] | 63 | zbt(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) |
---|
| 64 | END DO |
---|
[617] | 65 | #if defined key_off_degrad |
---|
[773] | 66 | zbt(:,:,:) = zbt(:,:,:) * facvol(:,:,jk) ! degrad option: reduction by facvol |
---|
[617] | 67 | #endif |
---|
| 68 | |
---|
[763] | 69 | ! ! total volume of the ocean |
---|
| 70 | areatot = SUM( zbt(:,:,:) ) |
---|
| 71 | IF( lk_mpp ) CALL mpp_sum( areatot ) ! sum over the global domain |
---|
[617] | 72 | |
---|
[763] | 73 | CALL trc_lec ! READ passive tracers namelists |
---|
[617] | 74 | |
---|
[763] | 75 | CALL trc_ctl ! control consistency between parameters, cpp key and namelists |
---|
[259] | 76 | |
---|
[763] | 77 | CALL trc_ini ! computes some initializations |
---|
[259] | 78 | |
---|
[763] | 79 | ! ! set initial tracer values |
---|
| 80 | IF( lrsttr ) THEN ; CALL trc_rst_read ! restart from a file |
---|
| 81 | ELSE ; CALL trc_dtr ! analytical formulation or from data |
---|
[259] | 82 | ENDIF |
---|
| 83 | |
---|
[763] | 84 | ! ! Computation content of all tracers |
---|
| 85 | trai = 0.e0 |
---|
[617] | 86 | DO jn = 1, jptra |
---|
[763] | 87 | trai = trai + SUM( trn(:,:,:,jn) * zbt(:,:,:) ) |
---|
| 88 | END DO |
---|
| 89 | IF( lk_mpp ) CALL mpp_sum( trai ) ! sum over the global domain |
---|
[617] | 90 | |
---|
| 91 | |
---|
[763] | 92 | ! ! control print |
---|
| 93 | IF(lwp) WRITE(numout,*) ' *** Total number of passive tracer jptra = ', jptra |
---|
| 94 | IF(lwp) WRITE(numout,*) ' *** Total volume of ocean = ', areatot |
---|
| 95 | IF(lwp) WRITE(numout,*) ' *** Total inital content of all tracers = ', trai |
---|
| 96 | IF(lwp) WRITE(numout,*) |
---|
[617] | 97 | |
---|
[763] | 98 | IF( ln_ctl ) CALL prt_ctl_trc_init ! control print |
---|
| 99 | ! |
---|
[335] | 100 | END SUBROUTINE ini_trc |
---|
[259] | 101 | |
---|
| 102 | #else |
---|
[763] | 103 | !!---------------------------------------------------------------------- |
---|
| 104 | !! Empty module : No passive tracer |
---|
| 105 | !!---------------------------------------------------------------------- |
---|
[335] | 106 | CONTAINS |
---|
[763] | 107 | SUBROUTINE ini_trc ! Dummy routine |
---|
[335] | 108 | END SUBROUTINE ini_trc |
---|
[259] | 109 | #endif |
---|
| 110 | |
---|
[763] | 111 | !!====================================================================== |
---|
[259] | 112 | END MODULE initrc |
---|