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.
Changeset 2631 – NEMO

Changeset 2631


Ignore:
Timestamp:
2011-02-28T12:19:28+01:00 (12 years ago)
Author:
trackstand2
Message:

geo2ocean - bug fix - missing ALLOCATABLE attribute and .NOT. on check on allocated status

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90

    r2624 r2631  
    3636      gsinf, gcosf       ! cos/sin between model grid lines and NP direction at F point 
    3737 
    38    LOGICAL , SAVE, DIMENSION(4)     ::   linit = .FALSE. 
    39    REAL(wp), SAVE, DIMENSION(:,:,:) ::   gsinlon, gcoslon, gsinlat, gcoslat 
     38   LOGICAL ,              SAVE, DIMENSION(4)     ::   linit = .FALSE. 
     39   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   gsinlon, gcoslon, gsinlat, gcoslat 
    4040 
    4141   LOGICAL ::   lmust_init = .TRUE.        !: used to initialize the cos/sin variables (se above) 
     
    355355      REAL(wp), PARAMETER :: rad = rpi / 180.e0 
    356356      INTEGER ::   ig     ! 
    357       !!---------------------------------------------------------------------- 
    358  
    359       IF( ALLOCATED( gsinlon ) ) THEN 
     357      INTEGER ::   ierr   ! local integer 
     358      !!---------------------------------------------------------------------- 
     359 
     360      IF( .NOT. ALLOCATED( gsinlon ) ) THEN 
    360361         ALLOCATE( gsinlon(jpi,jpj,4) , gcoslon(jpi,jpj,4) ,   & 
    361362            &      gsinlat(jpi,jpj,4) , gcoslat(jpi,jpj,4) , STAT=ierr ) 
     
    435436      REAL(wp), PARAMETER :: rad = rpi / 180.e0 
    436437      INTEGER ::   ig     ! 
     438      INTEGER ::   ierr   ! local integer 
    437439      !!---------------------------------------------------------------------- 
    438440 
Note: See TracChangeset for help on using the changeset viewer.