Changeset 7646 for trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90
- Timestamp:
- 2017-02-06T10:25:03+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r6701 r7646 24 24 USE trcrst 25 25 USE lib_mpp ! distribued memory computing library 26 USE sbc_oce27 26 USE trcice ! tracers in sea ice 28 USE trcbc, only : trc_bc_ini t! generalized Boundary Conditions27 USE trcbc, only : trc_bc_ini ! generalized Boundary Conditions 29 28 30 29 IMPLICIT NONE … … 58 57 IF(lwp) WRITE(numout,*) 'trc_init : initial set up of the passive tracers' 59 58 IF(lwp) WRITE(numout,*) '~~~~~~~' 60 61 ! 59 ! 60 CALL trc_ini_ctl ! control 61 CALL trc_nam ! read passive tracers namelists 62 62 CALL top_alloc() ! allocate TOP arrays 63 63 ! 64 CALL trc_ini_ctl ! control 65 ! 66 CALL trc_nam ! read passive tracers namelists 64 IF(.NOT.ln_trcdta ) ln_trc_ini(:) = .FALSE. 67 65 ! 68 66 IF(lwp) WRITE(numout,*) 69 ! 70 IF( ln_rsttr .AND. .NOT. lk_offline ) CALL trc_rst_cal( nit000, 'READ' ) ! calendar 71 ! 67 IF( ln_rsttr .AND. .NOT. l_offline ) CALL trc_rst_cal( nit000, 'READ' ) ! calendar 72 68 IF(lwp) WRITE(numout,*) 73 69 ! 74 70 CALL trc_ini_sms ! SMS 75 !71 CALL trc_ini_inv ! Inventories 76 72 CALL trc_ini_trp ! passive tracers transport 77 !78 73 CALL trc_ice_ini ! Tracers in sea ice 79 74 ! 80 IF( lwp ) & 81 & CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 75 IF(lwp) CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea ) 82 76 ! 83 77 CALL trc_ini_state ! passive tracers initialisation : from a restart or from clim 84 ! 85 IF( nn_dttrc /= 1 ) CALL trc_sub_ini ! Initialize variables for substepping passive tracers 86 ! 87 CALL trc_ini_inv ! Inventories 78 IF( nn_dttrc /= 1 ) & 79 CALL trc_sub_ini ! Initialize variables for substepping passive tracers 88 80 ! 89 81 IF( nn_timing == 1 ) CALL timing_stop('trc_init') … … 101 93 ! Define logical parameter ton control dirunal cycle in TOP 102 94 l_trcdm2dc = ln_dm2dc .OR. ( ln_cpl .AND. ncpl_qsr_freq /= 1 ) 103 l_trcdm2dc = l_trcdm2dc .AND. .NOT. l k_offline95 l_trcdm2dc = l_trcdm2dc .AND. .NOT. l_offline 104 96 IF( l_trcdm2dc .AND. lwp ) CALL ctl_warn( 'Coupling with passive tracers and used of diurnal cycle.', & 105 97 & 'Computation of a daily mean shortwave for some biogeochemical models ' ) … … 120 112 cvol(:,:,jk) = e1e2t(:,:) * e3t_n(:,:,jk) * tmask(:,:,jk) 121 113 END DO 122 IF( lk_degrad ) cvol(:,:,:) = cvol(:,:,:) * facvol(:,:,:) ! degrad option: reduction by facvol123 114 ! ! total volume of the ocean 124 115 areatot = glob_sum( cvol(:,:,:) ) … … 131 122 IF(lwp) THEN ! control print 132 123 WRITE(numout,*) 133 WRITE(numout,*) 134 WRITE(numout,*) ' *** Total number of passive tracer jptra = ', jptra 135 WRITE(numout,*) ' *** Total volume of ocean = ', areatot 136 WRITE(numout,*) ' *** Total inital content of all tracers ' 124 WRITE(numout,*) ' *** Total number of passive tracer jptra = ', jptra 125 WRITE(numout,*) ' *** Total volume of ocean = ', areatot 126 WRITE(numout,*) ' *** Total inital content of all tracers ' 137 127 WRITE(numout,*) 138 128 DO jn = 1, jptra … … 148 138 CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm ) 149 139 ENDIF 150 9000 FORMAT(' tracer nb : ',i2,' name :',a10,' initial content :',e18.10)140 9000 FORMAT(' tracer nb : ',i2,' name :',a10,' initial content :',e18.10) 151 141 ! 152 142 END SUBROUTINE trc_ini_inv … … 158 148 !! ** Purpose : SMS initialisation 159 149 !!---------------------------------------------------------------------- 160 USE trcini_cfc ! CFC initialisation 161 USE trcini_pisces ! PISCES initialisation 162 USE trcini_c14b ! C14 bomb initialisation 163 USE trcini_my_trc ! MY_TRC initialisation 164 !!---------------------------------------------------------------------- 165 IF( lk_pisces ) CALL trc_ini_pisces ! PISCES bio-model 166 IF( lk_cfc ) CALL trc_ini_cfc ! CFC tracers 167 IF( lk_c14b ) CALL trc_ini_c14b ! C14 bomb tracer 168 IF( lk_my_trc ) CALL trc_ini_my_trc ! MY_TRC tracers 150 USE trcini_pisces ! PISCES initialisation 151 USE trcini_cfc ! CFC initialisation 152 USE trcini_c14 ! C14 initialisation 153 USE trcini_age ! age initialisation 154 USE trcini_my_trc ! MY_TRC initialisation 155 ! 156 INTEGER :: jn 157 !!---------------------------------------------------------------------- 158 ! 159 ! Pass sn_tracer fields to specialized arrays 160 DO jn = 1, jp_bgc 161 ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname ) 162 ctrcln (jn) = TRIM( sn_tracer(jn)%cllname ) 163 ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) 164 ln_trc_ini(jn) = sn_tracer(jn)%llinit 165 ln_trc_sbc(jn) = sn_tracer(jn)%llsbc 166 ln_trc_cbc(jn) = sn_tracer(jn)%llcbc 167 ln_trc_obc(jn) = sn_tracer(jn)%llobc 168 END DO 169 ! 170 IF( ln_pisces ) CALL trc_ini_pisces ! PISCES model 171 IF( ln_my_trc ) CALL trc_ini_my_trc ! MY_TRC model 172 IF( ll_cfc ) CALL trc_ini_cfc ! CFC's 173 IF( ln_c14 ) CALL trc_ini_c14 ! C14 model 174 IF( ln_age ) CALL trc_ini_age ! AGE 175 ! 176 IF(lwp) THEN ! control print 177 WRITE(numout,*) 178 WRITE(numout,*) ' trc_init: Summary for selected passive tracers' 179 WRITE(numout,*) ' ~~~~~~~~~~~~~~' 180 WRITE(numout,*) ' ID NAME INI SBC CBC OBC' 181 DO jn = 1, jptra 182 WRITE(numout,9001) jn, TRIM(ctrcnm(jn)), ln_trc_ini(jn), ln_trc_sbc(jn),ln_trc_cbc(jn),ln_trc_obc(jn) 183 END DO 184 ENDIF 185 9001 FORMAT(1x,i3,1x,a10,3x,l2,3x,l2,3x,l2,3x,l2) 169 186 ! 170 187 END SUBROUTINE trc_ini_sms … … 207 224 ! 208 225 ! Initialisation of tracers Initial Conditions 209 IF( ln_trcdta ) CALL trc_dta_ini t(jptra)226 IF( ln_trcdta ) CALL trc_dta_ini(jptra) 210 227 211 228 ! Initialisation of tracers Boundary Conditions 212 IF( l k_my_trc ) CALL trc_bc_init(jptra)229 IF( ln_my_trc ) CALL trc_bc_ini(jptra) 213 230 214 231 IF( ln_rsttr ) THEN … … 217 234 ! 218 235 ELSE 219 ! 220 IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN ! Initialisation of tracer from a file that may also be used for damping221 ! 236 ! Initialisation of tracer from a file that may also be used for damping 237 IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN 238 ! update passive tracers arrays with input data read from file 222 239 DO jn = 1, jptra 223 IF( ln_trc_ini(jn) ) THEN ! update passive tracers arrays with input data read from file240 IF( ln_trc_ini(jn) ) THEN 224 241 jl = n_trc_index(jn) 225 CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl) ) ! read tracer data at nit000 226 trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:) 242 CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl), trn(:,:,:,jn) ) 227 243 ! 228 IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN !== deallocate data structure ==!229 ! (data used only for initialisation)244 ! deallocate data structure if data are not used for damping 245 IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN 230 246 IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run' 231 DEALLOCATE( sf_trcdta(jl)%fnow ) ! arrays in the structure247 DEALLOCATE( sf_trcdta(jl)%fnow ) 232 248 IF( sf_trcdta(jl)%ln_tint ) DEALLOCATE( sf_trcdta(jl)%fdta ) 233 249 !
Note: See TracChangeset
for help on using the changeset viewer.