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