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 389 for trunk/NEMO/OPA_SRC/DYN – NEMO

Changeset 389 for trunk/NEMO/OPA_SRC/DYN


Ignore:
Timestamp:
2006-03-09T18:22:04+01:00 (18 years ago)
Author:
opalod
Message:

RB:nemo_v1_update_038: first integration of Agrif :

  • configuration parameters are just integer when agrif is used
  • add call to agrif routines with key_agrif
Location:
trunk/NEMO/OPA_SRC/DYN
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DYN/divcur.F90

    r247 r389  
    117117               hdivn(ji,jj,jk) = (  e2u(ji,jj) * un(ji,jj,jk) - e2u(ji-1,jj  ) * un(ji-1,jj  ,jk)      & 
    118118                  &               + e1v(ji,jj) * vn(ji,jj,jk) - e1v(ji  ,jj-1) * vn(ji  ,jj-1,jk)  )   & 
    119                   &            / ( e1t(ji,jj) * e2t(ji,jj) ) 
     119     &            / ( e1t(ji,jj) * e2t(ji,jj) ) 
    120120#endif 
    121121            END DO 
     
    130130         IF( lp_obc_south )   hdivn(nis0  :nis1  ,njs0  :njs1  ,jk) = 0.e0      ! south 
    131131#endif          
     132#if defined key_AGRIF 
     133         if ( .NOT. AGRIF_Root() ) then 
     134            IF ((nbondi ==  1).OR.(nbondi == 2)) hdivn(nlci-1 , :     ,jk) = 0.e0      ! east 
     135            IF ((nbondi == -1).OR.(nbondi == 2)) hdivn(2      , :     ,jk) = 0.e0      ! west 
     136            IF ((nbondj ==  1).OR.(nbondj == 2)) hdivn(:      ,nlcj-1 ,jk) = 0.e0      ! north 
     137            IF ((nbondj == -1).OR.(nbondj == 2)) hdivn(:      ,2      ,jk) = 0.e0      ! south 
     138         endif 
     139#endif        
    132140 
    133141         !                                             ! -------- 
     
    326334         IF( lp_obc_south )   hdivn(nis0  :nis1  ,njs0  :njs1  ,jk) = 0.e0      ! south 
    327335#endif          
     336#if defined key_AGRIF 
     337         if ( .NOT. AGRIF_Root() ) then 
     338            IF ((nbondi ==  1).OR.(nbondi == 2)) hdivn(nlci-1 , :     ,jk) = 0.e0      ! east 
     339            IF ((nbondi == -1).OR.(nbondi == 2)) hdivn(2      , :     ,jk) = 0.e0      ! west 
     340            IF ((nbondj ==  1).OR.(nbondj == 2)) hdivn(:      ,nlcj-1 ,jk) = 0.e0      ! north 
     341            IF ((nbondj == -1).OR.(nbondj == 2)) hdivn(:      ,2      ,jk) = 0.e0      ! south 
     342         endif 
     343#endif        
    328344         !                                             ! -------- 
    329345         ! relative vorticity                          !   rot  
  • trunk/NEMO/OPA_SRC/DYN/dynnxt.F90

    r367 r389  
    1919   USE lbclnk          ! lateral boundary condition (or mpp link) 
    2020   USE prtctl          ! Print control 
     21   USE agrif_opa_update 
     22   USE agrif_opa_interp 
    2123 
    2224   IMPLICIT NONE 
     
    133135         !                                             ! =============== 
    134136# endif 
     137# if defined key_AGRIF 
     138         !                                             ! =============== 
     139      END DO                                           !   End of slab 
     140      !                                                ! =============== 
     141      ! Update (ua,va) along open boundaries (only in the rigid-lid case) 
     142      CALL Agrif_dyn( kt ) 
     143      !                                                ! =============== 
     144      DO jk = 1, jpkm1                                 ! Horizontal slab 
     145         !                                             ! =============== 
     146# endif 
    135147#endif 
    136148         ! Time filter and swap of dynamics arrays 
     
    166178      ENDIF 
    167179 
     180#if defined key_AGRIF 
     181      IF (.NOT.Agrif_Root())    CALL Agrif_Update_Dyn( kt ) 
     182#endif       
     183 
    168184   END SUBROUTINE dyn_nxt 
    169185 
  • trunk/NEMO/OPA_SRC/DYN/dynspg_flt.F90

    r358 r389  
    3333   USE prtctl          ! Print control 
    3434   USE in_out_manager  ! I/O manager 
     35   USE agrif_opa_interp 
    3536 
    3637   IMPLICIT NONE 
     
    163164         END DO 
    164165      END DO 
     166 
    165167#if defined key_obc 
    166168      ! Update velocities on each open boundary with the radiation algorithm 
     
    168170      ! Correction of the barotropic componant velocity to control the volume of the system 
    169171      CALL obc_vol( kt ) 
     172#endif 
     173#if defined key_AGRIF 
     174      ! Update velocities on each coarse/fine interfaces 
     175 
     176      CALL Agrif_dyn( kt ) 
     177 
    170178#endif 
    171179#if defined key_orca_r2 
     
    230238      ! applied the lateral boundary conditions 
    231239      IF( nsolv == 4 )   CALL lbc_lnk_e( gcb, c_solver_pt, 1. )    
     240 
     241#if defined key_AGRIF 
     242 
     243       If (.NOT.AGRIF_ROOT()) THEN 
     244 
     245         ! add contribution of gradient of after barotropic transport divergence  
     246        IF ((nbondi == -1).OR.(nbondi == 2)) gcb(3,:) = gcb(3,:) & 
     247                        -znugdt * z2dt*laplacu(2,:)*gcdprc(3,:)*hu(2,:)*e2u(2,:) 
     248        IF ((nbondi == 1).OR.(nbondi == 2))  gcb(nlci-2,:) = gcb(nlci-2,:) & 
     249                       +znugdt * z2dt*laplacu(nlci-2,:)*gcdprc(nlci-2,:)*hu(nlci-2,:)*e2u(nlci-2,:) 
     250        IF ((nbondj == -1).OR.(nbondj == 2)) gcb(:,3) = gcb(:,3) & 
     251                       -znugdt * z2dt*laplacv(:,2)*gcdprc(:,3)*hv(:,2)*e1v(:,2) 
     252        IF ((nbondj == 1).OR.(nbondj == 2))  gcb(:,nlcj-2) = gcb(:,nlcj-2) & 
     253                       +znugdt * z2dt*laplacv(:,nlcj-2)*gcdprc(:,nlcj-2)*hv(:,nlcj-2)*e1v(:,nlcj-2) 
     254 
     255       ENDIF 
     256 
     257#endif 
     258 
    232259 
    233260      ! Relative precision (computation on one processor) 
     
    288315      END DO 
    289316 
    290       ! Add the trends multiplied by z2dt to the after velocity 
    291       ! ------------------------------------------------------- 
     317#if defined key_AGRIF       
     318      IF (.NOT. Agrif_Root()) THEN 
     319      ! caution : grad D (fine) = grad D (coarse) at coarse/fine interface 
     320        IF ((nbondi == -1).OR.(nbondi == 2)) spgu(2,:) = znugdt * z2dt * laplacu(2,:) * umask(2,:,1) 
     321        IF ((nbondi == 1).OR.(nbondi == 2)) spgu(nlci-2,:) = znugdt * z2dt * laplacu(nlci-2,:) * umask(nlci-2,:,1) 
     322        IF ((nbondj == -1).OR.(nbondj == 2)) spgv(:,2) = znugdt * z2dt * laplacv(:,2) * vmask(:,2,1) 
     323        IF ((nbondj == 1).OR.(nbondj == 2)) spgv(:,nlcj-2) = znugdt * z2dt * laplacv(:,nlcj-2) * vmask(:,nlcj-2,1) 
     324      ENDIF 
     325#endif       
     326      ! 7.  Add the trends multiplied by z2dt to the after velocity 
     327      ! ----------------------------------------------------------- 
    292328      !     ( c a u t i o n : (ua,va) here are the after velocity not the 
    293329      !                       trend, the leap-frog time stepping will not 
Note: See TracChangeset for help on using the changeset viewer.