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 7581 for branches/UKMO/dev_r5518_optim_GO6_alloc/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90 – NEMO

Ignore:
Timestamp:
2017-01-19T13:20:22+01:00 (7 years ago)
Author:
frrh
Message:

#1821. Commit optimisations to replace pointers with allocatable
work arrays. This is based on MG's initial work, but I've added
traadv_tvd.F90 since this will be applicable more generally to NEMO
whilst traadv_muscl.F90 only applies if MEDUSA is active.
I've not bothered with fldread.F90 since this is only called a
handful of times in any given run so I don't want to increase
the potential risk of code clashes with other branches for no
measurable gain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_optim_GO6_alloc/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r6498 r7581  
    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 ( jpi, jpj, jpk, 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.