[1457] | 1 | MODULE trcwri |
---|
[1836] | 2 | !!=================================================================================== |
---|
[1457] | 3 | !! *** MODULE trcwri *** |
---|
[1836] | 4 | !! TOP : Output of passive tracers |
---|
| 5 | !!==================================================================================== |
---|
| 6 | !! History : 1.0 ! 2009-05 (C. Ethe) Original code |
---|
[1457] | 7 | !!---------------------------------------------------------------------- |
---|
| 8 | #if defined key_top && defined key_iomput |
---|
| 9 | !!---------------------------------------------------------------------- |
---|
| 10 | !! 'key_top' && 'key_iomput' TOP models |
---|
| 11 | !!---------------------------------------------------------------------- |
---|
[1836] | 12 | !! trc_wri_trc : outputs of concentration fields |
---|
[1457] | 13 | !!---------------------------------------------------------------------- |
---|
[1836] | 14 | USE dom_oce ! ocean space and time domain variables |
---|
| 15 | USE oce_trc |
---|
[1457] | 16 | USE trc |
---|
| 17 | USE iom |
---|
[1656] | 18 | USE dianam |
---|
[1457] | 19 | |
---|
| 20 | IMPLICIT NONE |
---|
| 21 | PRIVATE |
---|
| 22 | |
---|
| 23 | PUBLIC trc_wri |
---|
| 24 | |
---|
| 25 | !! * Substitutions |
---|
| 26 | # include "top_substitute.h90" |
---|
| 27 | |
---|
| 28 | CONTAINS |
---|
| 29 | |
---|
[1836] | 30 | SUBROUTINE trc_wri( kt ) |
---|
[1457] | 31 | !!--------------------------------------------------------------------- |
---|
| 32 | !! *** ROUTINE trc_wri *** |
---|
[1836] | 33 | !! |
---|
| 34 | !! ** Purpose : output passive tracers fields and dynamical trends |
---|
| 35 | !!--------------------------------------------------------------------- |
---|
| 36 | INTEGER, INTENT( in ) :: kt |
---|
| 37 | !!--------------------------------------------------------------------- |
---|
| 38 | |
---|
| 39 | ! |
---|
[2528] | 40 | CALL iom_setkt ( kt + nn_dttrc - 1 ) ! set the passive tracer time step |
---|
[1836] | 41 | CALL trc_wri_trc( kt ) ! outputs for tracer concentration |
---|
| 42 | CALL iom_setkt ( kt ) ! set the model time step |
---|
| 43 | ! |
---|
| 44 | END SUBROUTINE trc_wri |
---|
| 45 | |
---|
| 46 | SUBROUTINE trc_wri_trc( kt ) |
---|
| 47 | !!--------------------------------------------------------------------- |
---|
| 48 | !! *** ROUTINE trc_wri_trc *** |
---|
[1457] | 49 | !! |
---|
| 50 | !! ** Purpose : output passive tracers fields |
---|
| 51 | !!--------------------------------------------------------------------- |
---|
| 52 | INTEGER, INTENT( in ) :: kt ! ocean time-step |
---|
| 53 | INTEGER :: jn |
---|
[2528] | 54 | CHARACTER (len=20) :: cltra |
---|
[1656] | 55 | CHARACTER (len=40) :: clhstnam |
---|
| 56 | INTEGER :: inum = 11 ! temporary logical unit |
---|
[1457] | 57 | !!--------------------------------------------------------------------- |
---|
| 58 | |
---|
[2528] | 59 | IF( lk_offline .AND. kt == nit000 .AND. lwp ) THEN ! WRITE root name in date.file for use by postpro |
---|
| 60 | CALL dia_nam( clhstnam, nn_writetrc,' ' ) |
---|
| 61 | CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) |
---|
| 62 | WRITE(inum,*) clhstnam |
---|
| 63 | CLOSE(inum) |
---|
[1656] | 64 | ENDIF |
---|
[1457] | 65 | ! write the tracer concentrations in the file |
---|
| 66 | ! --------------------------------------- |
---|
| 67 | DO jn = 1, jptra |
---|
[2567] | 68 | cltra = TRIM( ctrcnm(jn) ) ! short title for tracer |
---|
[1457] | 69 | CALL iom_put( cltra, trn(:,:,:,jn) ) |
---|
| 70 | END DO |
---|
| 71 | ! |
---|
[1836] | 72 | END SUBROUTINE trc_wri_trc |
---|
[1457] | 73 | |
---|
| 74 | #else |
---|
| 75 | !!---------------------------------------------------------------------- |
---|
| 76 | !! Dummy module : No passive tracer |
---|
| 77 | !!---------------------------------------------------------------------- |
---|
| 78 | PUBLIC trc_wri |
---|
| 79 | CONTAINS |
---|
| 80 | SUBROUTINE trc_wri( kt ) ! Empty routine |
---|
| 81 | INTEGER, INTENT(in) :: kt |
---|
| 82 | END SUBROUTINE trc_wri |
---|
| 83 | #endif |
---|
| 84 | |
---|
[2528] | 85 | !!---------------------------------------------------------------------- |
---|
| 86 | !! NEMO/TOP 3.3 , NEMO Consortium (2010) |
---|
| 87 | !! $Id$ |
---|
| 88 | !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) |
---|
[1457] | 89 | !!====================================================================== |
---|
| 90 | END MODULE trcwri |
---|