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 12816 for NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/NST/agrif_oce_interp.F90 – NEMO

Ignore:
Timestamp:
2020-04-25T14:32:42+02:00 (4 years ago)
Author:
smasson
Message:

Clem's branch: update with trunk, update with UKMO/NEMO_4.0.1_remove_0.1m_snow_test and add default restart for pond and lid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/NST/agrif_oce_interp.F90

    r10068 r12816  
    9696      i1 =  1   ;   i2 = nlci 
    9797      j1 =  1   ;   j2 = nlcj 
    98       IF( nbondj == -1 .OR. nbondj == 2 )   j1 = 2 + nbghostcells 
    99       IF( nbondj == +1 .OR. nbondj == 2 )   j2 = nlcj - nbghostcells - 1 
    100       IF( nbondi == -1 .OR. nbondi == 2 )   i1 = 2 + nbghostcells  
    101       IF( nbondi == +1 .OR. nbondi == 2 )   i2 = nlci - nbghostcells - 1 
     98      IF( l_Northedge )   j1 = 2 + nbghostcells 
     99      IF( l_Southedge )   j2 = nlcj - nbghostcells - 1 
     100      IF( l_Westedge )    i1 = 2 + nbghostcells  
     101      IF( l_Eastedge )    i2 = nlci - nbghostcells - 1 
    102102 
    103103      ! --- West --- ! 
    104       IF( nbondi == -1 .OR. nbondi == 2 ) THEN 
     104      IF( l_Westedge ) THEN 
    105105         ibdy1 = 2 
    106106         ibdy2 = 1+nbghostcells  
     
    173173 
    174174      ! --- East --- ! 
    175       IF( nbondi ==  1 .OR. nbondi == 2 ) THEN 
     175      IF( l_Eastedge ) THEN 
    176176         ibdy1 = nlci-1-nbghostcells 
    177177         ibdy2 = nlci-2  
     
    246246 
    247247      ! --- South --- ! 
    248       IF( nbondj == -1 .OR. nbondj == 2 ) THEN 
     248      IF ( l_Southedge ) THEN 
    249249         jbdy1 = 2 
    250250         jbdy2 = 1+nbghostcells  
     
    318318 
    319319      ! --- North --- ! 
    320       IF( nbondj ==  1 .OR. nbondj == 2 ) THEN 
     320      IF( l_Northedge ) THEN 
    321321         jbdy1 = nlcj-1-nbghostcells 
    322322         jbdy2 = nlcj-2  
     
    405405      IF( Agrif_Root() )   RETURN 
    406406      ! 
    407       IF((nbondi == -1).OR.(nbondi == 2)) THEN 
     407      IF( l_Westedge ) THEN 
    408408         DO jj=1,jpj 
    409409            va_e(2:nbghostcells+1,jj) = vbdy_w(1:nbghostcells,jj) * hvr_e(2:nbghostcells+1,jj) 
     
    416416      ENDIF 
    417417      ! 
    418       IF((nbondi == 1).OR.(nbondi == 2)) THEN 
     418      IF( l_Eastedge ) THEN 
    419419         DO jj=1,jpj 
    420420            va_e(nlci-nbghostcells:nlci-1,jj)   = vbdy_e(1:nbghostcells,jj) * hvr_e(nlci-nbghostcells:nlci-1,jj) 
     
    427427      ENDIF 
    428428      ! 
    429       IF((nbondj == -1).OR.(nbondj == 2)) THEN 
     429      IF ( l_Southedge ) THEN 
    430430         DO ji=1,jpi 
    431431            ua_e(ji,2:nbghostcells+1) = ubdy_s(ji,1:nbghostcells) * hur_e(ji,2:nbghostcells+1) 
     
    438438      ENDIF 
    439439      ! 
    440       IF((nbondj == 1).OR.(nbondj == 2)) THEN 
     440      IF ( l_Northedge ) THEN 
    441441         DO ji=1,jpi 
    442442            ua_e(ji,nlcj-nbghostcells:nlcj-1)   = ubdy_n(ji,1:nbghostcells) * hur_e(ji,nlcj-nbghostcells:nlcj-1) 
     
    516516      ! 
    517517      ! --- West --- ! 
    518       IF((nbondi == -1).OR.(nbondi == 2)) THEN 
     518      IF( l_Westedge ) THEN 
    519519         indx = 1+nbghostcells 
    520520         DO jj = 1, jpj 
     
    526526      ! 
    527527      ! --- East --- ! 
    528       IF((nbondi == 1).OR.(nbondi == 2)) THEN 
     528      IF( l_Eastedge ) THEN 
    529529         indx = nlci-nbghostcells 
    530530         DO jj = 1, jpj 
     
    536536      ! 
    537537      ! --- South --- ! 
    538       IF((nbondj == -1).OR.(nbondj == 2)) THEN 
     538      IF ( l_Southedge ) THEN 
    539539         indy = 1+nbghostcells 
    540540         DO jj = 2, indy 
     
    546546      ! 
    547547      ! --- North --- ! 
    548       IF((nbondj == 1).OR.(nbondj == 2)) THEN 
     548      IF ( l_Northedge ) THEN 
    549549         indy = nlcj-nbghostcells 
    550550         DO jj = indy, nlcj-1 
     
    571571      ! 
    572572      ! --- West --- ! 
    573       IF((nbondi == -1).OR.(nbondi == 2)) THEN 
     573      IF( l_Westedge ) THEN 
    574574         indx = 1+nbghostcells 
    575575         DO jj = 1, jpj 
     
    581581      ! 
    582582      ! --- East --- ! 
    583       IF((nbondi == 1).OR.(nbondi == 2)) THEN 
     583      IF( l_Eastedge ) THEN 
    584584         indx = nlci-nbghostcells 
    585585         DO jj = 1, jpj 
     
    591591      ! 
    592592      ! --- South --- ! 
    593       IF((nbondj == -1).OR.(nbondj == 2)) THEN 
     593      IF( l_Southedge ) THEN 
    594594         indy = 1+nbghostcells 
    595595         DO jj = 2, indy 
     
    601601      ! 
    602602      ! --- North --- ! 
    603       IF((nbondj == 1).OR.(nbondj == 2)) THEN 
     603      IF( l_Northedge ) THEN 
    604604         indy = nlcj-nbghostcells 
    605605         DO jj = indy, nlcj-1 
     
    722722            !  
    723723            ! Remove CORNERS 
    724             IF((nbondj == -1).OR.(nbondj == 2)) jmin = 2 + nbghostcells 
    725             IF((nbondj == +1).OR.(nbondj == 2)) jmax = nlcj - nbghostcells - 1 
    726             IF((nbondi == -1).OR.(nbondi == 2)) imin = 2 + nbghostcells 
    727             IF((nbondi == +1).OR.(nbondi == 2)) imax = nlci - nbghostcells - 1       
     724            IF( l_Southedge ) jmin = 2 + nbghostcells 
     725            IF( l_Northedge ) jmax = nlcj - nbghostcells - 1 
     726            IF( l_Westedge ) imin = 2 + nbghostcells 
     727            IF( l_Eastedge ) imax = nlci - nbghostcells - 1       
    728728            ! 
    729729            IF( eastern_side ) THEN 
Note: See TracChangeset for help on using the changeset viewer.