Changeset 11480 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/trcstp.F90
- Timestamp:
- 2019-08-29T11:23:25+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/trcstp.F90
r11027 r11480 38 38 39 39 !!---------------------------------------------------------------------- 40 !! time level indices 41 !!---------------------------------------------------------------------- 42 INTEGER, PUBLIC :: Nbb_trc, Nnn_trc, Naa_trc, Nrhs_trc !! used by trc_init 43 44 !!---------------------------------------------------------------------- 40 45 !! NEMO/TOP 4.0 , NEMO Consortium (2018) 41 46 !! $Id$ … … 44 49 CONTAINS 45 50 46 SUBROUTINE trc_stp( kt, Kbb , Kmm, Krhs, Kaa)51 SUBROUTINE trc_stp( kt, Kbb_oce, Kmm_oce, Krhs_oce, Kaa_oce ) 47 52 !!------------------------------------------------------------------- 48 53 !! *** ROUTINE trc_stp *** … … 54 59 !!------------------------------------------------------------------- 55 60 INTEGER, INTENT( in ) :: kt ! ocean time-step index 56 INTEGER, INTENT( in ) :: Kbb , Kmm, Krhs, Kaa! time level indices61 INTEGER, INTENT( in ) :: Kbb_oce, Kmm_oce, Krhs_oce, Kaa_oce ! time level indices 57 62 ! 58 63 INTEGER :: jk, jn ! dummy loop indices … … 76 81 IF( .NOT.ln_linssh ) THEN ! update ocean volume due to ssh temporal evolution 77 82 DO jk = 1, jpk 78 cvol(:,:,jk) = e1e2t(:,:) * e3t(:,:,jk,Kmm ) * tmask(:,:,jk)83 cvol(:,:,jk) = e1e2t(:,:) * e3t(:,:,jk,Kmm_oce) * tmask(:,:,jk) 79 84 END DO 80 85 IF ( ln_ctl .OR. kt == nitrst .OR. ( ln_check_mass .AND. kt == nitend ) & … … 86 91 IF( l_trcdm2dc ) CALL trc_mean_qsr( kt ) 87 92 ! 88 IF( nn_dttrc /= 1 ) CALL trc_sub_stp( kt, Kbb, Kmm, Krhs ) ! averaging physical variables for sub-stepping 93 IF( nn_dttrc == 1 ) THEN 94 IF(lwp) WRITE(numout,*) "Kbb_oce, Kmm_oce, Kaa_oce, Krhs_oce : ",Kbb_oce, Kmm_oce, Kaa_oce, Krhs_oce 95 IF(lwp) WRITE(numout,*) "Nbb_trc, Nnn_trc, Naa_trc, Nrhs_trc : ",Nbb_trc, Nnn_trc, Naa_trc, Nrhs_trc 96 IF(lwp) CALL FLUSH(numout) 97 CALL mppsync() 98 IF( Kmm_oce /= Nnn_trc .OR. Kaa_oce /= Naa_trc .OR. Krhs_oce /= Nrhs_trc ) THEN 99 ! The nn_dttrc == 1 case depends on the OCE and TRC time indices being the same always. 100 ! If this is not the case then something has gone wrong. 101 CALL ctl_stop( 'trc_stp : nn_dttrc = 1 but OCE and TRC time indices are different! Something has gone wrong.' ) 102 ENDIF 103 ELSE 104 CALL trc_sub_stp( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! averaging physical variables for sub-stepping 105 ENDIF 89 106 ! 90 107 IF( MOD( kt , nn_dttrc ) == 0 ) THEN ! only every nn_dttrc time step … … 95 112 ENDIF 96 113 ! 97 tr(:,:,:,:, Krhs) = 0.e0114 tr(:,:,:,:,Nrhs_trc) = 0.e0 98 115 ! 99 116 CALL trc_rst_opn ( kt ) ! Open tracer restart file 100 117 IF( lrst_trc ) CALL trc_rst_cal ( kt, 'WRITE' ) ! calendar 101 CALL trc_wri ( kt, Kmm )! output of passive tracers with iom I/O manager102 CALL trc_sms ( kt, Kbb, Kmm, Krhs )! tracers: sinks and sources103 CALL trc_trp ( kt, Kbb, Kmm, Krhs, Kaa) ! transport of passive tracers118 CALL trc_wri ( kt, Nnn_trc ) ! output of passive tracers with iom I/O manager 119 CALL trc_sms ( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! tracers: sinks and sources 120 CALL trc_trp ( kt, Nbb_trc, Nnn_trc, Nrhs_trc, Naa_trc ) ! transport of passive tracers 104 121 IF( kt == nittrc000 ) THEN 105 122 CALL iom_close( numrtr ) ! close input tracer restart file 106 123 IF(lwm) CALL FLUSH( numont ) ! flush namelist output 107 124 ENDIF 108 IF( lrst_trc ) CALL trc_rst_wri ( kt, Kbb, Kmm, Krhs) ! write tracer restart file109 IF( lk_trdmxl_trc ) CALL trd_mxl_trc ( kt, Kmm) ! trends: Mixed-layer110 ! 111 IF( nn_dttrc /= 1 ) CALL trc_sub_reset( kt, Kbb, Kmm, Krhs) ! resetting physical variables when sub-stepping125 IF( lrst_trc ) CALL trc_rst_wri ( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! write tracer restart file 126 IF( lk_trdmxl_trc ) CALL trd_mxl_trc ( kt, Nnn_trc ) ! trends: Mixed-layer 127 ! 128 IF( nn_dttrc /= 1 ) CALL trc_sub_reset( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! resetting physical variables when sub-stepping 112 129 ! 113 130 ENDIF … … 116 133 ztrai = 0._wp ! content of all tracers 117 134 DO jn = 1, jptra 118 ztrai = ztrai + glob_sum( 'trcstp', tr(:,:,:,jn, Kmm) * cvol(:,:,:) )135 ztrai = ztrai + glob_sum( 'trcstp', tr(:,:,:,jn,Nnn_trc) * cvol(:,:,:) ) 119 136 END DO 120 137 IF( lwm ) WRITE(numstr,9300) kt, ztrai / areatot
Note: See TracChangeset
for help on using the changeset viewer.