Changeset 2528 for trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90
- Timestamp:
- 2010-12-27T18:33:53+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90
- Property svn:eol-style deleted
r1836 r2528 14 14 !!---------------------------------------------------------------------- 15 15 !!---------------------------------------------------------------------- 16 !! trc_ini : Initialization for passive tracer16 !! trc_init : Initialization for passive tracer 17 17 !!---------------------------------------------------------------------- 18 18 USE oce_trc 19 19 USE trc 20 USE trp_trc21 20 USE trcrst 22 USE trcctl 23 USE trclec 21 USE trcnam ! Namelist read 24 22 USE trcini_cfc ! CFC initialisation 25 23 USE trcini_lobster ! LOBSTER initialisation … … 28 26 USE trcini_my_trc ! MY_TRC initialisation 29 27 USE trcdta 30 #if defined key_off _tra28 #if defined key_offline 31 29 USE daymod 32 30 #endif 33 USE zpshde _trc ! partial step: hor. derivative31 USE zpshde ! partial step: hor. derivative (zps_hde routine) 34 32 USE in_out_manager ! I/O manager 35 33 USE prtctl_trc ! Print control passive tracers (prt_ctl_trc_init routine) 36 34 USE lib_mpp ! distributed memory computing library 35 USE lib_fortran ! 37 36 38 37 IMPLICIT NONE 39 38 PRIVATE 40 39 41 PUBLIC trc_ini ! called by opa40 PUBLIC trc_init ! called by opa 42 41 43 42 !! * Substitutions 44 43 # include "domzgr_substitute.h90" 45 !!----------------------------------------------------------------------46 !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005)47 !! $Id$48 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)49 !!----------------------------------------------------------------------50 44 51 45 CONTAINS 52 46 53 SUBROUTINE trc_ini 47 SUBROUTINE trc_init 54 48 !!--------------------------------------------------------------------- 55 !! *** ROUTINE trc_ini ***49 !! *** ROUTINE trc_init *** 56 50 !! 57 51 !! ** Purpose : Initialization of the passive tracer fields … … 69 63 70 64 IF(lwp) WRITE(numout,*) 71 IF(lwp) WRITE(numout,*) 'trc_ini : initial set up of the passive tracers'65 IF(lwp) WRITE(numout,*) 'trc_init : initial set up of the passive tracers' 72 66 IF(lwp) WRITE(numout,*) '~~~~~~~' 73 67 74 68 ! ! masked grid volume 75 69 DO jk = 1, jpk 76 cvol(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:)70 cvol(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) 77 71 END DO 78 72 79 73 ! total volume of the ocean 80 #if ! defined key_ off_degrad81 areatot = SUM( cvol(:,:,:) )74 #if ! defined key_degrad 75 areatot = glob_sum( cvol(:,:,:) ) 82 76 #else 83 areatot = SUM( cvol(:,:,:) * facvol(:,:,:) )! degrad option: reduction by facvol77 areatot = glob_sum( cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol 84 78 #endif 85 IF( lk_mpp ) CALL mpp_sum( areatot ) ! sum over the global domain86 79 87 CALL trc_ lec ! READpassive tracers namelists80 CALL trc_nam ! read passive tracers namelists 88 81 89 CALL trc_ctl ! control consistency between parameters, cpp key 82 ! restart for passive tracer (input) 83 IF( ln_rsttr ) THEN 84 IF(lwp) WRITE(numout,*) ' read a restart file for passive tracer : ', cn_trcrst_in 85 IF(lwp) WRITE(numout,*) ' ' 86 ELSE 87 IF(lwp) WRITE(numout,*) 88 DO jn = 1, jptra 89 IF( lwp .AND. lutini(jn) ) & ! open input FILE only IF lutini(jn) is true 90 & WRITE(numout,*) ' read an initial file for passive tracer number :', jn, ' traceur : ', ctrcnm(jn) 91 END DO 92 ENDIF 93 94 IF( ln_dm2dc .AND. ( lk_pisces .OR. lk_lobster ) ) & 95 & CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES or LOBSTER ' ) 96 97 IF( nn_cla == 1 ) & 98 & CALL ctl_stop( ' Cross Land Advection not yet implemented with passive tracer ; nn_cla must be 0' ) 90 99 91 100 IF( lk_lobster ) THEN ; CALL trc_ini_lobster ! LOBSTER bio-model … … 109 118 ENDIF 110 119 111 IF( .NOT. ln_rsttr ) THEN 112 #if defined key_off_tra 113 CALL day_init ! calendar 114 #endif 115 # if defined key_dtatrc 116 ! Initialization of tracer from a file that may also be used for damping 117 CALL trc_dta( nittrc000 ) 118 DO jn = 1, jptra 119 IF( lutini(jn) ) trn(:,:,:,jn) = trdta(:,:,:,jn) * tmask(:,:,:) ! initialisation from file if required 120 END DO 121 # endif 122 trb(:,:,:,:) = trn(:,:,:,:) 120 IF( ln_rsttr ) THEN 121 ! 122 IF( lk_offline ) neuler = 1 ! Set time-step indicator at nit000 (leap-frog) 123 CALL trc_rst_read ! restart from a file 124 ! 123 125 ELSE 124 ! 125 CALL trc_rst_read ! restart from a file 126 ! 126 IF( lk_offline ) THEN 127 neuler = 0 ! Set time-step indicator at nit000 (euler) 128 CALL day_init ! set calendar 129 ENDIF 130 IF( lk_dtatrc ) THEN 131 CALL trc_dta( nit000 ) ! Initialization of tracer from a file that may also be used for damping 132 DO jn = 1, jptra 133 IF( lutini(jn) ) trn(:,:,:,jn) = trdta(:,:,:,jn) * tmask(:,:,:) ! initialisation from file if required 134 END DO 135 ENDIF 136 trb(:,:,:,:) = trn(:,:,:,:) 137 ! 127 138 ENDIF 128 139 129 140 tra(:,:,:,:) = 0. 130 141 131 IF( ln_zps .AND. .NOT. lk_ trc_c1d ) & ! Partial steps: before horizontal gradient of passive132 & CALL zps_hde _trc( nittrc000, trb, gtru, gtrv ) ! tracers at the bottom ocean level142 IF( ln_zps .AND. .NOT. lk_c1d ) & ! Partial steps: before horizontal gradient of passive 143 & CALL zps_hde( nit000, jptra, trn, gtru, gtrv ) ! tracers at the bottom ocean level 133 144 134 145 … … 136 147 trai = 0.e0 137 148 DO jn = 1, jptra 138 #if ! defined key_ off_degrad139 trai = trai + SUM( trn(:,:,:,jn) * cvol(:,:,:) )149 #if ! defined key_degrad 150 trai = trai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:) ) 140 151 #else 141 trai = trai + SUM( trn(:,:,:,jn) * cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol152 trai = trai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol 142 153 #endif 143 154 END DO 144 IF( lk_mpp ) CALL mpp_sum( trai ) ! sum over the global domain145 146 155 147 156 ! ! control print … … 162 171 ENDIF 163 172 164 END SUBROUTINE trc_ini 173 END SUBROUTINE trc_init 165 174 166 175 #else … … 169 178 !!---------------------------------------------------------------------- 170 179 CONTAINS 171 SUBROUTINE trc_ini ! Dummy routine172 END SUBROUTINE trc_ini 180 SUBROUTINE trc_init ! Dummy routine 181 END SUBROUTINE trc_init 173 182 #endif 174 183 184 !!---------------------------------------------------------------------- 185 !! NEMO/TOP 3.3 , NEMO Consortium (2010) 186 !! $Id$ 187 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 175 188 !!====================================================================== 176 189 END MODULE trcini
Note: See TracChangeset
for help on using the changeset viewer.