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 6688 for branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/trcini.F90 – NEMO

Ignore:
Timestamp:
2016-06-13T14:50:45+02:00 (8 years ago)
Author:
lovato
Message:

#1677 - v3.6_STABLE: Update code for passive tracers data input and restoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r6606 r6688  
    3030   USE trcsub          ! variables to substep passive tracers 
    3131   USE lib_mpp         ! distribued memory computing library 
    32    USE wrk_nemo 
    3332   USE sbc_oce 
    3433   USE trcice          ! tracers in sea ice 
     
    6261      INTEGER ::   jk, jn, jl    ! dummy loop indices 
    6362      CHARACTER (len=25) :: charout 
    64       REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrcdta 
    6563      !!--------------------------------------------------------------------- 
    6664      ! 
     
    122120        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping 
    123121            ! 
    124             CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 
    125             ! 
    126             CALL trc_dta( nit000, ztrcdta )   ! read tracer data at nit000 
    127             ! 
    128122            DO jn = 1, jptra 
    129123               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    130124                  jl = n_trc_index(jn)  
    131                   trn(:,:,:,jn) = ztrcdta(:,:,:,jl) * rf_trfac(jl) 
     125                  CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl) )   ! read tracer data at nit000 
     126                  trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:)  
     127                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==! 
     128                     !                                                    (data used only for initialisation) 
     129                     IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run' 
     130                                                  DEALLOCATE( sf_trcdta(jl)%fnow )     !  arrays in the structure 
     131                     IF( sf_trcdta(jl)%ln_tint )  DEALLOCATE( sf_trcdta(jl)%fdta ) 
     132                     ! 
     133                  ENDIF 
    132134               ENDIF 
    133135            ENDDO 
    134136            ! 
    135             CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 
    136             !  
    137137        ENDIF 
    138138        ! 
Note: See TracChangeset for help on using the changeset viewer.