[1457] | 1 | MODULE trcwri |
---|
[3294] | 2 | !!====================================================================== |
---|
[1457] | 3 | !! *** MODULE trcwri *** |
---|
[1836] | 4 | !! TOP : Output of passive tracers |
---|
[3294] | 5 | !!====================================================================== |
---|
[1836] | 6 | !! History : 1.0 ! 2009-05 (C. Ethe) Original code |
---|
[1457] | 7 | !!---------------------------------------------------------------------- |
---|
[14239] | 8 | #if defined key_top && defined key_xios |
---|
[1457] | 9 | !!---------------------------------------------------------------------- |
---|
[3294] | 10 | !! 'key_top' TOP models |
---|
[1457] | 11 | !!---------------------------------------------------------------------- |
---|
[1836] | 12 | !! trc_wri_trc : outputs of concentration fields |
---|
[1457] | 13 | !!---------------------------------------------------------------------- |
---|
[3294] | 14 | USE dom_oce ! ocean space and time domain variables |
---|
| 15 | USE oce_trc ! shared variables between ocean and passive tracers |
---|
| 16 | USE trc ! passive tracers common variables |
---|
| 17 | USE iom ! I/O manager |
---|
| 18 | USE dianam ! Output file name |
---|
[3295] | 19 | USE trcwri_pisces |
---|
[3680] | 20 | USE trcwri_cfc |
---|
[7646] | 21 | USE trcwri_c14 |
---|
| 22 | USE trcwri_age |
---|
[3680] | 23 | USE trcwri_my_trc |
---|
[1457] | 24 | |
---|
| 25 | IMPLICIT NONE |
---|
| 26 | PRIVATE |
---|
| 27 | |
---|
| 28 | PUBLIC trc_wri |
---|
| 29 | |
---|
[14255] | 30 | !! * Substitutions |
---|
| 31 | # include "do_loop_substitute.h90" |
---|
| 32 | # include "domzgr_substitute.h90" |
---|
| 33 | |
---|
[1457] | 34 | CONTAINS |
---|
| 35 | |
---|
[12377] | 36 | SUBROUTINE trc_wri( kt, Kmm ) |
---|
[1457] | 37 | !!--------------------------------------------------------------------- |
---|
| 38 | !! *** ROUTINE trc_wri *** |
---|
[1836] | 39 | !! |
---|
| 40 | !! ** Purpose : output passive tracers fields and dynamical trends |
---|
| 41 | !!--------------------------------------------------------------------- |
---|
[3750] | 42 | INTEGER, INTENT( in ) :: kt |
---|
[12377] | 43 | INTEGER, INTENT( in ) :: Kmm ! time level indices |
---|
[1836] | 44 | ! |
---|
[14255] | 45 | INTEGER :: jk, jn |
---|
[3294] | 46 | CHARACTER (len=20) :: cltra |
---|
| 47 | CHARACTER (len=40) :: clhstnam |
---|
[1656] | 48 | INTEGER :: inum = 11 ! temporary logical unit |
---|
[14255] | 49 | REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d ! 3D workspace |
---|
[1457] | 50 | !!--------------------------------------------------------------------- |
---|
[3750] | 51 | ! |
---|
[9124] | 52 | IF( ln_timing ) CALL timing_start('trc_wri') |
---|
[3750] | 53 | ! |
---|
[12280] | 54 | IF( l_offline ) THEN ! WRITE root name in date.file for use by postpro |
---|
| 55 | IF( kt == nittrc000 .AND. lwp ) THEN ! WRITE root name in date.file for use by postpro |
---|
| 56 | CALL dia_nam( clhstnam, nn_writetrc,' ' ) |
---|
| 57 | CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
| 58 | WRITE(inum,*) clhstnam |
---|
| 59 | CLOSE(inum) |
---|
[14255] | 60 | ENDIF |
---|
[12377] | 61 | |
---|
[14255] | 62 | ! Output of initial vertical scale factor |
---|
| 63 | CALL iom_put( "e3t_0", e3t_0(:,:,:) ) |
---|
| 64 | CALL iom_put( "e3u_0", e3u_0(:,:,:) ) |
---|
| 65 | CALL iom_put( "e3v_0", e3v_0(:,:,:) ) |
---|
| 66 | ! |
---|
| 67 | IF( .NOT.ln_linssh ) CALL iom_put( "ssh" , ssh(:,:,Kmm) ) ! sea surface height |
---|
| 68 | ! |
---|
| 69 | IF ( iom_use("e3t") ) THEN ! time-varying e3t |
---|
| 70 | DO jk = 1, jpk |
---|
| 71 | z3d(:,:,jk) = e3t(:,:,jk,Kmm) |
---|
| 72 | END DO |
---|
| 73 | CALL iom_put( "e3t", z3d(:,:,:) ) |
---|
| 74 | ENDIF |
---|
| 75 | IF ( iom_use("e3u") ) THEN ! time-varying e3u |
---|
| 76 | DO jk = 1, jpk |
---|
| 77 | z3d(:,:,jk) = e3u(:,:,jk,Kmm) |
---|
| 78 | END DO |
---|
| 79 | CALL iom_put( "e3u", z3d(:,:,:) ) |
---|
| 80 | ENDIF |
---|
| 81 | IF ( iom_use("e3v") ) THEN ! time-varying e3v |
---|
| 82 | DO jk = 1, jpk |
---|
| 83 | z3d(:,:,jk) = e3v(:,:,jk,Kmm) |
---|
| 84 | END DO |
---|
| 85 | CALL iom_put( "e3v", z3d(:,:,:) ) |
---|
| 86 | ENDIF |
---|
| 87 | ! |
---|
[1656] | 88 | ENDIF |
---|
[14255] | 89 | ! |
---|
[1457] | 90 | ! write the tracer concentrations in the file |
---|
| 91 | ! --------------------------------------- |
---|
[12377] | 92 | IF( ln_pisces ) CALL trc_wri_pisces( Kmm ) ! PISCES |
---|
| 93 | IF( ll_cfc ) CALL trc_wri_cfc ( Kmm ) ! surface fluxes of CFC |
---|
| 94 | IF( ln_c14 ) CALL trc_wri_c14 ( Kmm ) ! surface fluxes of C14 |
---|
| 95 | IF( ln_age ) CALL trc_wri_age ( Kmm ) ! AGE tracer |
---|
| 96 | IF( ln_my_trc ) CALL trc_wri_my_trc( Kmm ) ! MY_TRC tracers |
---|
[1457] | 97 | ! |
---|
[9124] | 98 | IF( ln_timing ) CALL timing_stop('trc_wri') |
---|
[3750] | 99 | ! |
---|
| 100 | END SUBROUTINE trc_wri |
---|
[1457] | 101 | |
---|
| 102 | #else |
---|
| 103 | !!---------------------------------------------------------------------- |
---|
| 104 | !! Dummy module : No passive tracer |
---|
| 105 | !!---------------------------------------------------------------------- |
---|
| 106 | PUBLIC trc_wri |
---|
| 107 | CONTAINS |
---|
[12377] | 108 | SUBROUTINE trc_wri( kt, Kmm ) ! Empty routine |
---|
[1457] | 109 | INTEGER, INTENT(in) :: kt |
---|
[12377] | 110 | INTEGER, INTENT(in) :: Kmm ! time level indices |
---|
[1457] | 111 | END SUBROUTINE trc_wri |
---|
| 112 | #endif |
---|
| 113 | |
---|
[2528] | 114 | !!---------------------------------------------------------------------- |
---|
[10067] | 115 | !! NEMO/TOP 4.0 , NEMO Consortium (2018) |
---|
[2528] | 116 | !! $Id$ |
---|
[10068] | 117 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
[1457] | 118 | !!====================================================================== |
---|
| 119 | END MODULE trcwri |
---|