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 11467 for NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icevar.F90 – NEMO

Ignore:
Timestamp:
2019-08-22T11:49:08+02:00 (5 years ago)
Author:
andmirek
Message:

Ticket #2197 allocate arrays at the beggining of the run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icevar.F90

    r10843 r11467  
    8989      !!              all-ice variables, i.e. it turns VGLO into VAGG 
    9090      !!------------------------------------------------------------------- 
     91      USE scoce, ONLY : z1_at_i => scr2D4, z1_vt_i => scr2D2, z1_vt_s => scr2D3 
    9192      INTEGER, INTENT( in ) ::   kn     ! =1 state variables only 
    9293      !                                 ! >1 state variables + others 
    9394      ! 
    9495      INTEGER ::   ji, jj, jk, jl   ! dummy loop indices 
    95       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z1_at_i, z1_vt_i, z1_vt_s 
    9696      !!------------------------------------------------------------------- 
    9797      ! 
     
    112112      IF( kn > 1 ) THEN 
    113113         ! 
    114          ALLOCATE( z1_at_i(jpi,jpj) , z1_vt_i(jpi,jpj) , z1_vt_s(jpi,jpj) ) 
    115114         WHERE( at_i(:,:) > epsi20 )   ;   z1_at_i(:,:) = 1._wp / at_i(:,:) 
    116115         ELSEWHERE                     ;   z1_at_i(:,:) = 0._wp 
     
    152151         END WHERE 
    153152 
    154          DEALLOCATE( z1_at_i , z1_vt_i , z1_vt_s ) 
    155153      ENDIF 
    156154      ! 
     
    165163      !!              global variables, i.e. it turns VGLO into VEQV 
    166164      !!------------------------------------------------------------------- 
     165      USE scice, ONLY : z1_a_i => scr3i, z1_v_i => scr4i 
    167166      INTEGER  ::   ji, jj, jk, jl   ! dummy loop indices 
    168167      REAL(wp) ::   ze_i             ! local scalars 
     
    170169      REAL(wp) ::   zhmax, z1_zhmax                 !   -      - 
    171170      REAL(wp) ::   zlay_i, zlay_s                  !   -      - 
    172       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z1_a_i, z1_v_i 
    173171      !!------------------------------------------------------------------- 
    174172 
     
    294292      !! ** References : Vancoppenolle et al., 2007 
    295293      !!------------------------------------------------------------------- 
     294      USE scice , ONLY : z_slope_s => scr5i, zalpha =>scr6i 
    296295      INTEGER  ::   ji, jj, jk, jl   ! dummy loop index 
    297296      REAL(wp) ::   zsal, z1_dS 
    298297      REAL(wp) ::   zargtemp , zs0, zs 
    299       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   z_slope_s, zalpha    ! case 2 only 
    300298      REAL(wp), PARAMETER :: zsi0 = 3.5_wp 
    301299      REAL(wp), PARAMETER :: zsi1 = 4.5_wp 
     
    315313      CASE( 2 )       !  time varying salinity with linear profile  ! 
    316314         !            !---------------------------------------------! 
    317          ! 
    318          ALLOCATE( z_slope_s(jpi,jpj,jpl) , zalpha(jpi,jpj,jpl) ) 
    319315         ! 
    320316         DO jl = 1, jpl 
     
    353349         END DO 
    354350         ! 
    355          DEALLOCATE( z_slope_s , zalpha ) 
    356          ! 
    357351         !            !-------------------------------------------! 
    358352      CASE( 3 )       ! constant salinity with a fix profile      ! (Schwarzacher (1959) multiyear salinity profile 
     
    386380      !!                Works with 1d vectors and is used by thermodynamic modules 
    387381      !!------------------------------------------------------------------- 
     382      USE scice, ONLY : z_slope_s => scr1D1i, zalpha => scr1D2i 
    388383      INTEGER  ::   ji, jk    ! dummy loop indices 
    389384      REAL(wp) ::   zargtemp, zsal, z1_dS   ! local scalars 
    390385      REAL(wp) ::   zs, zs0              !   -      - 
    391386      ! 
    392       REAL(wp), ALLOCATABLE, DIMENSION(:) ::   z_slope_s, zalpha   ! 
    393387      REAL(wp), PARAMETER :: zsi0 = 3.5_wp 
    394388      REAL(wp), PARAMETER :: zsi1 = 4.5_wp 
     
    405399      CASE( 2 )       !  time varying salinity with linear profile  ! 
    406400         !            !---------------------------------------------! 
    407          ! 
    408          ALLOCATE( z_slope_s(jpij), zalpha(jpij) ) 
    409401         ! 
    410402         !                                      ! Slope of the linear profile  
     
    430422         END DO 
    431423         ! 
    432          DEALLOCATE( z_slope_s, zalpha ) 
    433  
    434424         !            !-------------------------------------------! 
    435425      CASE( 3 )       ! constant salinity with a fix profile      ! (Schwarzacher (1959) multiyear salinity profile 
     
    458448      !! ** Purpose :   Remove too small sea ice areas and correct fluxes 
    459449      !!------------------------------------------------------------------- 
     450      USE scoce, ONLY : zswitch => scr2D2 
    460451      INTEGER  ::   ji, jj, jl, jk   ! dummy loop indices 
    461       REAL(wp), DIMENSION(jpi,jpj) ::   zswitch 
    462452      !!------------------------------------------------------------------- 
    463453      ! 
Note: See TracChangeset for help on using the changeset viewer.