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.
#1056 (failed compilation with gfortran icb_oce.F90 dev_MERGE_2012) – NEMO

Opened 11 years ago

Closed 11 years ago

#1056 closed Bug (fixed)

failed compilation with gfortran icb_oce.F90 dev_MERGE_2012

Reported by: vichi Owned by: nemo
Priority: highest Milestone:
Component: OCE Version: v3.6
Severity: Keywords:
Cc:

Description

checked today the compilation of GYRE and ORCA2LIM on my laptop with gfortran 4.5 and does not go through because of error Allocate-object at (1) is subobject of object at (2) in icb_oce.F90
This occurs because the "container" is allocated and not only the content. Can be easily solved with the following

       !!----------------------------------------------------------------------
       !
       icb_alloc = 0
-      ALLOCATE( berg_grid                      ,                                               &
-         &      berg_grid%calving    (jpi,jpj) , berg_grid%calving_hflx (jpi,jpj)          ,   &
+      ALLOCATE( berg_grid%calving    (jpi,jpj) , berg_grid%calving_hflx (jpi,jpj)          ,   &
          &      berg_grid%stored_heat(jpi,jpj) , berg_grid%floating_melt(jpi,jpj)          ,   &
          &      berg_grid%maxclass   (jpi,jpj) , berg_grid%stored_ice   (jpi,jpj,nclasses) ,   &
          &      berg_grid%tmp        (jpi,jpj) , STAT=ill)


Commit History (1)

ChangesetAuthorTimeChangeLog
3996vichi2013-08-01T13:40:26+02:00

Fix bug #1056, failed compilation with gfortran

Change History (1)

comment:1 Changed 11 years ago by vichi

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.