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 1537 for trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90 – NEMO

Ignore:
Timestamp:
2009-07-24T16:22:23+02:00 (15 years ago)
Author:
ctlod
Message:

ensure the restartability of the 2nd order advection scheme,see ticket: 489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90

    r1528 r1537  
    3030   USE sbcrnf          ! river runoffs 
    3131   USE in_out_manager  ! I/O manager 
     32   USE iom             ! IOM library 
    3233   USE lib_mpp 
    3334   USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
     
    3536   USE prtctl          ! Print control 
    3637   USE zdf_oce         ! ocean vertical physics 
     38   USE restart         ! ocean restart 
    3739 
    3840   IMPLICIT NONE 
     
    156158         !    
    157159         btr2(:,:) = 1. / ( e1t(:,:) * e2t(:,:) )        ! inverse of T-point surface 
    158             IF ( jp_cfg == 2 ) THEN 
    159             !  Increase the background in the surface layers 
    160                avmb(1) = 10.  * avmb(1)      ;      avtb(1) = 10.  * avtb(1) 
    161                avmb(2) = 10.  * avmb(2)      ;      avtb(2) = 10.  * avtb(2) 
    162                avmb(3) =  5.  * avmb(3)      ;      avtb(3) =  5.  * avtb(3) 
    163                avmb(4) =  2.5 * avmb(4)      ;      avtb(4) =  2.5 * avtb(4) 
    164             ENDIF 
     160         ! 
     161         IF( jp_cfg == 2 .AND. .NOT. ln_rstart ) THEN    ! Increase the background in the surface layers 
     162            avmb(1) = 10.  * avmb(1)      ;      avtb(1) = 10.  * avtb(1) 
     163            avmb(2) = 10.  * avmb(2)      ;      avtb(2) = 10.  * avtb(2) 
     164            avmb(3) =  5.  * avmb(3)      ;      avtb(3) =  5.  * avtb(3) 
     165            avmb(4) =  2.5 * avmb(4)      ;      avtb(4) =  2.5 * avtb(4) 
     166         ENDIF 
    165167      ENDIF 
    166168 
     
    412414      ENDIF 
    413415 
     416      ! write avmb, avtb in restart (traadv_cen2 requires a modified avmb, avtb that are 
     417      ! ---------------------------  required in restart file to ensure restartability) 
     418      ! avmb, avtb will be read in zdfini in restart case as they are used in zdftke, kpp etc... 
     419      IF( lrst_oce ) THEN 
     420         CALL iom_rstput( kt, nitrst, numrow, 'avmb', avmb ) 
     421         CALL iom_rstput( kt, nitrst, numrow, 'avtb', avtb ) 
     422      ENDIF 
     423 
    414424      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ta, clinfo1=' cen2 zad  - Ta: ', mask1=tmask, & 
    415425         &                       tab3d_2=sa, clinfo2=            ' Sa: ', mask2=tmask, clinfo3='tra' ) 
Note: See TracChangeset for help on using the changeset viewer.