New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 1450 for trunk/NEMO/TOP_SRC/trcdia.F90 – NEMO

Ignore:
Timestamp:
2009-05-15T16:12:12+02:00 (15 years ago)
Author:
cetlod
Message:

implementation of iom_put in TOP, see ticket:432

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/TOP_SRC/trcdia.F90

    r1391 r1450  
    2929   USE lib_mpp 
    3030   USE ioipsl 
     31   USE iom 
    3132 
    3233   IMPLICIT NONE 
     
    117118      ! -------------- 
    118119 
     120      CALL iom_setkt( kt + ndttrc - 1 ) 
     121 
    119122      ! local variable for debugging 
    120123      ll_print = .FALSE.                  ! change it to true for more control print 
     
    207210 
    208211      DO jn = 1, jptra 
    209          IF( lutsav(jn) ) THEN 
    210             cltra = ctrcnm(jn)      ! short title for tracer 
    211             CALL histwrite( nit5, cltra, it, trn(:,:,:,jn), ndimt50, ndext50 ) 
    212          ENDIF 
     212         cltra = ctrcnm(jn)      ! short title for tracer 
     213         IF( lutsav(jn) ) CALL histwrite( nit5, cltra, it, trn(:,:,:,jn), ndimt50, ndext50 ) 
     214         CALL iom_put( ctrcnm(jn), trn(:,:,:,jn) ) 
    213215      END DO 
    214216 
     
    217219      IF( kt == nitend .OR. kindic < 0 )   CALL histclo( nit5 ) 
    218220      ! 
     221      CALL iom_setkt( kt ) 
     222 
    219223   END SUBROUTINE trcdit_wr 
    220224 
     
    252256      ! 0. Initialisation 
    253257      ! ----------------- 
     258       
     259      CALL iom_setkt( kt + ndttrc - 1 ) 
    254260 
    255261      ! local variable for debugging 
     
    439445            END DO 
    440446         END IF 
     447         CALL iom_put( ctrcnm(jn), trn(:,:,:,jn) ) 
    441448      END DO 
    442449 
     
    449456      ENDIF 
    450457      ! 
     458      CALL iom_setkt( kt ) 
     459 
    451460   END SUBROUTINE trcdid_wr 
    452461 
     
    484493      CHARACTER (len=20) ::   cltra, cltrau 
    485494      CHARACTER (len=80) ::   cltral 
    486       INTEGER  ::   jn 
     495      INTEGER  ::   jl 
    487496      INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it, itmod 
    488497      REAL(wp) ::   zsto, zout, zdt 
     
    491500      ! Initialisation 
    492501      ! -------------- 
    493  
     502    
     503      CALL iom_setkt( kt + ndttrc - 1 ) 
     504       
    494505      ! local variable for debugging 
    495506      ll_print = .FALSE. 
     
    546557 
    547558         ! more 3D horizontal arrays 
    548          DO jn = 1, jpdia3d 
    549             cltra  = ctrc3d(jn)   ! short title for 3D diagnostic 
    550             cltral = ctrc3l(jn)   ! long title for 3D diagnostic 
    551             cltrau = ctrc3u(jn)   ! UNIT for 3D diagnostic 
     559         DO jl = 1, jpdia3d 
     560            cltra  = ctrc3d(jl)   ! short title for 3D diagnostic 
     561            cltral = ctrc3l(jl)   ! long title for 3D diagnostic 
     562            cltrau = ctrc3u(jl)   ! UNIT for 3D diagnostic 
    552563            CALL histdef( nitd, cltra, cltral, cltrau, jpi, jpj, nhoritd,   & 
    553564               &          ipk, 1, ipk,  ndepitd, 32, clop, zsto, zout ) 
     
    555566 
    556567         ! more 2D horizontal arrays 
    557          DO jn = 1, jpdia2d 
    558             cltra  = ctrc2d(jn)    ! short title for 2D diagnostic 
    559             cltral = ctrc2l(jn)   ! long title for 2D diagnostic 
    560             cltrau = ctrc2u(jn)   ! UNIT for 2D diagnostic 
     568         DO jl = 1, jpdia2d 
     569            cltra  = ctrc2d(jl)    ! short title for 2D diagnostic 
     570            cltral = ctrc2l(jl)   ! long title for 2D diagnostic 
     571            cltrau = ctrc2u(jl)   ! UNIT for 2D diagnostic 
    561572            CALL histdef( nitd, cltra, cltral, cltrau, jpi, jpj, nhoritd,  & 
    562573               &          1, 1, 1,  -99, 32, clop, zsto, zout ) 
     
    583594 
    584595      ! more 3D horizontal arrays 
    585       DO jn = 1, jpdia3d 
    586          cltra = ctrc3d(jn)   ! short title for 3D diagnostic 
    587          CALL histwrite( nitd, cltra, it, trc3d(:,:,:,jn), ndimt50 ,ndext50) 
     596      DO jl = 1, jpdia3d 
     597         cltra = ctrc3d(jl)   ! short title for 3D diagnostic 
     598         CALL histwrite( nitd, cltra, it, trc3d(:,:,:,jl), ndimt50 ,ndext50) 
     599         CALL iom_put( cltra, trc3d(:,:,:,jl) ) 
    588600      END DO 
    589601 
    590602      ! more 2D horizontal arrays 
    591       DO jn = 1, jpdia2d 
    592          cltra = ctrc2d(jn)   ! short title for 2D diagnostic 
    593          CALL histwrite(nitd, cltra, it, trc2d(:,:,jn), ndimt51  ,ndext51) 
     603      DO jl = 1, jpdia2d 
     604         cltra = ctrc2d(jl)   ! short title for 2D diagnostic 
     605         CALL histwrite(nitd, cltra, it, trc2d(:,:,jl), ndimt51  ,ndext51) 
     606         CALL iom_put( cltra, trc2d(:,:,jl) ) 
    594607      END DO 
    595608 
     
    598611      IF( kt == nitend .OR. kindic < 0 )   CALL histclo(nitd) 
    599612      ! 
     613      CALL iom_setkt( kt ) 
     614 
    600615   END SUBROUTINE trcdii_wr 
    601616 
     
    634649      CHARACTER (len=20) ::   cltra, cltrau 
    635650      CHARACTER (len=80) ::   cltral 
    636       INTEGER  ::   ji, jj, jk, jn 
     651      INTEGER  ::   ji, jj, jk, jl 
    637652      INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it, itmod 
    638653      REAL(wp) ::   zsto, zout, zdt 
     
    642657      ! -------------- 
    643658 
     659      CALL iom_setkt( kt + ndttrc - 1 ) 
     660       
    644661      ! local variable for debugging 
    645662      ll_print = .FALSE. 
     
    689706         ! Declare all the output fields as NETCDF variables 
    690707         ! biological trends 
    691          DO jn = 1, jpdiabio 
    692             cltra  = ctrbio(jn)   ! short title for biological diagnostic 
    693             cltral = ctrbil(jn)   ! long title for biological diagnostic 
    694             cltrau = ctrbiu(jn)   ! UNIT for biological diagnostic 
     708         DO jl = 1, jpdiabio 
     709            cltra  = ctrbio(jl)   ! short title for biological diagnostic 
     710            cltral = ctrbil(jl)   ! long title for biological diagnostic 
     711            cltrau = ctrbiu(jl)   ! UNIT for biological diagnostic 
    695712            CALL histdef( nitb, cltra, cltral, cltrau, jpi, jpj, nhoritb,  & 
    696713               &         ipk, 1, ipk,  ndepitb, 32, clop, zsto, zout) 
     
    715732      ENDIF 
    716733 
    717       DO jn = 1, jpdiabio 
    718          cltra = ctrbio(jn)  ! short title for biological diagnostic 
    719          CALL histwrite(nitb, cltra, it, trbio(:,:,:,jn), ndimt50,ndext50) 
     734      DO jl = 1, jpdiabio 
     735         cltra = ctrbio(jl)  ! short title for biological diagnostic 
     736         CALL histwrite(nitb, cltra, it, trbio(:,:,:,jl), ndimt50,ndext50) 
     737         CALL iom_put( cltra, trbio(:,:,:,jl) ) 
    720738      END DO 
    721739 
     
    724742      IF( kt == nitend .OR. kindic < 0 )   CALL histclo( nitb ) 
    725743      ! 
     744      CALL iom_setkt( kt ) 
     745 
    726746   END SUBROUTINE trcdib_wr 
    727747 
Note: See TracChangeset for help on using the changeset viewer.