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 7771 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP – NEMO

Ignore:
Timestamp:
2017-03-09T11:38:31+01:00 (7 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.

Location:
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90

    r6486 r7771  
    5353      INTEGER, INTENT( in ) ::   kt   ! ocean time-step  
    5454      CHARACTER (len=22) :: charout 
    55       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   ztrtrd 
     55      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrtrd 
    5656      !!---------------------------------------------------------------------- 
    5757      ! 
     
    6464 
    6565      IF( l_trdtrc )  THEN 
    66          CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) ! temporary save of trends 
     66         ALLOCATE(ztrtrd( 1:jpi, 1:jpj, 1:jpk, 1:jptra )) ! temporary save of trends 
    6767         ztrtrd(:,:,:,:)  = tra(:,:,:,:) 
    6868      ENDIF 
     
    9595           CALL trd_tra( kt, 'TRC', jn, jptra_bbl, ztrtrd(:,:,:,jn) ) 
    9696        END DO 
    97         CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd ) ! temporary save of trends 
     97        DEALLOCATE(ztrtrd ) ! temporary save of trends 
    9898      ENDIF 
    9999      ! 
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r6498 r7771  
    5959      REAL(wp)           :: zdep 
    6060      CHARACTER (len=22) :: charout 
    61       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   ztrtrd 
     61      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrtrd 
    6262      !!---------------------------------------------------------------------- 
    6363      ! 
     
    8181      ! 
    8282      IF( l_trdtrc )  THEN 
    83          CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrtrd ) 
     83         ALLOCATE( ztrtrd ( 1:jpi, 1:jpj, 1:jpk, 1:jptra) ) 
    8484         ztrtrd(:,:,:,:)  = tra(:,:,:,:) 
    8585      ENDIF 
     
    120120           CALL trd_tra( kt, 'TRC', jn, jptra_ldf, ztrtrd(:,:,:,jn) ) 
    121121        END DO 
    122         CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrtrd ) 
     122        DEALLOCATE( ztrtrd ) 
    123123      ENDIF 
    124124      !                                          ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.