Changeset 11504 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/trcstp.F90
- Timestamp:
- 2019-09-06T09:23:31+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
r11483 r11504 18 18 USE trcwri 19 19 USE trcrst 20 USE trcsub !21 20 USE trdtrc_oce 22 21 USE trdmxl_trc … … 72 71 IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN ! at nittrc000 73 72 r2dttrc = rdttrc ! = rdttrc (use or restarting with Euler time stepping) 74 ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN ! at nittrc000 or nittrc000+175 r2dttrc = 2. * rdttrc ! = 2 rdttrc (leapfrog)76 73 ENDIF 77 74 ! … … 92 89 IF( l_trcdm2dc ) CALL trc_mean_qsr( kt ) 93 90 ! 94 IF( nn_dttrc == 1 ) THEN 95 IF( Kmm_oce /= Nnn_trc .OR. Kaa_oce /= Naa_trc .OR. Krhs_oce /= Nrhs_trc ) THEN 96 ! The nn_dttrc == 1 case depends on the OCE and TRC time indices being the same always. 97 ! If this is not the case then something has gone wrong. 98 CALL ctl_stop( 'trc_stp : nn_dttrc = 1 but OCE and TRC time indices are different! Something has gone wrong.' ) 99 ENDIF 100 ELSE 101 CALL trc_sub_stp( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! averaging physical variables for sub-stepping 91 IF( Kmm_oce /= Nnn_trc .OR. Kaa_oce /= Naa_trc .OR. Krhs_oce /= Nrhs_trc ) THEN 92 ! The OCE and TRC time indices should be the same always. 93 ! If this is not the case then something has gone wrong. 94 CALL ctl_stop( 'trc_stp : OCE and TRC time indices are different! Something has gone wrong.' ) 102 95 ENDIF 103 96 ! 104 IF( MOD( kt , nn_dttrc ) == 0 ) THEN ! only every nn_dttrc time step 105 ! 106 IF(ln_ctl) THEN 107 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear 108 CALL prt_ctl_trc_info(charout) 109 ENDIF 110 ! 111 tr(:,:,:,:,Nrhs_trc) = 0.e0 112 ! 113 CALL trc_rst_opn ( kt ) ! Open tracer restart file 114 IF( lrst_trc ) CALL trc_rst_cal ( kt, 'WRITE' ) ! calendar 115 CALL trc_wri ( kt, Nnn_trc ) ! output of passive tracers with iom I/O manager 116 CALL trc_sms ( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! tracers: sinks and sources 117 CALL trc_trp ( kt, Nbb_trc, Nnn_trc, Nrhs_trc, Naa_trc ) ! transport of passive tracers 118 IF( kt == nittrc000 ) THEN 119 CALL iom_close( numrtr ) ! close input tracer restart file 120 IF(lwm) CALL FLUSH( numont ) ! flush namelist output 121 ENDIF 122 IF( lrst_trc ) CALL trc_rst_wri ( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! write tracer restart file 123 IF( lk_trdmxl_trc ) CALL trd_mxl_trc ( kt, Nnn_trc ) ! trends: Mixed-layer 124 ! 125 IF( nn_dttrc /= 1 ) CALL trc_sub_reset( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! resetting physical variables when sub-stepping 126 ! 127 ENDIF 97 ! 98 IF(ln_ctl) THEN 99 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear 100 CALL prt_ctl_trc_info(charout) 101 ENDIF 102 ! 103 tr(:,:,:,:,Nrhs_trc) = 0.e0 104 ! 105 CALL trc_rst_opn ( kt ) ! Open tracer restart file 106 IF( lrst_trc ) CALL trc_rst_cal ( kt, 'WRITE' ) ! calendar 107 CALL trc_wri ( kt, Nnn_trc ) ! output of passive tracers with iom I/O manager 108 CALL trc_sms ( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! tracers: sinks and sources 109 CALL trc_trp ( kt, Nbb_trc, Nnn_trc, Nrhs_trc, Naa_trc ) ! transport of passive tracers 110 IF( kt == nittrc000 ) THEN 111 CALL iom_close( numrtr ) ! close input tracer restart file 112 IF(lwm) CALL FLUSH( numont ) ! flush namelist output 113 ENDIF 114 IF( lrst_trc ) CALL trc_rst_wri ( kt, Nbb_trc, Nnn_trc, Nrhs_trc ) ! write tracer restart file 115 IF( lk_trdmxl_trc ) CALL trd_mxl_trc ( kt, Nnn_trc ) ! trends: Mixed-layer 128 116 ! 129 117 IF (ll_trcstat) THEN
Note: See TracChangeset
for help on using the changeset viewer.