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 4230 for branches/2013/dev_LOCEAN_CMCC_INGV_2013/NEMOGCM/NEMO/TOP_SRC/trcini.F90 – NEMO

Ignore:
Timestamp:
2013-11-18T12:57:11+01:00 (10 years ago)
Author:
cetlod
Message:

dev_LOCEAN_CMCC_INGV_2013 : merge LOCEAN & CMCC_INGV branches, see ticket #1182

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_LOCEAN_CMCC_INGV_2013/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r4152 r4230  
    2424   USE trcini_c14b     ! C14 bomb initialisation 
    2525   USE trcini_my_trc   ! MY_TRC   initialisation 
    26    USE trcdta          ! initialisation form files 
     26   USE trcdta          ! initialisation from files 
    2727   USE daymod          ! calendar manager 
    2828   USE zpshde          ! partial step: hor. derivative   (zps_hde routine) 
     
    5858      INTEGER ::   jk, jn, jl    ! dummy loop indices 
    5959      CHARACTER (len=25) :: charout 
    60       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::  ztrcdta   ! 4D  workspace 
     60      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 4D  workspace 
    6161      !!--------------------------------------------------------------------- 
    6262      ! 
     
    102102      ENDIF 
    103103 
    104       IF( ln_trcdta )      CALL trc_dta_init 
     104      IF( ln_trcdta )      CALL trc_dta_init(jptra) 
    105105 
    106106 
     
    113113        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping 
    114114            ! 
    115             CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )    ! Memory allocation 
    116             ! 
    117             CALL trc_dta( nit000, ztrcdta )   ! read tracer data at nit000 
     115            CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )    ! Memory allocation 
    118116            ! 
    119117            DO jn = 1, jptra 
    120118               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file 
    121119                  jl = n_trc_index(jn)  
    122                   trn(:,:,:,jn) = ztrcdta(:,:,:,jl) * tmask(:,:,:)   
     120                  CALL trc_dta( nit000, sf_trcdta(jl),rf_trfac(jl) )   ! read tracer data at nit000 
     121                  ztrcdta(:,:,:) = sf_trcdta(jl)%fnow(:,:,:) 
     122                  trn(:,:,:,jn) = ztrcdta(:,:,:) * tmask(:,:,:)   
     123                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==! 
     124                     !                                                    (data used only for initialisation) 
     125                     IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run' 
     126                                                  DEALLOCATE( sf_trcdta(jl)%fnow )     !  arrays in the structure 
     127                     IF( sf_trcdta(jl)%ln_tint )  DEALLOCATE( sf_trcdta(jl)%fdta ) 
     128                     ! 
     129                  ENDIF 
    123130               ENDIF 
    124131            ENDDO 
    125             CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 
     132            CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta ) 
    126133        ENDIF 
    127134        ! 
Note: See TracChangeset for help on using the changeset viewer.