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 7274 for branches/2015 – NEMO

Changeset 7274 for branches/2015


Ignore:
Timestamp:
2016-11-19T18:13:47+01:00 (7 years ago)
Author:
cetlod
Message:

Offline_vvl in 3.6 stable : minor bug correction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r6946_Offline_vvl/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90

    r6952 r7274  
    8585   REAL(wp) , ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: wslpjdta   ! meridional diapycnal slopes 
    8686 
     87   INTEGER, SAVE  :: nprevrec, nsecdyn 
    8788 
    8889   !! * Substitutions 
     
    118119      IF( nn_timing == 1 )  CALL timing_start( 'dta_dyn') 
    119120      ! 
     121      ! 
     122      nsecdyn = nsec_year + nsec1jan000   ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step 
     123      ! 
     124      IF( kt == nit000 ) THEN    ;    nprevrec = 0 
     125      ELSE                       ;    nprevrec = sf_dyn(jf_tem)%nrec_a(2) 
     126      ENDIF 
     127      ! 
    120128      CALL fld_read( kt, 1, sf_dyn )      !=  read data at kt time step   ==! 
     129      ! 
     130      IF( lk_ldfslp .AND. .NOT.lk_c1d )   CALL  dta_dyn_slp( kt )    ! Computation of slopes 
    121131      ! 
    122132      tsn(:,:,:,jp_tem) = sf_dyn(jf_tem)%fnow(:,:,:)  * tmask(:,:,:)    ! temperature 
     
    161171      rn2b(:,:,:) = rn2(:,:,:)         ! need for zdfmxl 
    162172      CALL zdf_mxl( kt )                                                   ! In any case, we need mxl 
    163       ! 
    164       IF( lk_ldfslp .AND. .NOT.lk_c1d )   CALL  dta_dyn_slp( kt )    ! Computation of slopes 
    165173      ! 
    166174      hmld(:,:)         = sf_dyn(jf_mld)%fnow(:,:,1) * tmask(:,:,1)    ! mixed layer depht 
     
    585593      REAL(wp) ::   ztinta     ! ratio applied to after  records when doing time interpolation 
    586594      REAL(wp) ::   ztintb     ! ratio applied to before records when doing time interpolation 
    587       INTEGER  ::   iswap, isecdyn, iprevrec  
     595      INTEGER  ::   iswap 
    588596      REAL(wp), POINTER, DIMENSION(:,:,:) :: zuslp, zvslp, zwslpi, zwslpj 
    589597      !!--------------------------------------------------------------------- 
    590598      ! 
    591599      CALL wrk_alloc(jpi, jpj, jpk, zuslp, zvslp, zwslpi, zwslpj ) 
    592       ! 
    593       isecdyn = nsec_year + nsec1jan000   ! number of seconds between Jan. 1st 00h of nit000 year and the middle of time step 
    594       ! 
    595       IF( kt == nit000 ) THEN    ;    iprevrec = 0 
    596       ELSE                       ;    iprevrec = sf_dyn(jf_tem)%nrec_a(2) 
    597       ENDIF 
    598600      ! 
    599601      IF( sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace)                        
     
    619621           !  
    620622           iswap = 0 
    621            IF( sf_dyn(jf_tem)%nrec_a(2) - iprevrec /= 0 )  iswap = 1 
    622            IF( isecdyn > sf_dyn(jf_tem)%nrec_b(2) .AND. iswap == 1 )  THEN    ! read/update the after data 
     623           IF( sf_dyn(jf_tem)%nrec_a(2) - nprevrec /= 0 )  iswap = 1 
     624           IF( nsecdyn > sf_dyn(jf_tem)%nrec_b(2) .AND. iswap == 1 )  THEN    ! read/update the after data 
    623625              IF(lwp) WRITE(numout,*) ' Compute new slopes at kt = ', kt 
    624626              uslpdta (:,:,:,1) =  uslpdta (:,:,:,2)         ! swap the data 
     
    641643      ! 
    642644      IF( sf_dyn(jf_tem)%ln_tint )  THEN 
    643          ztinta =  REAL( isecdyn - sf_dyn(jf_tem)%nrec_b(2), wp )  & 
     645         ztinta =  REAL( nsecdyn - sf_dyn(jf_tem)%nrec_b(2), wp )  & 
    644646            &    / REAL( sf_dyn(jf_tem)%nrec_a(2) - sf_dyn(jf_tem)%nrec_b(2), wp ) 
    645647         ztintb =  1. - ztinta 
Note: See TracChangeset for help on using the changeset viewer.