- 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/trcstp.F90
r6487 r8280 55 55 !! Update the passive tracers 56 56 !!------------------------------------------------------------------- 57 58 USE dom_oce, ONLY: narea 59 57 60 INTEGER, INTENT( in ) :: kt ! ocean time-step index 58 61 INTEGER :: jk, jn ! dummy loop indices … … 87 90 tra(:,:,:,:) = 0.e0 88 91 ! 92 # if defined key_debug_medusa 93 IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp begins at kt =', kt 94 CALL flush(numout) 95 # endif 89 96 CALL trc_rst_opn ( kt ) ! Open tracer restart file 97 # if defined key_debug_medusa 98 CALL trc_rst_stat 99 CALL trc_rst_tra_stat 100 # endif 90 101 IF( lrst_trc ) CALL trc_rst_cal ( kt, 'WRITE' ) ! calendar 91 102 IF( lk_iomput ) THEN ; CALL trc_wri ( kt ) ! output of passive tracers with iom I/O manager … … 93 104 ENDIF 94 105 CALL trc_sms ( kt ) ! tracers: sinks and sources 106 # if defined key_debug_medusa 107 IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp SMS complete at kt =', kt 108 CALL trc_rst_stat 109 CALL trc_rst_tra_stat 110 CALL flush(numout) 111 # endif 95 112 CALL trc_trp ( kt ) ! transport of passive tracers 113 # if defined key_debug_medusa 114 IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp transport complete at kt =', kt 115 CALL trc_rst_stat 116 CALL trc_rst_tra_stat 117 CALL flush(numout) 118 # endif 96 119 IF( kt == nittrc000 ) THEN 97 120 CALL iom_close( numrtr ) ! close input tracer restart file … … 102 125 ! 103 126 IF( nn_dttrc /= 1 ) CALL trc_sub_reset( kt ) ! resetting physical variables when sub-stepping 104 ! 105 ENDIF 106 ! 107 ztrai = 0._wp ! content of all tracers 108 DO jn = 1, jptra 109 ztrai = ztrai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:) ) 110 END DO 111 IF( lwp ) WRITE(numstr,9300) kt, ztrai / areatot 112 9300 FORMAT(i10,e18.10) 127 # if defined key_debug_medusa 128 IF(lwp) WRITE(numout,*) ' MEDUSA trc_stp ends at kt =', kt 129 CALL flush(numout) 130 # endif 131 ! 132 ENDIF 133 ! 134 IF (ln_ctl) THEN 135 ! The following code is very expensive since it involves multiple 136 ! reproducible global sums over all tracer fields and is potentially 137 ! called on every timestep. The results it produces are purely for 138 ! informational purposes and do not affect model evolution. 139 ! Hence we restrict its use by protecting it with the ln_ctl RTL 140 ! which should normally only be used under debugging conditions 141 ! and not in operational runs. We also need to restrict output 142 ! to the master PE since there's no point duplicating the same results 143 ! on all processors. 144 ztrai = 0._wp ! content of all tracers 145 DO jn = 1, jptra 146 ztrai = ztrai + glob_sum( trn(:,:,:,jn) * cvol(:,:,:) ) 147 END DO 148 IF( numstr /= -1 ) WRITE(numstr,9300) kt, ztrai / areatot 149 9300 FORMAT(i10,e18.10) 150 ENDIF 113 151 ! 114 152 IF( nn_timing == 1 ) CALL timing_stop('trc_stp')
Note: See TracChangeset
for help on using the changeset viewer.