[1457] | 1 | MODULE trcstp |
---|
| 2 | !!====================================================================== |
---|
| 3 | !! *** MODULE trcstp *** |
---|
| 4 | !! Time-stepping : time loop of opa for passive tracer |
---|
| 5 | !!====================================================================== |
---|
| 6 | #if defined key_top |
---|
| 7 | !!---------------------------------------------------------------------- |
---|
| 8 | !! trc_stp : passive tracer system time-stepping |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! * Modules used |
---|
| 11 | USE oce_trc ! ocean dynamics and active tracers variables |
---|
| 12 | USE trp_trc |
---|
| 13 | USE trctrp ! passive tracers transport |
---|
| 14 | USE trcsms ! passive tracers sources and sinks |
---|
| 15 | USE prtctl_trc ! Print control for debbuging |
---|
| 16 | USE trcdia |
---|
| 17 | USE trcwri |
---|
| 18 | USE trcrst |
---|
| 19 | USE trdmld_trc_oce |
---|
| 20 | USE trdmld_trc |
---|
| 21 | USE iom |
---|
| 22 | USE in_out_manager |
---|
| 23 | |
---|
| 24 | IMPLICIT NONE |
---|
| 25 | PRIVATE |
---|
| 26 | |
---|
| 27 | !! * Routine accessibility |
---|
| 28 | PUBLIC trc_stp ! called by step |
---|
| 29 | !!---------------------------------------------------------------------- |
---|
| 30 | !! TOP 1.0 , LOCEAN-IPSL (2005) |
---|
| 31 | !! $Id: trcstp.F90 1285 2009-02-03 13:38:51Z cetlod $ |
---|
| 32 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
| 33 | !!---------------------------------------------------------------------- |
---|
| 34 | |
---|
| 35 | CONTAINS |
---|
| 36 | |
---|
| 37 | SUBROUTINE trc_stp( kt ) |
---|
| 38 | !!------------------------------------------------------------------- |
---|
| 39 | !! *** ROUTINE trc_stp *** |
---|
| 40 | !! |
---|
| 41 | !! ** Purpose : Time loop of opa for passive tracer |
---|
| 42 | !! |
---|
| 43 | !! ** Method : |
---|
| 44 | !! Compute the passive tracers trends |
---|
| 45 | !! Update the passive tracers |
---|
| 46 | !! |
---|
| 47 | !! History : |
---|
| 48 | !! 9.0 ! 04-03 (C. Ethe) Original |
---|
| 49 | !!------------------------------------------------------------------- |
---|
| 50 | !! * Arguments |
---|
| 51 | INTEGER, INTENT( in ) :: kt ! ocean time-step index |
---|
| 52 | CHARACTER (len=25) :: charout |
---|
| 53 | |
---|
| 54 | ! this ROUTINE is called only every ndttrc time step |
---|
| 55 | IF( MOD( kt , ndttrc ) /= 0 ) RETURN |
---|
| 56 | |
---|
| 57 | IF(ln_ctl) THEN |
---|
| 58 | WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear |
---|
| 59 | CALL prt_ctl_trc_info(charout) |
---|
| 60 | ENDIF |
---|
| 61 | |
---|
| 62 | IF( kt == nittrc000 .AND. lk_trdmld_trc ) & |
---|
| 63 | & CALL trd_mld_trc_init ! trends: Mixed-layer |
---|
| 64 | CALL trc_rst_opn( kt ) ! Open tracer restart file |
---|
| 65 | CALL trc_sms( kt ) ! tracers: sink and source |
---|
| 66 | CALL trc_trp( kt ) ! transport of passive tracers |
---|
| 67 | IF( kt == nittrc000 ) CALL iom_close( numrtr ) ! close input passive tracers restart file |
---|
| 68 | IF( lrst_trc ) CALL trc_rst_wri( kt ) ! write tracer restart file |
---|
| 69 | IF( lk_iomput ) THEN |
---|
| 70 | CALL trc_wri( kt ) ! output of passive tracers |
---|
| 71 | ELSE |
---|
| 72 | CALL trc_dia( kt ) ! diagnostics |
---|
| 73 | ENDIF |
---|
| 74 | IF( lk_trdmld_trc ) CALL trd_mld_trc( kt ) ! trends: Mixed-layer |
---|
| 75 | |
---|
| 76 | END SUBROUTINE trc_stp |
---|
| 77 | |
---|
| 78 | #else |
---|
| 79 | !!---------------------------------------------------------------------- |
---|
| 80 | !! Default key NO passive tracers |
---|
| 81 | !!---------------------------------------------------------------------- |
---|
| 82 | CONTAINS |
---|
| 83 | SUBROUTINE trc_stp( kt ) ! Empty routine |
---|
| 84 | INTEGER, INTENT(in) :: kt |
---|
| 85 | WRITE(*,*) 'trc_stp: You should not have seen this print! error?', kt |
---|
| 86 | END SUBROUTINE trc_stp |
---|
| 87 | #endif |
---|
| 88 | |
---|
| 89 | !!====================================================================== |
---|
| 90 | END MODULE trcstp |
---|