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/dynspg_flt.F90 – NEMO

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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.