Ignore:
Timestamp:
2017-03-09T11:38:31+01:00 (4 years ago)
Author:
frrh
Message:

Apply optimisations to various areas of code replacing the use of
allocated pointers with straightforward direct ALLOCATE and DEALLOCATE
operations.

These optimisations largely have an impact in models featuring MEDUSA,
i.e. those with significant numbers of tracers, although they are
expected to have a small impact in all configurations.

Code developed and tested in NEMO branch branches/UKMO/dev_r5518_optim_GO6_alloc
Tested in stand-alone GO6-GSI8, GO6-GSI8-MEDUSA and UKESM coupled models.
NEMO ticket #1821 documents this change further.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90

    r7179 r7771  
    8282      REAL(wp) ::   zv, z0v, zzwy, z0w        !   -      - 
    8383      REAL(wp) ::   ztra, zbtr, zdt, zalpha   !   -      - 
    84       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zslpx, zslpy   ! 3D workspace 
    85       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zwx  , zwy     ! -      -  
     84      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zslpx, zslpy   ! 3D workspace 
     85      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zwx  , zwy     ! -      -  
    8686      !!---------------------------------------------------------------------- 
    8787      ! 
    8888      IF( nn_timing == 1 )  CALL timing_start('tra_adv_muscl') 
    8989      ! 
    90       CALL wrk_alloc( jpi, jpj, jpk, zslpx, zslpy, zwx, zwy ) 
     90      ALLOCATE( zslpx(1:jpi, 1:jpj, 1:jpk) ) 
     91      ALLOCATE( zslpy(1:jpi, 1:jpj, 1:jpk) ) 
     92      ALLOCATE( zwx  (1:jpi, 1:jpj, 1:jpk) ) 
     93      ALLOCATE( zwy  (1:jpi, 1:jpj, 1:jpk) ) 
    9194      ! 
    9295      IF( kt == kit000 )  THEN 
     
    288291      END DO 
    289292      ! 
    290       CALL wrk_dealloc( jpi, jpj, jpk, zslpx, zslpy, zwx, zwy ) 
     293      DEALLOCATE( zslpx ) 
     294      DEALLOCATE( zslpy ) 
     295      DEALLOCATE( zwx   ) 
     296      DEALLOCATE( zwy   ) 
    291297      ! 
    292298      IF( nn_timing == 1 )  CALL timing_stop('tra_adv_muscl') 
Note: See TracChangeset for help on using the changeset viewer.