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/icedyn_adv_umx.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/icedyn_adv_umx.F90

    r10843 r11467  
    5454      !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74.  
    5555      !!---------------------------------------------------------------------- 
     56      USE scoce, ONLY : zudy => scr2D1, zvdx => scr2D2, zcu_box => scr2D3, zcv_box => scr2D4 
    5657      INTEGER                     , INTENT(in   ) ::   k_order    ! order of the scheme (1-5 or 20) 
    5758      INTEGER                     , INTENT(in   ) ::   kt         ! time step 
     
    7273      INTEGER  ::   initad                  ! number of sub-timestep for the advection 
    7374      REAL(wp) ::   zcfl , zusnit, zdt      !   -      - 
    74       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zudy, zvdx, zcu_box, zcv_box 
    7575      !!---------------------------------------------------------------------- 
    7676      ! 
    7777      IF( kt == nit000 .AND. lwp )   WRITE(numout,*) '-- ice_dyn_adv_umx: Ultimate-Macho advection scheme' 
    7878      ! 
    79       ALLOCATE( zudy(jpi,jpj) , zvdx(jpi,jpj) , zcu_box(jpi,jpj) , zcv_box(jpi,jpj) ) 
    8079      ! 
    8180      ! --- If ice drift field is too fast, use an appropriate time step for advection (CFL test for stability) --- !         
     
    133132      END DO 
    134133      ! 
    135       DEALLOCATE( zudy, zvdx, zcu_box, zcv_box ) 
    136       ! 
    137134   END SUBROUTINE ice_dyn_adv_umx 
    138135 
     
    151148      !! ** Action : - pt  the after advective tracer 
    152149      !!---------------------------------------------------------------------- 
     150      USE scoce, ONLY : zfu_ups => scr2D5, zfu_ho => scr2D6, zt_u => scr2D7, zt_ups => scr2D8, & 
     151                        zfv_ups => scr2D9, zfv_ho => scr2D10, zt_v => scr2D11, ztrd => scr2D12 
    153152      INTEGER                     , INTENT(in   ) ::   k_order        ! order of the ULTIMATE scheme 
    154153      INTEGER                     , INTENT(in   ) ::   kt             ! number of iteration 
     
    160159      INTEGER  ::   ji, jj           ! dummy loop indices   
    161160      REAL(wp) ::   ztra             ! local scalar 
    162       REAL(wp), DIMENSION(jpi,jpj) ::   zfu_ups, zfu_ho, zt_u, zt_ups 
    163       REAL(wp), DIMENSION(jpi,jpj) ::   zfv_ups, zfv_ho, zt_v, ztrd 
    164161      !!---------------------------------------------------------------------- 
    165162      ! 
     
    245242      !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74.  
    246243      !!---------------------------------------------------------------------- 
     244      USE scoce, ONLY : zzt => scr2D13 
    247245      INTEGER                     , INTENT(in   ) ::   k_order    ! order of the ULTIMATE scheme 
    248246      INTEGER                     , INTENT(in   ) ::   kt         ! number of iteration 
     
    255253      INTEGER  ::   ji, jj    ! dummy loop indices 
    256254      REAL(wp) ::   zc_box    !   -      - 
    257       REAL(wp), DIMENSION(jpi,jpj) :: zzt 
    258255      !!---------------------------------------------------------------------- 
    259256      ! 
     
    310307      !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74.  
    311308      !!---------------------------------------------------------------------- 
     309      USE scoce, ONLY : ztu1 => scr2D14, ztu2 => scr2D15, ztu3 => scr2D16, ztu4 => scr2D17 
    312310      INTEGER                     , INTENT(in   ) ::   k_order   ! ocean time-step index 
    313311      REAL(wp)                    , INTENT(in   ) ::   pdt       ! tracer time-step 
     
    318316      INTEGER  ::   ji, jj       ! dummy loop indices 
    319317      REAL(wp) ::   zcu, zdx2, zdx4    !   -      - 
    320       REAL(wp), DIMENSION(jpi,jpj) :: ztu1, ztu2, ztu3, ztu4 
    321318      !!---------------------------------------------------------------------- 
    322319      ! 
     
    428425      !! Reference : Leonard, B.P., 1991, Comput. Methods Appl. Mech. Eng., 88, 17-74.  
    429426      !!---------------------------------------------------------------------- 
     427      USE scoce, ONLY : ztv1 => scr2D14, ztv2 => scr2D15, ztv3 => scr2D16, ztv4 => scr2D17 
    430428      INTEGER                     , INTENT(in   ) ::   k_order   ! ocean time-step index 
    431429      REAL(wp)                    , INTENT(in   ) ::   pdt       ! tracer time-step 
     
    436434      INTEGER  ::   ji, jj       ! dummy loop indices 
    437435      REAL(wp) ::   zcv, zdy2, zdy4    !   -      - 
    438       REAL(wp), DIMENSION(jpi,jpj) :: ztv1, ztv2, ztv3, ztv4 
    439436      !!---------------------------------------------------------------------- 
    440437      ! 
     
    546543      !!       in-space based differencing for fluid 
    547544      !!---------------------------------------------------------------------- 
     545      USE scoce, ONLY : zbetup => scr2D14, zbetdo => scr2D15, zbup => scr2D16, & 
     546                       zbdo => scr2D17, zmsk => scr2D18, zdiv => scr2D19 
    548547      REAL(wp)                     , INTENT(in   ) ::   pdt          ! tracer time-step 
    549548      REAL(wp), DIMENSION (jpi,jpj), INTENT(in   ) ::   pbef, paft   ! before & after field 
     
    554553      REAL(wp) ::   zpos, zneg, zbt, za, zb, zc, zbig, zsml, z1_dt   ! local scalars 
    555554      REAL(wp) ::   zau, zbu, zcu, zav, zbv, zcv, zup, zdo            !   -      - 
    556       REAL(wp), DIMENSION(jpi,jpj) :: zbetup, zbetdo, zbup, zbdo, zmsk, zdiv 
    557555      !!---------------------------------------------------------------------- 
    558556      ! 
Note: See TracChangeset for help on using the changeset viewer.