- Timestamp:
- 2017-07-05T10:28:51+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r7203 r8280 8 8 !! 2.0 ! 2005-10 (C. Ethe, G. Madec) revised architecture 9 9 !! 4.0 ! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 10 !! - ! 2014-06 (A. Yool, J. Palmieri) adding MEDUSA-2 10 11 !!---------------------------------------------------------------------- 11 12 #if defined key_top … … 24 25 USE trcini_c14b ! C14 bomb initialisation 25 26 USE trcini_my_trc ! MY_TRC initialisation 27 USE trcini_medusa ! MEDUSA initialisation 28 USE trcini_idtra ! idealize tracer initialisation 29 USE trcini_age ! AGE initialisation 26 30 USE trcdta ! initialisation from files 27 31 USE daymod ! calendar manager … … 76 80 & CALL ctl_warn(' Coupling with passive tracers and used of diurnal cycle. & 77 81 & Computation of a daily mean shortwave for some biogeochemical models) ') 78 82 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 83 !!!!! CHECK For MEDUSA 84 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 79 85 IF( nn_cla == 1 ) & 80 86 & CALL ctl_stop( ' Cross Land Advection not yet implemented with passive tracer ; nn_cla must be 0' ) … … 97 103 98 104 IF( lk_pisces ) CALL trc_ini_pisces ! PISCES bio-model 105 IF( lk_medusa ) CALL trc_ini_medusa ! MEDUSA tracers 106 IF( lk_idtra ) CALL trc_ini_idtra ! Idealize tracers 99 107 IF( lk_cfc ) CALL trc_ini_cfc ! CFC tracers 100 108 IF( lk_c14b ) CALL trc_ini_c14b ! C14 bomb tracer 109 IF( lk_age ) CALL trc_ini_age ! AGE tracer 101 110 IF( lk_my_trc ) CALL trc_ini_my_trc ! MY_TRC tracers 102 111 103 112 CALL trc_ice_ini ! Tracers in sea ice 104 113 105 IF( lwp ) THEN 114 # if defined key_debug_medusa 115 IF (lwp) write (numout,*) '------------------------------' 116 IF (lwp) write (numout,*) 'Jpalm - debug' 117 IF (lwp) write (numout,*) ' in trc_init' 118 IF (lwp) write (numout,*) ' sms init OK' 119 IF (lwp) write (numout,*) ' next: open tracer.stat' 120 IF (lwp) write (numout,*) ' ' 121 CALL flush(numout) 122 # endif 123 124 IF( ln_ctl ) THEN 106 125 ! 107 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 126 IF (narea == 1) THEN 127 ! The tracer.stat file only contains global tracer sum values, if 128 ! it contains anything at all. Hence it only needs to be opened 129 ! and written to on the master PE, not on all PEs. 130 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE','FORMATTED', & 131 'SEQUENTIAL', -1, numout, lwp , narea ) 132 ENDIF 108 133 ! 109 134 ENDIF 110 135 111 IF( ln_trcdta ) CALL trc_dta_init(jptra) 112 136 # if defined key_debug_medusa 137 IF (lwp) write (numout,*) '------------------------------' 138 IF (lwp) write (numout,*) 'Jpalm - debug' 139 IF (lwp) write (numout,*) ' in trc_init' 140 IF (lwp) write (numout,*) 'open tracer.stat -- OK' 141 IF (lwp) write (numout,*) ' ' 142 CALL flush(numout) 143 # endif 144 145 146 IF( ln_trcdta ) THEN 147 #if defined key_medusa 148 IF(lwp) WRITE(numout,*) 'AXY: calling trc_dta_init' 149 IF(lwp) CALL flush(numout) 150 #endif 151 CALL trc_dta_init(jptra) 152 ENDIF 113 153 114 154 IF( ln_rsttr ) THEN 115 155 ! 156 #if defined key_medusa 157 IF(lwp) WRITE(numout,*) 'AXY: calling trc_rst_read' 158 IF(lwp) CALL flush(numout) 159 #endif 116 160 CALL trc_rst_read ! restart from a file 117 161 ! 118 162 ELSE 163 ! 164 # if defined key_debug_medusa 165 IF (lwp) write (numout,*) '------------------------------' 166 IF (lwp) write (numout,*) 'Jpalm - debug' 167 IF (lwp) write (numout,*) ' Init from file -- will call trc_dta' 168 IF (lwp) write (numout,*) ' ' 169 CALL flush(numout) 170 # endif 119 171 ! 120 172 IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN ! Initialisation of tracer from a file that may also be used for damping … … 137 189 ENDIF 138 190 ! 191 # if defined key_debug_medusa 192 IF (lwp) write (numout,*) '------------------------------' 193 IF (lwp) write (numout,*) 'Jpalm - debug' 194 IF (lwp) write (numout,*) ' in trc_init' 195 IF (lwp) write (numout,*) ' before trb = trn' 196 IF (lwp) write (numout,*) ' ' 197 CALL flush(numout) 198 # endif 199 ! 139 200 trb(:,:,:,:) = trn(:,:,:,:) 201 ! 202 # if defined key_debug_medusa 203 IF (lwp) write (numout,*) '------------------------------' 204 IF (lwp) write (numout,*) 'Jpalm - debug' 205 IF (lwp) write (numout,*) ' in trc_init' 206 IF (lwp) write (numout,*) ' trb = trn -- OK' 207 IF (lwp) write (numout,*) ' ' 208 CALL flush(numout) 209 # endif 140 210 ! 141 211 ENDIF … … 146 216 IF( ln_zps .AND. .NOT. lk_c1d .AND. ln_isfcav ) & 147 217 & CALL zps_hde_isf( nit000, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! tracers at the bottom ocean level 148 149 218 ! 219 # if defined key_debug_medusa 220 IF (lwp) write (numout,*) '------------------------------' 221 IF (lwp) write (numout,*) 'Jpalm - debug' 222 IF (lwp) write (numout,*) ' in trc_init' 223 IF (lwp) write (numout,*) ' partial step -- OK' 224 IF (lwp) write (numout,*) ' ' 225 CALL flush(numout) 226 # endif 150 227 ! 151 228 IF( nn_dttrc /= 1 ) CALL trc_sub_ini ! Initialize variables for substepping passive tracers 152 229 ! 153 230 # if defined key_debug_medusa 231 IF (lwp) write (numout,*) '------------------------------' 232 IF (lwp) write (numout,*) 'Jpalm - debug' 233 IF (lwp) write (numout,*) ' in trc_init' 234 IF (lwp) write (numout,*) ' before initiate tracer contents' 235 IF (lwp) write (numout,*) ' ' 236 CALL flush(numout) 237 # endif 238 ! 154 239 trai(:) = 0._wp ! initial content of all tracers 155 240 DO jn = 1, jptra … … 164 249 WRITE(numout,*) ' *** Total inital content of all tracers ' 165 250 WRITE(numout,*) 251 # if defined key_debug_medusa 252 CALL flush(numout) 253 # endif 254 ! 255 # if defined key_debug_medusa 256 WRITE(numout,*) ' litle check : ', ctrcnm(1) 257 CALL flush(numout) 258 # endif 166 259 DO jn = 1, jptra 167 260 WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), trai(jn) … … 176 269 CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) 177 270 ENDIF 271 272 IF(lwp) WRITE(numout,*) 273 IF(lwp) WRITE(numout,*) 'trc_init : passive tracer set up completed' 274 IF(lwp) WRITE(numout,*) '~~~~~~~' 275 IF(lwp) CALL flush(numout) 276 # if defined key_debug_medusa 277 CALL trc_rst_stat 278 CALL flush(numout) 279 # endif 280 178 281 9000 FORMAT(' tracer nb : ',i2,' name :',a10,' initial content :',e18.10) 179 282 !
Note: See TracChangeset
for help on using the changeset viewer.