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 6701 for trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90 – NEMO

Ignore:
Timestamp:
2016-06-13T17:29:32+02:00 (8 years ago)
Author:
lovato
Message:

#1677 - trunk: Update code for passive tracers data input and restoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r6607 r6701  
    203203      USE trcdta          ! initialisation from files 
    204204      ! 
    205       INTEGER ::   jk, jn, jl    ! dummy loop indices 
    206       REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrcdta 
     205      INTEGER :: jn, jl   ! dummy loop indices 
    207206      !!---------------------------------------------------------------------- 
    208207      ! 
     
    220219        ! 
    221220        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping 
    222             ! 
    223             CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 
    224             ! 
    225             CALL trc_dta( nit000, ztrcdta )   ! read tracer data at nit000 
    226221            ! 
    227222            DO jn = 1, jptra 
    228223               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    229224                  jl = n_trc_index(jn)  
    230                   trn(:,:,:,jn) = ztrcdta(:,:,:,jl) * rf_trfac(jl) 
     225                  CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl) )   ! read tracer data at nit000 
     226                  trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:)  
     227                  ! 
     228                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==! 
     229                     !                                                    (data used only for initialisation) 
     230                     IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run' 
     231                                                  DEALLOCATE( sf_trcdta(jl)%fnow )     !  arrays in the structure 
     232                     IF( sf_trcdta(jl)%ln_tint )  DEALLOCATE( sf_trcdta(jl)%fdta ) 
     233                     ! 
     234                  ENDIF 
    231235               ENDIF 
    232236            ENDDO 
    233237            ! 
    234             CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 
    235             !  
    236238        ENDIF 
    237239        ! 
Note: See TracChangeset for help on using the changeset viewer.