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.
agrif_extrapolation_allocfix.patch on Ticket #1870 – Attachment – NEMO

Ticket #1870: agrif_extrapolation_allocfix.patch

File agrif_extrapolation_allocfix.patch, 842 bytes (added by mdunphy, 7 years ago)

Fix for the allocations in check_interpextrap(). This patch is for agrif_extrapolation.f90 attached to this ticket (#1870), not for the version under SVN.

  • agrif_extrapolation.f90

    old new  
    434434   IF ( MAXVAL(tabin(:,:,1,1))/=0 ) THEN 
    435435    WRITE(*,*) 'check' 
    436436    ! select appropriate mask 
    437437    SELECT CASE(posvar) 
    438438      CASE('T') 
    439       ALLOCATE(mask(SIZE(tabin,1),SIZE(tabin,1))) 
     439      ALLOCATE(mask(SIZE(tabin,1),SIZE(tabin,2))) 
    440440      mask(:,:) = Grid%tmask(:,:,n) 
    441441      CASE('U') 
    442       ALLOCATE(mask(SIZE(tabin,1),SIZE(tabin,1))) 
     442      ALLOCATE(mask(SIZE(tabin,1),SIZE(tabin,2))) 
    443443      mask(:,:) = Grid%umask(:,:,n) 
    444444      CASE('V') 
    445       ALLOCATE(mask(SIZE(tabin,1),SIZE(tabin,1))) 
     445      ALLOCATE(mask(SIZE(tabin,1),SIZE(tabin,2))) 
    446446      mask(:,:) = Grid%vmask(:,:,n) 
    447447    END SELECT 
    448448 
    449449    lcnt=0 
    450450    DO i = 2,SIZE(tabin,1)-1