Opened 3 years ago

Closed 3 years ago

#1917 closed Bug (fixed)

TOP does not compile with AGRIF

Reported by: gm Owned by: nemo
Priority: normal Milestone:
Component: TOP Version: trunk
Severity: Keywords:
Cc:

Description

Context


compilation of ORCA2_LIM3_PISCES reference configuration using key_agrif fails in trc.F90

Analysis


The issue is the following line in trc.F90 :

   TYPE(OBC_DATA),    PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET ::  trcdta_bdy           !: bdy external data (local process)

AGRIF add a pointer attribute to this variable which conflicts with the target attribute

Fix



Commit History (1)

ChangesetAuthorTimeChangeLog
8241cetlod2017-06-29T09:59:28+02:00

trunk:bugfix to avoid compilation error when using TOP+AGRIF configuration, see ticket #1917

Change History (3)

comment:1 Changed 3 years ago by mdunphy

Hi, I also ran into this issue and believe that the fix is to follow OPA_SRC/BDY/bdy_oce.F90 and wrap that line with the do-not-treat directive:

!$AGRIF_DO_NOT_TREAT
   TYPE(OBC_DATA),    PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET ::  trcdta_bdy           !: bdy external data (local process)
!$AGRIF_END_DO_NOT_TREAT

comment:2 Changed 3 years ago by rblod

Hi
It works but I'm not sure it's the better fix. In the case where you want to use BDY on the fine grid too (typically to deal with rivers), this fix will fail since the structure will be common to both grids.
One workaround could be to use POINTER instead of TARGET. A cleaner one would be to remove the use of pointers for BDY and use standard arrays …
Rachid

comment:3 Changed 3 years ago by cbricaud

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

allready mentionned in ticket #1865

Note: See TracTickets for help on using tickets.