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.
#1478 (compiler error (shape pb) in diaar5.F90 after isf changes) – NEMO

Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#1478 closed Bug (fixed)

compiler error (shape pb) in diaar5.F90 after isf changes

Reported by: clevy Owned by: nemo
Priority: low Milestone: 2015 release-3.6
Component: OCE Version: trunk
Severity: Keywords: 2015 OPA v3.6
Cc:

Description

NEMO_OPA_SRC/DIA/diaar5.F90 does not compile anymore after isf latest changes:

mpif90 -c -cpp -o diaar5.o -I/ccc/work/cont003/gen0826/clevy/OR1L3_FORCED_rev5120/modipsl/modeles/NEMOGCM/CONFIG/O1LPR5120/BLD/inc -i4 -[changeset:8 r8] -O3 -fp-model precise -I/ccc/work/cont003/gen0826/clevy/XIOS/inc -I/ccc/work/cont003/gen0826/clevy/now/models/oa3mct/build/lib/mct -I/ccc/work/cont003/gen0826/clevy/now/models/oa3mct/build/lib/psmile.MPI1 -I/usr/local/netcdf-4.2_hdf5_parallel/include -c /ccc/work/cont003/gen0826/clevy/OR1L3_FORCED_rev5120/modipsl/modeles/NEMOGCM/CONFIG/O1LPR5120/BLD/ppsrc/nemo/diaar5.f90
ifort: command line warning #10212: -fp-model precise evaluates in source precision with Fortran.
ifort: command line warning #10212: -fp-model precise evaluates in source precision with Fortran.
/ccc/work/cont003/gen0826/clevy/OR1L3_FORCED_rev5120/modipsl/modeles/NEMOGCM/CONFIG/O1LPR5120/BLD/ppsrc/nemo/diaar5.f90(201): error #6366: The shapes of the array expressions do not conform.   [ZTEMP]

  ztemp = ztemp + zarea_ssh(:,:) * tsn(:,:,1,jp_tem)

----
/ccc/work/cont003/gen0826/clevy/OR1L3_FORCED_rev5120/modipsl/modeles/NEMOGCM/CONFIG/O1LPR5120/BLD/ppsrc/nemo/diaar5.f90(202): error #6366: The shapes of the array expressions do not conform.   [ZSAL]

  zsal  = zsal  + zarea_ssh(:,:) * tsn(:,:,1,jp_sal)

----
compilation aborted

It is in the loop starting line 164

Proposed change (putting back explicit indexes ji and jj):

IF( .NOT.lk_vvl ) THEN

  IF ( ln_isfcav ) THEN
    DO ji=1,jpi
      DO jj=1,jpj
        ztemp = ztemp + zarea_ssh(ji,jj) * tsn(ji,jj,mikt(ji,jj),jp_tem) zsal  = zsal  + zarea_ssh(ji,jj) * tsn(ji,jj,mikt(ji,jj),jp_sal)
      END DO
    END DO
  ELSE
    ztemp = ztemp + zarea_ssh(ji,jj) * tsn(ji,jj,1,jp_tem) zsal  = zsal  + zarea_ssh(ji,jj) * tsn(ji,jj,1,jp_sal)
  END IF

ENDIF

It does compile with this change, but advice of isf experts is required before commit.
Thanks

Commit History (1)

ChangesetAuthorTimeChangeLog
5121acc2015-03-04T13:20:24+01:00

#1478. Bug fix to diaar5.F90 to insert missing SUM operators

Change History (6)

comment:1 Changed 10 years ago by mathiot

Your suggested change is not adapted. You need to do a sum overall the cells.
My suggestion is to do this (as before the merge in december for the ln_isfcav = false case) :

        IF ( ln_isfcav ) THEN
            DO ji=1,jpi
               DO jj=1,jpj
                  ztemp = ztemp + zarea_ssh(ji,jj) * tsn(ji,jj,mikt(ji,jj),jp_tem)
                  zsal  = zsal  + zarea_ssh(ji,jj) * tsn(ji,jj,mikt(ji,jj),jp_sal)
               END DO
            END DO
         ELSE
            ztemp = ztemp + SUM( zarea_ssh(:,:) * tsn(:,:,1,jp_tem) )
            zsal  = zsal  + SUM( zarea_ssh(:,:) * tsn(:,:,1,jp_sal) )
         END IF

It compiles with key_diaar5 with this change.

comment:2 Changed 10 years ago by acc

  • Resolution set to fixed
  • Status changed from new to closed

Solution committed to revision 5121. Ticket closed.

comment:3 Changed 9 years ago by nicolasmartin

  • Keywords 2015 nemo_v3_6* added

comment:4 Changed 7 years ago by nemo

  • Keywords release-3.6* added; nemo_v3_6* removed

comment:5 Changed 7 years ago by nemo

  • Keywords release-3.6 added; release-3.6* removed

comment:6 Changed 3 years ago by nemo

  • Keywords OPA v3.6 added; release-3.6 removed
Note: See TracTickets for help on using tickets.