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 1200 for trunk/AGRIF/AGRIF_FILES/modarrays.F – NEMO

Ignore:
Timestamp:
2008-09-24T15:05:20+02:00 (16 years ago)
Author:
rblod
Message:

Adapt Agrif to the new SBC and correct several bugs for agrif (restart writing and reading), see ticket #133
Note : this fix does not work yet on NEC computerq (sxf90/360)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AGRIF/AGRIF_FILES/modarrays.F

    r662 r1200  
    176176C     Local variables        
    177177C 
    178       SELECT CASE (nbdim) 
    179       CASE (1) 
    180            lower = lbound(Variable % array1) 
    181            upper = ubound(Variable % array1) 
    182       CASE (2) 
    183            lower = lbound(Variable % array2) 
    184            upper = ubound(Variable % array2) 
    185       CASE (3) 
    186            lower = lbound(Variable % array3) 
    187            upper = ubound(Variable % array3) 
    188       CASE (4) 
    189            lower = lbound(Variable % array4) 
    190            upper = ubound(Variable % array4) 
    191       CASE (5) 
    192            lower = lbound(Variable % array5) 
    193            upper = ubound(Variable % array5) 
    194       CASE (6) 
    195            lower = lbound(Variable % array6) 
    196            upper = ubound(Variable % array6) 
    197       END SELECT 
    198 C 
     178      lower = Variable % lb(1:nbdim) 
     179      upper = Variable % ub(1:nbdim) 
    199180      return 
    200181C 
     
    552533C 
    553534 
    554 #ifdef AGRIF_MPI 
    555535C     ************************************************************************** 
    556536CCC   Subroutine GiveAgrif_SpecialValueToTab_mpi 
     
    581561      CASE (1) 
    582562             Where (Variable1 % array1( 
    583      &           bound1(lower(1),1,2):bound1(upper(1),1,2))  
     563     &           bound1(1,1,2):bound1(1,2,2))  
    584564     &            == Value) 
    585              Variable2 % array1(lower(1):upper(1)) 
     565             Variable2 % array1(bound1(1,1,1):bound1(1,2,1)) 
    586566     &                        = Value 
    587567C       
     
    589569      CASE (2) 
    590570             Where (Variable1 % array2( 
    591      &           bound1(lower(1),1,2):bound1(upper(1),1,2), 
    592      &           bound1(lower(2),2,2):bound1(upper(2),2,2))  
     571     &           bound1(1,1,2):bound1(1,2,2), 
     572     &           bound1(2,1,2):bound1(2,2,2))  
    593573     &            == Value) 
    594              Variable2 % array2(lower(1):upper(1), 
    595      &                          lower(2):upper(2)) 
     574             Variable2 % array2(bound1(1,1,1):bound1(1,2,1), 
     575     &                       bound1(2,1,1):bound1(2,2,1)) 
    596576     &                        = Value 
    597577C       
     
    599579      CASE (3) 
    600580             Where (Variable1 % array3( 
    601      &           bound1(lower(1),1,2):bound1(upper(1),1,2), 
    602      &           bound1(lower(2),2,2):bound1(upper(2),2,2),  
    603      &           bound1(lower(3),3,2):bound1(upper(3),3,2))  
     581     &           bound1(1,1,2):bound1(1,2,2), 
     582     &                       bound1(2,1,2):bound1(2,2,2), 
     583     &                       bound1(3,1,2):bound1(3,2,2))  
    604584     &            == Value) 
    605              Variable2 % array3(lower(1):upper(1), 
    606      &                          lower(2):upper(2), 
    607      &                          lower(3):upper(3)) 
     585             Variable2 % array3(bound1(1,1,1):bound1(1,2,1), 
     586     &                       bound1(2,1,1):bound1(2,2,1), 
     587     &                       bound1(3,1,1):bound1(3,2,1)) 
    608588     &                         = Value 
    609589C       
     
    611591      CASE (4) 
    612592             Where (Variable1 % array4( 
    613      &           bound1(lower(1),1,2):bound1(upper(1),1,2), 
    614      &           bound1(lower(2),2,2):bound1(upper(2),2,2),  
    615      &           bound1(lower(3),3,2):bound1(upper(3),3,2), 
    616      &           bound1(lower(4),4,2):bound1(upper(4),4,2))  
     593     &           bound1(1,1,2):bound1(1,2,2), 
     594     &                       bound1(2,1,2):bound1(2,2,2), 
     595     &                       bound1(3,1,2):bound1(3,2,2), 
     596     &                       bound1(4,1,2):bound1(4,2,2))  
    617597     &            == Value) 
    618              Variable2 % array4(lower(1):upper(1), 
    619      &                          lower(2):upper(2), 
    620      &                          lower(3):upper(3), 
    621      &                          lower(4):upper(4)) 
     598             Variable2 % array4(bound1(1,1,1):bound1(1,2,1), 
     599     &                       bound1(2,1,1):bound1(2,2,1), 
     600     &                       bound1(3,1,1):bound1(3,2,1), 
     601     &                       bound1(4,1,1):bound1(4,2,1)) 
    622602     &                        = Value 
    623603C       
     
    625605      CASE (5) 
    626606             Where (Variable1 % array5( 
    627      &           bound1(lower(1),1,2):bound1(upper(1),1,2), 
    628      &           bound1(lower(2),2,2):bound1(upper(2),2,2), 
    629      &           bound1(lower(3),3,2):bound1(upper(3),3,2), 
    630      &           bound1(lower(4),4,2):bound1(upper(4),4,2), 
    631      &           bound1(lower(5),5,2):bound1(upper(5),5,2))  
     607     &           bound1(1,1,2):bound1(1,2,2), 
     608     &                       bound1(2,1,2):bound1(2,2,2), 
     609     &                       bound1(3,1,2):bound1(3,2,2), 
     610     &                       bound1(4,1,2):bound1(4,2,2), 
     611     &                       bound1(5,1,2):bound1(5,2,2))  
    632612     &            == Value) 
    633              Variable2 % array5(lower(1):upper(1), 
    634      &                          lower(2):upper(2), 
    635      &                          lower(3):upper(3), 
    636      &                          lower(4):upper(4), 
    637      &                          lower(5):upper(5)) 
     613             Variable2 % array5(bound1(1,1,1):bound1(1,2,1), 
     614     &                       bound1(2,1,1):bound1(2,2,1), 
     615     &                       bound1(3,1,1):bound1(3,2,1), 
     616     &                       bound1(4,1,1):bound1(4,2,1), 
     617     &                       bound1(5,1,1):bound1(5,2,1)) 
    638618     &                        = Value 
    639619C       
     
    641621      CASE (6) 
    642622             Where (Variable1 % array6( 
    643      &           bound1(lower(1),1,2):bound1(upper(1),1,2), 
    644      &           bound1(lower(2),2,2):bound1(upper(2),2,2), 
    645      &           bound1(lower(2),3,2):bound1(upper(3),3,2), 
    646      &           bound1(lower(4),4,2):bound1(upper(4),4,2), 
    647      &           bound1(lower(5),5,2):bound1(upper(5),5,2), 
    648      &           bound1(lower(6),6,2):bound1(upper(6),6,2))  
     623     &           bound1(1,1,2):bound1(1,2,2), 
     624     &                       bound1(2,1,2):bound1(2,2,2), 
     625     &                       bound1(3,1,2):bound1(3,2,2), 
     626     &                       bound1(4,1,2):bound1(4,2,2), 
     627     &                       bound1(5,1,2):bound1(5,2,2), 
     628     &                       bound1(6,1,2):bound1(6,2,2))  
    649629     &            == Value) 
    650              Variable2 % array6(lower(1):upper(1), 
    651      &                          lower(2):upper(2), 
    652      &                          lower(3):upper(3), 
    653      &                          lower(4):upper(4), 
    654      &                          lower(5):upper(5), 
    655      &                          lower(6):upper(6)) 
     630             Variable2 % array6(bound1(1,1,1):bound1(1,2,1), 
     631     &                       bound1(2,1,1):bound1(2,2,1), 
     632     &                       bound1(3,1,1):bound1(3,2,1), 
     633     &                       bound1(4,1,1):bound1(4,2,1), 
     634     &                       bound1(5,1,1):bound1(5,2,1), 
     635     &                       bound1(6,1,1):bound1(6,2,1)) 
    656636     &                        = Value 
    657637C       
     
    662642C 
    663643      End Subroutine GiveAgrif_SpecialValueToTab_mpi     
    664 #else 
     644 
    665645C     ************************************************************************** 
    666646CCC   Subroutine GiveAgrif_SpecialValueToTab 
     
    771751C 
    772752      End Subroutine GiveAgrif_SpecialValueToTab    
    773 #endif 
     753 
    774754C 
    775755C 
Note: See TracChangeset for help on using the changeset viewer.