Changeset 2292 in lmdz_wrf for trunk


Ignore:
Timestamp:
Jan 28, 2019, 3:39:22 PM (7 years ago)
Author:
lfita
Message:

Fixing memory issues on the coincident_gridsin2D', coincident_list_2Dcoords': one needs to fully provide where in the matrices value will be located !

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/module_scientific.f90

    r2291 r2292  
    60196019        IF ( (pointsA(iA,1) == pointsB(iB,1)) .AND. (pointsA(iA,2) == pointsB(iB,2)) ) THEN
    60206020          Npoints = Npoints + 1
    6021           points(Npoints,:) = pointsA(iA,:)
     6021          points(Npoints,1) = pointsA(iA,1)
     6022          points(Npoints,2) = pointsA(iA,2)
    60226023          inpA(Npoints) = iA
    60236024          inpB(Npoints) = iB
     
    60496050
    60506051    ! Local
    6051     INTEGER                                              :: ixA, iyA, ixB, iyB
     6052    INTEGER                                              :: ixA, iyA, ixB, iyB, iv
    60526053    INTEGER                                              :: NA, NB
     6054    INTEGER, DIMENSION(dxyA)                             :: ptsA, ptsB
     6055    INTEGER, DIMENSION(dxyA, 2)                          :: pts
     6056
    60536057
    60546058!!!!!!! Variables
     
    60776081          DO iyB=1, dyB
    60786082            NB = NpointsB(ixB,iyB)
     6083            pts = -1
    60796084            CALL coincident_list_2Dcoords(NA, pointsA(ixA,iyA,1:NA,:), NB, pointsB(ixB,iyB,1:NB,:),   &
    6080               Npoints(ixA,iyA,ixB,iyB), points(ixA,iyA,ixB,iyB,:,:), inpointsA(ixA,iyA,:),            &
    6081               inpointsB(ixB,iyB,:))
     6085              Npoints(ixA,iyA,ixB,iyB), pts(1:NA,:), ptsA, ptsB)
     6086            DO iv = 1, Npoints(ixA,iyA,ixB,iyB)
     6087              points(ixA,iyA,ixB,iyB,iv,1) = pts(iv,1)
     6088              points(ixA,iyA,ixB,iyB,iv,2) = pts(iv,2)
     6089              inpointsA(ixA,iyA,iv) = ptsA(iv)
     6090              inpointsB(ixB,iyB,iv) = ptsB(iv)
     6091            END DO
    60826092          END DO
    60836093        END DO
Note: See TracChangeset for help on using the changeset viewer.