Changeset 1011 for trunk/NEMO/TOP_SRC/trcini.F90
- Timestamp:
- 2008-05-30T11:57:12+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/TOP_SRC/trcini.F90
r945 r1011 4 4 !! TOP : Manage the passive tracer initialization 5 5 !!====================================================================== 6 !! History : - ! 2000-04 (O. Aumont, M.A. Foujols) original code 7 !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 8 !! - ! 2005-10 (C. Ethe) Module 9 !! 2.0 ! 2007-12 (C. Ethe, G. Madec) re-writing 6 !! History : - ! 1991-03 () original code 7 !! 1.0 ! 2005-03 (O. Aumont, A. El Moussaoui) F90 8 !! - ! 2005-10 (C. Ethe) print control 9 !! 2.0 ! 2005-10 (C. Ethe, G. Madec) revised architecture 10 !!---------------------------------------------------------------------- 11 #if defined key_top 12 !!---------------------------------------------------------------------- 13 !! 'key_top' TOP models 14 !!---------------------------------------------------------------------- 10 15 !!---------------------------------------------------------------------- 11 16 !! trc_ini : Initialization for passive tracer 12 17 !!---------------------------------------------------------------------- 13 USE par_trc ! TOP parameters 18 USE oce_trc 19 USE trc 20 USE trcrst 21 USE trcctl 22 USE trclec 14 23 USE trcini_cfc ! CFC initialisation 15 24 USE trcini_lobster ! LOBSTER initialisation 16 25 USE trcini_pisces ! PISCES initialisation 17 26 USE trcini_my_trc ! MY_TRC initialisation 27 USE trcdta ! 18 28 USE in_out_manager ! I/O manager 19 29 USE prtctl_trc ! Print control passive tracers (prt_ctl_trc_init routine) 30 USE lib_mpp ! distributed memory computing library 31 20 32 IMPLICIT NONE 21 33 PRIVATE 34 35 PUBLIC trc_ini ! called by opa 22 36 23 PUBLIC trc_ini ! called by ???24 37 !! * Substitutions 38 # include "domzgr_substitute.h90" 25 39 !!---------------------------------------------------------------------- 26 !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007)27 !! $ Header:$40 !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 41 !! $Id$ 28 42 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 29 43 !!---------------------------------------------------------------------- 44 45 CONTAINS 46 47 SUBROUTINE trc_ini 48 !!--------------------------------------------------------------------- 49 !! *** ROUTINE trc_ini *** 50 !! 51 !! ** Purpose : Initialization of the passive tracer fields 52 !! 53 !! ** Method : - read namelist 54 !! - control the consistancy 55 !! - compute specific initialisations 56 !! - set initial tracer fields (either read restart 57 !! or read data or analytical formulation 58 !!--------------------------------------------------------------------- 59 INTEGER :: jk, jn ! dummy loop indices 60 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zbt ! workspace: masked grid volume 61 CHARACTER (len=25) :: charout 30 62 31 CONTAINS 63 !!--------------------------------------------------------------------- 32 64 33 SUBROUTINE trc_ini34 !!-------------------------------------------------------------------35 !! *** ROUTINE trc_ini ***36 !!37 !! ** Purpose : Initialization of passive tracer to zero38 !!39 !! ** Method : call the initialisation of each defined tracer40 !! model (LOBSTER, PISCES, CFC, MY_TRC)41 !!-------------------------------------------------------------------42 !43 65 IF(lwp) WRITE(numout,*) 44 IF(lwp) WRITE(numout,*) 'trc_ini : initial set up of the tracer models'66 IF(lwp) WRITE(numout,*) 'trc_ini : initial set up of the passive tracers' 45 67 IF(lwp) WRITE(numout,*) '~~~~~~~' 46 ! 68 69 ! ! masked grid volume 70 DO jk = 1, jpk 71 zbt(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:) 72 END DO 73 #if defined key_off_degrad 74 DO jk = 1, jpk 75 zbt(:,:,:) = zbt(:,:,:) * facvol(:,:,jk) ! degrad option: reduction by facvol 76 ENDDO 77 #endif 78 79 ! ! total volume of the ocean 80 areatot = SUM( zbt(:,:,:) ) 81 IF( lk_mpp ) CALL mpp_sum( areatot ) ! sum over the global domain 82 83 CALL trc_lec ! READ passive tracers namelists 84 85 CALL trc_ctl ! control consistency between parameters, cpp key and namelists 86 47 87 IF( lk_lobster ) THEN ; CALL trc_ini_lobster ! LOBSTER bio-model 48 88 ELSE ; IF(lwp) WRITE(numout,*) ' LOBSTER not used' 49 89 ENDIF 50 90 51 91 IF( lk_pisces ) THEN ; CALL trc_ini_pisces ! PISCES bio-model 52 92 ELSE ; IF(lwp) WRITE(numout,*) ' PISCES not used' 53 93 ENDIF 54 94 55 95 IF( lk_cfc ) THEN ; CALL trc_ini_cfc ! CFC tracers 56 96 ELSE ; IF(lwp) WRITE(numout,*) ' CFC not used' 57 97 ENDIF 58 98 59 99 IF( lk_my_trc ) THEN ; CALL trc_ini_my_trc ! MY_TRC tracers 60 100 ELSE ; IF(lwp) WRITE(numout,*) ' MY_TRC not used' 61 101 ENDIF 102 103 IF( .NOT. lrsttr ) THEN 104 105 # if defined key_dtatrc 106 ! Initialization of tracer from a file that may also be used for damping 107 CALL trc_dta( nittrc000 ) 108 DO jn = 1, jptra 109 IF( lutini(jn) ) trn(:,:,:,jn) = trdta(:,:,:,jn) * tmask(:,:,:) ! initialisation from file if required 110 END DO 111 # endif 112 trb(:,:,:,:) = trn(:,:,:,:) 113 114 ELSE 115 116 CALL trc_rst_read ! restart from a file 117 118 ENDIF 119 120 ! ! Computation content of all tracers 121 trai = 0.e0 122 DO jn = 1, jptra 123 trai = trai + SUM( trn(:,:,:,jn) * zbt(:,:,:) ) 124 END DO 125 IF( lk_mpp ) CALL mpp_sum( trai ) ! sum over the global domain 126 127 128 ! ! control print 129 IF(lwp) WRITE(numout,*) ' *** Total number of passive tracer jptra = ', jptra 130 IF(lwp) WRITE(numout,*) ' *** Total volume of ocean = ', areatot 131 IF(lwp) WRITE(numout,*) ' *** Total inital content of all tracers = ', trai 132 IF(lwp) WRITE(numout,*) 133 134 IF( ln_ctl ) CALL prt_ctl_trc_init ! control print 62 135 ! 136 137 IF(ln_ctl) THEN ! print mean trends (used for debugging) 138 WRITE(charout, FMT="('ini ')") 139 CALL prt_ctl_trc_info( charout ) 140 CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) 141 ENDIF 142 63 143 END SUBROUTINE trc_ini 144 145 #else 146 !!---------------------------------------------------------------------- 147 !! Empty module : No passive tracer 148 !!---------------------------------------------------------------------- 149 CONTAINS 150 SUBROUTINE trc_ini ! Dummy routine 151 END SUBROUTINE trc_ini 152 #endif 64 153 65 154 !!======================================================================
Note: See TracChangeset
for help on using the changeset viewer.