- Timestamp:
- 2018-07-23T11:33:03+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_obs_oper_update_icethick/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r7960 r9987 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 … … 23 24 USE trcini_pisces ! PISCES initialisation 24 25 USE trcini_c14b ! C14 bomb initialisation 26 USE trcini_age ! AGE initialisation 25 27 USE trcini_my_trc ! MY_TRC initialisation 28 USE trcini_idtra ! idealize tracer initialisation 29 USE trcini_medusa ! MEDUSA initialisation 26 30 USE trcdta ! initialisation from files 27 31 USE daymod ! calendar manager 28 USE zpshde ! partial step: hor. derivative (zps_hde routine)29 32 USE prtctl_trc ! Print control passive tracers (prt_ctl_trc_init routine) 30 33 USE trcsub ! variables to substep passive tracers … … 61 64 INTEGER :: jk, jn, jl ! dummy loop indices 62 65 CHARACTER (len=25) :: charout 63 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrcdta ! 4D workspace64 66 !!--------------------------------------------------------------------- 65 67 ! … … 100 102 IF( lk_cfc ) CALL trc_ini_cfc ! CFC tracers 101 103 IF( lk_c14b ) CALL trc_ini_c14b ! C14 bomb tracer 104 IF( lk_age ) CALL trc_ini_age ! AGE tracer 102 105 IF( lk_my_trc ) CALL trc_ini_my_trc ! MY_TRC tracers 106 IF( lk_idtra ) CALL trc_ini_idtra ! Idealize tracers 107 IF( lk_medusa ) CALL trc_ini_medusa ! MEDUSA tracers 103 108 104 109 CALL trc_ice_ini ! Tracers in sea ice 105 110 106 IF( l wp) THEN111 IF( ln_ctl ) THEN 107 112 ! 108 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 113 IF (narea == 1) THEN 114 ! The tracer.stat file only contains global tracer sum values, if 115 ! it contains anything at all. Hence it only needs to be opened 116 ! and written to on the master PE, not on all PEs. 117 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE','FORMATTED', & 118 'SEQUENTIAL', -1, numout, lwp , narea ) 119 ENDIF 109 120 ! 110 121 ENDIF 111 122 112 IF( ln_trcdta ) CALL trc_dta_init(jptra) 113 123 IF( ln_trcdta ) THEN 124 CALL trc_dta_init(jptra) 125 ENDIF 114 126 115 127 IF( ln_rsttr ) THEN … … 120 132 ! 121 133 IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN ! Initialisation of tracer from a file that may also be used for damping 122 !123 CALL wrk_alloc( jpi, jpj, jpk, ztrcdta ) ! Memory allocation124 134 ! 125 135 DO jn = 1, jptra 126 136 IF( ln_trc_ini(jn) ) THEN ! update passive tracers arrays with input data read from file 127 137 jl = n_trc_index(jn) 128 CALL trc_dta( nit000, sf_trcdta(jl),rf_trfac(jl) ) ! read tracer data at nit000 129 ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 130 trn(:,:,:,jn) = ztrcdta(:,:,:) * tmask(:,:,:) 138 CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl) ) ! read tracer data at nit000 139 trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:) 131 140 IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN !== deallocate data structure ==! 132 141 ! (data used only for initialisation) … … 138 147 ENDIF 139 148 ENDDO 140 CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta )149 ! 141 150 ENDIF 142 151 ! … … 146 155 147 156 tra(:,:,:,:) = 0._wp 148 IF( ln_zps .AND. .NOT. lk_c1d .AND. .NOT. ln_isfcav ) & ! Partial steps: before horizontal gradient of passive149 & CALL zps_hde ( nit000, jptra, trn, gtru, gtrv ) ! Partial steps: before horizontal gradient150 IF( ln_zps .AND. .NOT. lk_c1d .AND. ln_isfcav ) &151 & CALL zps_hde_isf( nit000, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi ) ! tracers at the bottom ocean level152 153 154 157 ! 155 158 IF( nn_dttrc /= 1 ) CALL trc_sub_ini ! Initialize variables for substepping passive tracers … … 168 171 WRITE(numout,*) ' *** Total inital content of all tracers ' 169 172 WRITE(numout,*) 173 # if defined key_debug_medusa 174 CALL flush(numout) 175 # endif 176 ! 177 # if defined key_debug_medusa 178 WRITE(numout,*) ' litle check : ', ctrcnm(1) 179 CALL flush(numout) 180 # endif 170 181 DO jn = 1, jptra 171 182 WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), trai(jn) … … 180 191 CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) 181 192 ENDIF 193 194 IF(lwp) WRITE(numout,*) 195 IF(lwp) WRITE(numout,*) 'trc_init : passive tracer set up completed' 196 IF(lwp) WRITE(numout,*) '~~~~~~~' 197 IF(lwp) CALL flush(numout) 198 # if defined key_debug_medusa 199 CALL trc_rst_stat 200 CALL flush(numout) 201 # endif 202 182 203 9000 FORMAT(' tracer nb : ',i2,' name :',a10,' initial content :',e18.10) 183 204 ! … … 201 222 USE trdmxl_trc , ONLY: trd_mxl_trc_alloc 202 223 #endif 224 # if defined key_medusa 225 USE bio_medusa_mod, ONLY: bio_medusa_alloc 226 # endif 227 203 228 ! 204 229 INTEGER :: ierr … … 213 238 ierr = ierr + trd_mxl_trc_alloc() 214 239 #endif 240 #if defined key_medusa 241 ierr = ierr + bio_medusa_alloc() 242 #endif 215 243 ! 216 244 IF( lk_mpp ) CALL mpp_sum( ierr )
Note: See TracChangeset
for help on using the changeset viewer.