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 – 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

Location:
NEMO/branches/UKMO/dev_r10037_GPU/src
Files:
2 added
32 edited

Legend:

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

    r10843 r11467  
    5050      !!              the end of the dynamics (kn=1) and thermodynamics (kn=2) 
    5151      !!---------------------------------------------------------------------- 
     52      USE scoce, ONLY : zafx => scr2D1 
    5253      INTEGER, INTENT(in) ::   kt    ! number of iteration 
    5354      INTEGER, INTENT(in) ::   kn    ! 1 = after dyn ; 2 = after thermo 
     
    5556      INTEGER  ::   ji, jj, jk, jl   ! dummy loop indices 
    5657      REAL(wp) ::   zsal, zzc 
    57       REAL(wp), DIMENSION(jpi,jpj) ::   zafx   ! concentration trends diag 
    5858      !!---------------------------------------------------------------------- 
    5959      ! controls 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icedyn_adv.F90

    r10843 r11467  
    6565      !! ** action : 
    6666      !!---------------------------------------------------------------------- 
     67      USE scoce, ONLY : zmask => scr2D1        ! fraction of time step with v_i < 0 
    6768      INTEGER, INTENT(in) ::   kt   ! number of iteration 
    6869      ! 
    6970      INTEGER ::   jl   ! dummy loop indice 
    70       REAL(wp), DIMENSION(jpi,jpj) ::   zmask  ! fraction of time step with v_i < 0 
    7171      !!--------------------------------------------------------------------- 
    7272      ! 
  • 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      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icedyn_rdgrft.F90

    r10843 r11467  
    131131      !!     and Elizabeth C. Hunke, LANL are gratefully acknowledged 
    132132      !!------------------------------------------------------------------- 
     133      USE scice, ONLY :  zdivu_adv => scr1D1i, &    ! divu as implied by transport scheme  (1/s) 
     134                        zdivu => scr1D2i, zdelt => scr1D3i  ! 1D divu_i & delta_i 
    133135      INTEGER, INTENT(in) ::   kt     ! number of iteration 
    134136      !! 
     
    138140      REAL(wp) ::   zfac                       ! local scalar 
    139141      INTEGER , DIMENSION(jpij) ::   iptidx        ! compute ridge/raft or not 
    140       REAL(wp), DIMENSION(jpij) ::   zdivu_adv     ! divu as implied by transport scheme  (1/s) 
    141       REAL(wp), DIMENSION(jpij) ::   zdivu, zdelt  ! 1D divu_i & delta_i 
    142142      ! 
    143143      INTEGER, PARAMETER ::   jp_itermax = 20     
     
    293293      !!                participating in ridging and of the resulting ridges. 
    294294      !!------------------------------------------------------------------- 
     295      USE scice, ONLY : zasum => scr1D1i, z1_asum => scr1D2i, zaksum => scr1D3i, &   ! sum of a_i+ato_i and reverse 
     296                       zhi => scr1ai                ! ice thickness 
    295297      REAL(wp), DIMENSION(:)  , INTENT(in) ::   pato_i, pclosing_net  
    296298      REAL(wp), DIMENSION(:,:), INTENT(in) ::   pa_i, pv_i  
     
    298300      INTEGER  ::   ji, jl                     ! dummy loop indices 
    299301      REAL(wp) ::   z1_gstar, z1_astar, zhmean, zfac   ! local scalar 
    300       REAL(wp), DIMENSION(jpij)        ::   zasum, z1_asum, zaksum   ! sum of a_i+ato_i and reverse  
    301       REAL(wp), DIMENSION(jpij,jpl)    ::   zhi                      ! ice thickness 
    302302      REAL(wp), DIMENSION(jpij,-1:jpl) ::   zGsum                    ! zGsum(n) = sum of areas in categories 0 to n 
    303303      !-------------------------------------------------------------------- 
     
    495495      !!------------------------------------------------------------------- 
    496496      ! 
     497      USE scice, ONLY : airdg2 => scr1D1i, oirdg2 => scr1D2i, aprdg2 => scr1D3i, & ! area etc of new ridges 
     498                       virdg2 => scr1D4i, sirdg2 => scr1D5i, vsrdg => scr1D6i,  & 
     499                       vprdg => scr1D7i,                                        &  
     500                       ersw => scr1D8i,                                         & ! enth of water trapped into ridges 
     501                       zswitch => scr1D9i, fvol => scr1D10i,                     & ! new ridge volume going to jl2 
     502                       z1_ai => scr1D11i                                         ! 1 / a 
     503 
    497504      INTEGER  ::   ji, jj, jl, jl1, jl2, jk   ! dummy loop indices 
    498505      REAL(wp) ::   hL, hR, farea              ! left and right limits of integration and new area going to jl2 
     
    501508      REAL(wp)                  ::   airdg1, oirdg1, aprdg1, virdg1, sirdg1 
    502509      REAL(wp)                  ::   airft1, oirft1, aprft1 
    503       REAL(wp), DIMENSION(jpij) ::   airdg2, oirdg2, aprdg2, virdg2, sirdg2, vsrdg, vprdg  ! area etc of new ridges 
    504510      REAL(wp), DIMENSION(jpij) ::   airft2, oirft2, aprft2, virft , sirft , vsrft, vprft  ! area etc of rafted ice 
    505       ! 
    506       REAL(wp), DIMENSION(jpij) ::   ersw             ! enth of water trapped into ridges 
    507       REAL(wp), DIMENSION(jpij) ::   zswitch, fvol    ! new ridge volume going to jl2 
    508       REAL(wp), DIMENSION(jpij) ::   z1_ai            ! 1 / a 
    509511      ! 
    510512      REAL(wp), DIMENSION(jpij,nlay_s) ::   esrft     ! snow energy of rafting ice 
     
    750752      !!              ice strength has to be smoothed 
    751753      !!---------------------------------------------------------------------- 
     754      USE scoce, ONLY : zworka => scr2D1, &                 ! temporary array used here 
     755                       zstrp1 => scr2D2, zstrp2 => scr2D3  ! strength at previous time steps 
    752756      INTEGER             ::   ji, jj, jl  ! dummy loop indices 
    753757      INTEGER             ::   ismooth     ! smoothing the resistance to deformation 
    754758      INTEGER             ::   itframe     ! number of time steps for the P smoothing 
    755759      REAL(wp)            ::   zp, z1_3    ! local scalars 
    756       REAL(wp), DIMENSION(jpi,jpj) ::   zworka           ! temporary array used here 
    757       REAL(wp), DIMENSION(jpi,jpj) ::   zstrp1, zstrp2   ! strength at previous time steps 
    758760      !!---------------------------------------------------------------------- 
    759761      !                              !--------------------------------------------------! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icedyn_rhg_evp.F90

    r10843 r11467  
    107107      !!              Kimmritz et al., Ocean Modelling 2016 & 2017 
    108108      !!------------------------------------------------------------------- 
     109      USE scoce, ONLY : z1_e1t0 => scr2D1, z1_e2t0 => scr2D2, &                                       ! scale factors 
     110                        zp_delt => scr2D3, &                                                          ! P/delta at T points 
     111                        zbeta => scr2D4, &                                                            ! beta coef from Kimmritz 2017 
     112      ! 
     113                        zdt_m => scr2D5, &                                                            ! (dt / ice-snow_mass) on T points 
     114                        zaU => scr2D6  , zaV => scr2D7, &                                             ! ice fraction on U/V points 
     115                        zmU_t => scr2D8, zmV_t => scr2D9, &                                           ! (ice-snow_mass / dt) on U/V points 
     116                        zmf => scr2D10, &                                                             ! coriolis parameter at T points 
     117                        zTauU_ia => scr2D11, ztauV_ia => scr2D12, &                                   ! ice-atm. stress at U-V points 
     118                        zspgU => scr2D13, zspgV => scr2D14, &                                         ! surface pressure gradient at U/V points 
     119                        v_oceU => scr2D15, u_oceV => scr2D16, v_iceU => scr2D17, u_iceV => scr2D18, & ! ocean/ice u/v component on V/U points                            
     120                        zfU => scr2D19  , zfV => scr2D20, &                                           ! internal stresses 
     121      ! 
     122                        zds => scr2D21, &                                                             ! shear 
     123                        zs1 => scr2D22, zs2 => scr2D23, zs12 => scr2D38, &                            ! stress tensor components 
     124                        zu_ice => scr2D24, zv_ice => scr2D25, zresr => scr2D26, &                     ! check convergence 
     125                        zpice  => scr2D27, &                                                          ! array used for the calculation of ice surface slope: 
     126      !                                                                                               !    ocean surface (ssh_m) if ice is not embedded 
     127      !                                                                                               !    ice top surface if ice is embedded    
     128                        zCorx => scr2D28, zCory => scr2D29, &                                         ! Coriolis stress array 
     129                        ztaux_oi => scr2D30, ztauy_oi => scr2D31, &                                   ! Ocean-to-ice stress array 
     130      ! 
     131                        zswitchU => scr2D32, zswitchV => scr2D33, &                                   ! dummy arrays 
     132                        zmaskU => scr2D34, zmaskV => scr2D35, &                                       ! mask for ice presence 
     133                        zfmask => scr2D36, zwf => scr2D37                                             ! mask at F points for the ice 
     134 
     135                         
     136 
    109137      INTEGER                 , INTENT(in   ) ::   kt                                    ! time step 
    110138      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   pstress1_i, pstress2_i, pstress12_i   ! 
     
    127155      REAL(wp) ::   zshear, zdum1, zdum2 
    128156      ! 
    129       REAL(wp), DIMENSION(jpi,jpj) ::   z1_e1t0, z1_e2t0                ! scale factors 
    130       REAL(wp), DIMENSION(jpi,jpj) ::   zp_delt                         ! P/delta at T points 
    131       REAL(wp), DIMENSION(jpi,jpj) ::   zbeta                           ! beta coef from Kimmritz 2017 
    132       ! 
    133       REAL(wp), DIMENSION(jpi,jpj) ::   zdt_m                           ! (dt / ice-snow_mass) on T points 
    134       REAL(wp), DIMENSION(jpi,jpj) ::   zaU   , zaV                     ! ice fraction on U/V points 
    135       REAL(wp), DIMENSION(jpi,jpj) ::   zmU_t, zmV_t                    ! (ice-snow_mass / dt) on U/V points 
    136       REAL(wp), DIMENSION(jpi,jpj) ::   zmf                             ! coriolis parameter at T points 
    137       REAL(wp), DIMENSION(jpi,jpj) ::   zTauU_ia , ztauV_ia             ! ice-atm. stress at U-V points 
    138       REAL(wp), DIMENSION(jpi,jpj) ::   zspgU , zspgV                   ! surface pressure gradient at U/V points 
    139       REAL(wp), DIMENSION(jpi,jpj) ::   v_oceU, u_oceV, v_iceU, u_iceV  ! ocean/ice u/v component on V/U points                            
    140       REAL(wp), DIMENSION(jpi,jpj) ::   zfU   , zfV                     ! internal stresses 
    141       ! 
    142       REAL(wp), DIMENSION(jpi,jpj) ::   zds                             ! shear 
    143       REAL(wp), DIMENSION(jpi,jpj) ::   zs1, zs2, zs12                  ! stress tensor components 
    144       REAL(wp), DIMENSION(jpi,jpj) ::   zu_ice, zv_ice, zresr           ! check convergence 
    145       REAL(wp), DIMENSION(jpi,jpj) ::   zpice                           ! array used for the calculation of ice surface slope: 
    146       !                                                                 !    ocean surface (ssh_m) if ice is not embedded 
    147       !                                                                 !    ice top surface if ice is embedded    
    148       REAL(wp), DIMENSION(jpi,jpj) ::   zCorx, zCory                    ! Coriolis stress array 
    149       REAL(wp), DIMENSION(jpi,jpj) ::   ztaux_oi, ztauy_oi              ! Ocean-to-ice stress array 
    150       ! 
    151       REAL(wp), DIMENSION(jpi,jpj) ::   zswitchU, zswitchV              ! dummy arrays 
    152       REAL(wp), DIMENSION(jpi,jpj) ::   zmaskU, zmaskV                  ! mask for ice presence 
    153       REAL(wp), DIMENSION(jpi,jpj) ::   zfmask, zwf                     ! mask at F points for the ice 
    154  
    155157      REAL(wp), PARAMETER          ::   zepsi  = 1.0e-20_wp             ! tolerance parameter 
    156158      REAL(wp), PARAMETER          ::   zmmin  = 1._wp                  ! ice mass (kg/m2) below which ice velocity equals ocean velocity 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/iceforcing.F90

    r10843 r11467  
    5353      !!              utau_ice, vtau_ice : surface ice stress (U- & V-points) [N/m2] 
    5454      !!------------------------------------------------------------------- 
     55      USE scoce, ONLY : zutau_ice => scr2D1, zvtau_ice => scr2D2 
    5556      INTEGER                     , INTENT(in   ) ::   kt                   ! ocean time step 
    5657      INTEGER                     , INTENT(in   ) ::   ksbc                 ! type of sbc flux 
     
    5859      !! 
    5960      INTEGER  ::   ji, jj                 ! dummy loop index 
    60       REAL(wp), DIMENSION(jpi,jpj) ::   zutau_ice, zvtau_ice  
    6161      !!------------------------------------------------------------------- 
    6262      ! 
     
    111111      !!                alb_ice                                  = albedo above sea ice 
    112112      !!------------------------------------------------------------------- 
     113      USE scice, ONLY : zalb_os => scr1i, zalb_cs => scr2i     ! ice albedo under overcast/clear sky 
     114      USE scoce, ONLY : zalb => scr2D1                         ! 2D workspace 
    113115      INTEGER, INTENT(in) ::   kt     ! ocean time step 
    114116      INTEGER, INTENT(in) ::   ksbc   ! flux formulation (user defined, bulk or Pure Coupled) 
    115117      ! 
    116118      INTEGER  ::   ji, jj, jl                                ! dummy loop index 
    117       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
    118       REAL(wp), DIMENSION(jpi,jpj)     ::   zalb              ! 2D workspace 
    119119      !!-------------------------------------------------------------------- 
    120120      ! 
     
    185185      !!                =  2  Redistribute a single flux over categories 
    186186      !!------------------------------------------------------------------- 
     187      USE scoce, ONLY : z1_at_i  => scr2D1, &  ! inverse of concentration 
     188                       z_qsr_m  => scr2D2, &  ! Mean solar heat flux over all categories 
     189                       z_qns_m  => scr2D3, &  ! Mean non solar heat flux over all categories 
     190                       z_evap_m => scr2D4, &  ! Mean sublimation over all categories 
     191                       z_dqn_m  => scr2D5, &  ! Mean d(qns)/dT over all categories 
     192                       z_devap_m=> scr2D6, &  ! Mean d(evap)/dT over all categories 
     193                       zalb_m   => scr2D7, &  ! Mean albedo over all categories 
     194                       ztem_m   => scr2D8     ! Mean temperature over all categories 
     195 
    187196      INTEGER                   , INTENT(in   ) ::   k_iceflx   ! redistributor 
    188197      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   ptn_ice    ! ice surface temperature 
     
    196205      INTEGER  ::   jl      ! dummy loop index 
    197206      ! 
    198       REAL(wp), DIMENSION(jpi,jpj) ::   z1_at_i   ! inverse of concentration 
    199       ! 
    200       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z_qsr_m   ! Mean solar heat flux over all categories 
    201       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z_qns_m   ! Mean non solar heat flux over all categories 
    202       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z_evap_m  ! Mean sublimation over all categories 
    203       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z_dqn_m   ! Mean d(qns)/dT over all categories 
    204       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z_devap_m ! Mean d(evap)/dT over all categories 
    205       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zalb_m    ! Mean albedo over all categories 
    206       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   ztem_m    ! Mean temperature over all categories 
    207207      !!---------------------------------------------------------------------- 
    208208      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/iceistate.F90

    r10843 r11467  
    8989      !!              where there is no ice (clem: I do not know why, is it mandatory?)  
    9090      !!-------------------------------------------------------------------- 
     91      USE scoce, ONLY : zht_i_ini => scr2D1, zat_i_ini => scr2D2, zvt_i_ini => scr2D3, & !data from namelist or nc file 
     92                       zts_u_ini => scr2D4, zht_s_ini => scr2D5, zsm_i_ini => scr2D6, &   
     93                       ztm_i_ini => scr2D7,                                           & 
     94                       zswitch => scr2D8,                                             & ! ice indicator 
     95                       z2d => scr2D9 
     96      USE scice, ONLY : zh_i_ini => scr1i, za_i_ini => scr2i                             !data by cattegories to fill 
    9197      INTEGER  ::   ji, jj, jk, jl         ! dummy loop indices 
    9298      INTEGER  ::   i_hemis, i_fill, jl0   ! local integers 
     
    94100      REAL(wp) ::   zarg, zV, zconv, zdv, zfac 
    95101      INTEGER , DIMENSION(4)           ::   itest 
    96       REAL(wp), DIMENSION(jpi,jpj)     ::   z2d 
    97       REAL(wp), DIMENSION(jpi,jpj)     ::   zswitch    ! ice indicator 
    98       REAL(wp), DIMENSION(jpi,jpj)     ::   zht_i_ini, zat_i_ini, zvt_i_ini            !data from namelist or nc file 
    99       REAL(wp), DIMENSION(jpi,jpj)     ::   zts_u_ini, zht_s_ini, zsm_i_ini, ztm_i_ini !data from namelist or nc file 
    100       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zh_i_ini , za_i_ini                        !data by cattegories to fill 
    101102      !-------------------------------------------------------------------- 
    102103 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icestp.F90

    r10843 r11467  
    7979   USE timing         ! Timing 
    8080   USE prtctl         ! Print control 
     81   USE scice, ONLY : scice_alloc 
    8182 
    8283   IMPLICIT NONE 
     
    247248      ierr = ierr + sbc_ice_alloc    ()      ! surface forcing  
    248249      ierr = ierr + ice1D_alloc      ()      ! thermodynamics 
     250      ierr = ierr + scice_alloc      ()  
    249251      ! 
    250252      IF( lk_mpp    )   CALL mpp_sum( ierr ) 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icethd.F90

    r10843 r11467  
    8383      !!                - call ice_thd_do   for ice growth in leads 
    8484      !!------------------------------------------------------------------- 
     85      USE scoce, ONLY : zu_io => scr2D1, zv_io => scr2D2, zfric => scr2D3 
    8586      INTEGER, INTENT(in) :: kt    ! number of iteration 
    8687      ! 
     
    8990      REAL(wp), PARAMETER :: zfric_umin = 0._wp           ! lower bound for the friction velocity (cice value=5.e-04) 
    9091      REAL(wp), PARAMETER :: zch        = 0.0057_wp       ! heat transfer coefficient 
    91       REAL(wp), DIMENSION(jpi,jpj) ::   zu_io, zv_io, zfric   ! ice-ocean velocity (m/s) and frictional velocity (m2/s2) 
    9292      ! 
    9393      !!------------------------------------------------------------------- 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icethd_dh.F90

    r10843 r11467  
    6565      !!              Vancoppenolle et al.,2009, Ocean Modelling 
    6666      !!------------------------------------------------------------------ 
     67      USE scice, ONLY : zqprec     => scr1D1i,  & ! energy of fallen snow                       (J.m-3) 
     68                       zq_top     => scr1D2i,  & ! heat for surface ablation                   (J.m-2) 
     69                       zq_bot     => scr1D3i,  & ! heat for bottom ablation                    (J.m-2) 
     70                       zq_rema    => scr1D4i,  & ! remaining heat at the end of the routine    (J.m-2) 
     71                       zf_tt      => scr1D5i,  & ! Heat budget to determine melting or freezing(W.m-2) 
     72                       zevap_rema => scr1D6i,  & ! remaining mass flux from sublimation        (kg.m-2) 
     73                       zdh_s_mel  => scr1D7i,  & ! snow melt  
     74                       zdh_s_pre  => scr1D8i,  & ! snow precipitation  
     75                       zdh_s_sub  => scr1D9i,  & ! snow sublimation 
     76                       zsnw       => scr1D10i     ! distribution of snow after wind blowing 
     77  
     78 
    6779      INTEGER  ::   ji, jk       ! dummy loop indices 
    6880      INTEGER  ::   iter         ! local integer 
     
    8496      REAL(wp) ::   zfmdt        ! exchange mass flux x time step (J/m2), >0 towards the ocean 
    8597 
    86       REAL(wp), DIMENSION(jpij) ::   zqprec      ! energy of fallen snow                       (J.m-3) 
    87       REAL(wp), DIMENSION(jpij) ::   zq_top      ! heat for surface ablation                   (J.m-2) 
    88       REAL(wp), DIMENSION(jpij) ::   zq_bot      ! heat for bottom ablation                    (J.m-2) 
    89       REAL(wp), DIMENSION(jpij) ::   zq_rema     ! remaining heat at the end of the routine    (J.m-2) 
    90       REAL(wp), DIMENSION(jpij) ::   zf_tt       ! Heat budget to determine melting or freezing(W.m-2) 
    91       REAL(wp), DIMENSION(jpij) ::   zevap_rema  ! remaining mass flux from sublimation        (kg.m-2) 
    92  
    93       REAL(wp), DIMENSION(jpij) ::   zdh_s_mel   ! snow melt  
    94       REAL(wp), DIMENSION(jpij) ::   zdh_s_pre   ! snow precipitation  
    95       REAL(wp), DIMENSION(jpij) ::   zdh_s_sub   ! snow sublimation 
    96  
    9798      REAL(wp), DIMENSION(jpij,nlay_s) ::   zh_s      ! snw layer thickness 
    9899      REAL(wp), DIMENSION(jpij,nlay_i) ::   zh_i      ! ice layer thickness 
    99100      REAL(wp), DIMENSION(jpij,nlay_i) ::   zdeltah 
    100101      INTEGER , DIMENSION(jpij,nlay_i) ::   icount    ! number of layers vanished by melting  
    101  
    102       REAL(wp), DIMENSION(jpij) ::   zsnw        ! distribution of snow after wind blowing 
    103102 
    104103      REAL(wp) ::   zswitch_sal 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icethd_do.F90

    r10843 r11467  
    7575      !!               update h_s_1d, h_i_1d       
    7676      !!------------------------------------------------------------------------ 
     77      USE scice, ONLY : jcat => iscr1D1i,     & ! indexes of categories where new ice grows 
     78                       zswinew => scr1D1i,   & ! switch for new ice or not 
     79                       zv_newice => scr1D2i, & ! volume of accreted ice 
     80                       za_newice => scr1D3i, & ! fractional area of accreted ice 
     81                       zh_newice => scr1D4i, & ! thickness of accreted ice 
     82                       ze_newice => scr1D5i, & ! heat content of accreted ice 
     83                       zs_newice => scr1D6i, & ! salinity of accreted ice 
     84                       zo_newice => scr1D7i, & ! age of accreted ice 
     85                       zdv_res   => scr1D8i, & ! residual volume in case of excessive heat budget 
     86                       zda_res   => scr1D9i, & ! residual area in case of excessive heat budget 
     87                       zv_frazb  => scr1D10i, & ! accretion of frazil ice at the ice bottom 
     88                       zvrel_1d  => scr1D11i, & ! relative ice / frazil velocity (1D vector) 
     89                       zv_b      => scr1ai,  & ! old volume of ice in category jl 
     90                       za_b      => scr2ai     ! old area of ice in category jl  
     91      USE scoce, ONLY : zvrel     => scr2D1     ! relative ice / frazil velocity 
     92 
    7793      INTEGER  ::   ji, jj, jk, jl   ! dummy loop indices 
    7894      INTEGER  ::   iter             !   -       - 
     
    88104      REAL(wp) ::   zv_newfra 
    89105      ! 
    90       INTEGER , DIMENSION(jpij) ::   jcat        ! indexes of categories where new ice grows 
    91       REAL(wp), DIMENSION(jpij) ::   zswinew     ! switch for new ice or not 
    92       ! 
    93       REAL(wp), DIMENSION(jpij) ::   zv_newice   ! volume of accreted ice 
    94       REAL(wp), DIMENSION(jpij) ::   za_newice   ! fractional area of accreted ice 
    95       REAL(wp), DIMENSION(jpij) ::   zh_newice   ! thickness of accreted ice 
    96       REAL(wp), DIMENSION(jpij) ::   ze_newice   ! heat content of accreted ice 
    97       REAL(wp), DIMENSION(jpij) ::   zs_newice   ! salinity of accreted ice 
    98       REAL(wp), DIMENSION(jpij) ::   zo_newice   ! age of accreted ice 
    99       REAL(wp), DIMENSION(jpij) ::   zdv_res     ! residual volume in case of excessive heat budget 
    100       REAL(wp), DIMENSION(jpij) ::   zda_res     ! residual area in case of excessive heat budget 
    101       REAL(wp), DIMENSION(jpij) ::   zv_frazb    ! accretion of frazil ice at the ice bottom 
    102       REAL(wp), DIMENSION(jpij) ::   zvrel_1d    ! relative ice / frazil velocity (1D vector) 
    103       ! 
    104       REAL(wp), DIMENSION(jpij,jpl) ::   zv_b    ! old volume of ice in category jl 
    105       REAL(wp), DIMENSION(jpij,jpl) ::   za_b    ! old area of ice in category jl 
    106       ! 
    107106      REAL(wp), DIMENSION(jpij,nlay_i,jpl) ::   ze_i_2d !: 1-D version of e_i 
    108       ! 
    109       REAL(wp), DIMENSION(jpi,jpj) ::   zvrel    ! relative ice / frazil velocity 
    110107      ! 
    111108      REAL(wp) :: zcai = 1.4e-3_wp               ! ice-air drag (clem: should be dependent on coupling/forcing used) 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icethd_ent.F90

    r10843 r11467  
    6363      !! References : Bitz & Lipscomb, JGR 99; Vancoppenolle et al., GRL, 2005 
    6464      !!------------------------------------------------------------------- 
     65      USE scice, ONLY : zhnew => scr1D1i 
    6566      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   qnew             ! new enthlapies (J.m-3, remapped) 
    6667      ! 
     
    7071      REAL(wp), DIMENSION(jpij,0:nlay_i+2) ::   zeh_cum0, zh_cum0   ! old cumulative enthlapies and layers interfaces 
    7172      REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zeh_cum1, zh_cum1   ! new cumulative enthlapies and layers interfaces 
    72       REAL(wp), DIMENSION(jpij)            ::   zhnew               ! new layers thicknesses 
    7373      !!------------------------------------------------------------------- 
    7474 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icethd_zdf_bl99.F90

    r10843 r11467  
    7373      !!           total ice/snow thickness         : h_i_1d, h_s_1d 
    7474      !!------------------------------------------------------------------- 
     75      USE scice, ONLY : isnow => scr1D1i, &                  ! switch for presence (1) or absence (0) of snow 
     76                       ztsub => scr1D2i, &                   ! surface temperature at previous iteration 
     77                       zh_i => scr1D3i, z1_h_i => scr1D4i, & ! ice layer thickness 
     78                       zh_s => scr1D5i, z1_h_s => scr1D6i, & ! snow layer thickness 
     79                       zqns_ice_b => scr1D7i, &              ! solar radiation absorbed at the surface 
     80                       zfnet => scr1D8i, &                   ! surface flux function 
     81                       zdqns_ice_b => scr1D9i, &             ! derivative of the surface flux function 
     82                       ztsuold => scr1D10i, &                ! Old surface temperature in the ice 
     83                       zq_ini => scr1D11i, &                 ! diag errors on heat 
     84                       zghe => scr1D12i, &                      ! G(he), th. conduct enhancement factor, mono-cat 
     85                       ztiold,                        &      ! Old temperature in the ice 
     86                       ztsold,                        &      ! Old temperature in the snow 
     87                       ztib,                          &      ! Temporary temperature in the ice to check the convergence 
     88                       ztsb,                          &      ! Temporary temperature in the snow to check the convergence 
     89                       ztcond_i,                      &      ! Ice thermal conductivity 
     90                       zradtr_i,                      &      ! Radiation transmitted through the ice 
     91                       zradab_i,                      &      ! Radiation absorbed in the ice 
     92                       zkappa_i,                      &      ! Kappa factor in the ice 
     93                       zeta_i,                        &      ! Eta factor in the ice 
     94                       zradtr_s,                      &      ! Radiation transmited through the snow 
     95                       zradab_s,                      &      ! Radiation absorbed in the snow 
     96                       zkappa_s,                      &      ! Kappa factor in the snow 
     97                       zeta_s,                        &      ! Eta factor in the snow 
     98                       zindterm,                      &      ! 'Ind'ependent term 
     99                       zindtbis,                      &      ! Temporary 'ind'ependent term 
     100                       zdiagbis,                      &      ! Temporary 'dia'gonal term 
     101                       ztrid                                 ! Tridiagonal system terms 
     102 
    75103      INTEGER, INTENT(in) ::   k_jules     ! Jules coupling (0=OFF, 1=EMULATED, 2=ACTIVE) 
    76104      ! 
     
    98126      REAL(wp) ::   zhfx_err, zdq             ! diag errors on heat 
    99127      REAL(wp) ::   zfac                      ! dummy factor 
    100       ! 
    101       REAL(wp), DIMENSION(jpij) ::   isnow        ! switch for presence (1) or absence (0) of snow 
    102       REAL(wp), DIMENSION(jpij) ::   ztsub        ! surface temperature at previous iteration 
    103       REAL(wp), DIMENSION(jpij) ::   zh_i, z1_h_i ! ice layer thickness 
    104       REAL(wp), DIMENSION(jpij) ::   zh_s, z1_h_s ! snow layer thickness 
    105       REAL(wp), DIMENSION(jpij) ::   zqns_ice_b   ! solar radiation absorbed at the surface 
    106       REAL(wp), DIMENSION(jpij) ::   zfnet        ! surface flux function 
    107       REAL(wp), DIMENSION(jpij) ::   zdqns_ice_b  ! derivative of the surface flux function 
    108       ! 
    109       REAL(wp), DIMENSION(jpij       )     ::   ztsuold     ! Old surface temperature in the ice 
    110       REAL(wp), DIMENSION(jpij,nlay_i)     ::   ztiold      ! Old temperature in the ice 
    111       REAL(wp), DIMENSION(jpij,nlay_s)     ::   ztsold      ! Old temperature in the snow 
    112       REAL(wp), DIMENSION(jpij,nlay_i)     ::   ztib        ! Temporary temperature in the ice to check the convergence 
    113       REAL(wp), DIMENSION(jpij,nlay_s)     ::   ztsb        ! Temporary temperature in the snow to check the convergence 
    114       REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   ztcond_i    ! Ice thermal conductivity 
    115       REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zradtr_i    ! Radiation transmitted through the ice 
    116       REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zradab_i    ! Radiation absorbed in the ice 
    117       REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zkappa_i    ! Kappa factor in the ice 
    118       REAL(wp), DIMENSION(jpij,0:nlay_i)   ::   zeta_i      ! Eta factor in the ice 
    119       REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zradtr_s    ! Radiation transmited through the snow 
    120       REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zradab_s    ! Radiation absorbed in the snow 
    121       REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zkappa_s    ! Kappa factor in the snow 
    122       REAL(wp), DIMENSION(jpij,0:nlay_s)   ::   zeta_s      ! Eta factor in the snow 
    123       REAL(wp), DIMENSION(jpij,nlay_i+3)   ::   zindterm    ! 'Ind'ependent term 
    124       REAL(wp), DIMENSION(jpij,nlay_i+3)   ::   zindtbis    ! Temporary 'ind'ependent term 
    125       REAL(wp), DIMENSION(jpij,nlay_i+3)   ::   zdiagbis    ! Temporary 'dia'gonal term 
    126       REAL(wp), DIMENSION(jpij,nlay_i+3,3) ::   ztrid       ! Tridiagonal system terms 
    127       REAL(wp), DIMENSION(jpij)            ::   zq_ini      ! diag errors on heat 
    128       REAL(wp), DIMENSION(jpij)            ::   zghe        ! G(he), th. conduct enhancement factor, mono-cat 
    129128      ! 
    130129      ! Mono-category 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/iceupdate.F90

    r10843 r11467  
    8989      !!              The ref should be Rousset et al., 2015 
    9090      !!--------------------------------------------------------------------- 
     91      USE scoce, ONLY : z2d => scr2D1 
     92      USE scice, ONLY : zalb_cs => scr1i, zalb_os => scr2i 
    9193      INTEGER, INTENT(in) ::   kt   ! number of iteration 
    9294      ! 
     
    9496      REAL(wp) ::   zqmass           ! Heat flux associated with mass exchange ice->ocean (W.m-2) 
    9597      REAL(wp) ::   zqsr             ! New solar flux received by the ocean 
    96       REAL(wp), DIMENSION(jpi,jpj)     ::   z2d                  ! 2D workspace 
    97       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zalb_cs, zalb_os     ! 3D workspace 
    9898      !!--------------------------------------------------------------------- 
    9999      IF( ln_timing )   CALL timing_start('ice_update') 
  • 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      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DIA/diahsb.F90

    r10843 r11467  
    6969      !! 
    7070      !!--------------------------------------------------------------------------- 
     71      USE scoce, ONLY : z2d0 => scr2D1, z2d1 => scr2D2, zwrk => scr1 
    7172      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    7273      ! 
     
    8182      REAL(wp)   ::   z_wn_trd_t , z_wn_trd_s     !    -     - 
    8283      REAL(wp)   ::   z_ssh_hc , z_ssh_sc         !    -     - 
    83       REAL(wp), DIMENSION(jpi,jpj)       ::   z2d0, z2d1   ! 2D workspace 
    84       REAL(wp), DIMENSION(jpi,jpj,jpkm1) ::   zwrk         ! 3D workspace 
    8584      !!--------------------------------------------------------------------------- 
    8685      IF( ln_timing )   CALL timing_start('dia_hsb')       
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DOM/dommsk.F90

    r10847 r11467  
    9393      INTEGER  ::   ijf, ijl       !   -       - 
    9494      INTEGER  ::   iktop, ikbot   !   -       - 
    95       INTEGER  ::   ios, inum 
     95      INTEGER  ::   ios 
    9696      !! 
    9797      INTEGER  :: inum             !  logical unit for shlat2d 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DOM/domvvl.F90

    r10843 r11467  
    288288      !! Reference  : Leclair, M., and Madec, G. 2011, Ocean Modelling. 
    289289      !!---------------------------------------------------------------------- 
     290      USE scoce, ONLY : zht => scr2D1, z_scale => scr2D2, & 
     291                       zwu => scr2D3, zwv=> scr2D4,      & 
     292                       zhdiv => scr2D5, ze3t => scr1 
    290293      INTEGER, INTENT( in )           ::   kt      ! time step 
    291294      INTEGER, INTENT( in ), OPTIONAL ::   kcall   ! optional argument indicating call sequence 
     
    295298      REAL(wp)               ::   z2dt, z_tmin, z_tmax  ! local scalars 
    296299      LOGICAL                ::   ll_do_bclinic         ! local logical 
    297       REAL(wp), DIMENSION(jpi,jpj)     ::   zht, z_scale, zwu, zwv, zhdiv 
    298       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ze3t 
    299300      !!---------------------------------------------------------------------- 
    300301      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DYN/dynhpg.F90

    r10843 r11467  
    272272      !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 
    273273      !!---------------------------------------------------------------------- 
     274      USE scoce, ONLY : zhpi => scr1, zhpj => scr2 
    274275      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    275276      ! 
    276277      INTEGER  ::   ji, jj, jk       ! dummy loop indices 
    277278      REAL(wp) ::   zcoef0, zcoef1   ! temporary scalars 
    278       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zhpi, zhpj 
    279279      !!---------------------------------------------------------------------- 
    280280      ! 
     
    332332      !! ** Action  : - Update (ua,va) with the now hydrastatic pressure trend 
    333333      !!---------------------------------------------------------------------- 
     334      USE scoce, ONLY : zhpi => scr1, zhpj => scr2 
    334335      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    335336      !! 
     
    337338      INTEGER  ::   iku, ikv                         ! temporary integers 
    338339      REAL(wp) ::   zcoef0, zcoef1, zcoef2, zcoef3   ! temporary scalars 
    339       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zhpi, zhpj 
    340340      !!---------------------------------------------------------------------- 
    341341      ! 
     
    428428      !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 
    429429      !!---------------------------------------------------------------------- 
     430      USE scoce, ONLY : zhpi => scr1, zhpj => scr2, & 
     431                       zcpx => scr2D1, zcpy => scr2D2   ! W/D pressure filter 
    430432      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    431433      !! 
     
    433435      REAL(wp) ::   zcoef0, zuap, zvap, znad, ztmp       ! temporary scalars 
    434436      LOGICAL  ::   ll_tmp1, ll_tmp2                     ! local logical variables 
    435       REAL(wp), DIMENSION(jpi,jpj,jpk)      ::   zhpi, zhpj 
    436       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   zcpx, zcpy   !W/D pressure filter 
    437       !!---------------------------------------------------------------------- 
    438       ! 
    439       IF( ln_wd_il ) ALLOCATE(zcpx(jpi,jpj), zcpy(jpi,jpj)) 
     437      !!---------------------------------------------------------------------- 
    440438      ! 
    441439      IF( kt == nit000 ) THEN 
     
    551549      END DO 
    552550      ! 
    553       IF( ln_wd_il )  DEALLOCATE( zcpx , zcpy ) 
    554       ! 
    555551   END SUBROUTINE hpg_sco 
    556552 
     
    575571      !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 
    576572      !!---------------------------------------------------------------------- 
     573      USE scoce, ONLY : zhpi => scr1, zhpj => scr2, & 
     574                       zrhdtop_oce => scr2D1,      & 
     575                       zts_top => scr3D1 
    577576      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    578577      !! 
    579578      INTEGER  ::   ji, jj, jk, ikt, iktp1i, iktp1j   ! dummy loop indices 
    580579      REAL(wp) ::   zcoef0, zuap, zvap, znad          ! temporary scalars 
    581       REAL(wp), DIMENSION(jpi,jpj,jpk ) ::  zhpi, zhpj 
    582       REAL(wp), DIMENSION(jpi,jpj,jpts) ::  zts_top 
    583       REAL(wp), DIMENSION(jpi,jpj)      ::  zrhdtop_oce 
     580!     REAL(wp), DIMENSION(jpi,jpj,jpts) ::  zts_top 
    584581      !!---------------------------------------------------------------------- 
    585582      ! 
     
    669666      !! Reference: Shchepetkin and McWilliams, J. Geophys. Res., 108(C3), 3090, 2003 
    670667      !!---------------------------------------------------------------------- 
     668      USE scoce, ONLY : zcpx => scr2D1, zcpy => scr2D2 
    671669      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    672670      !! 
     
    680678      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   drhox, drhoy, drhoz, drhou, drhov, drhow 
    681679      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   rho_i, rho_j, rho_k 
    682       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   zcpx, zcpy   !W/D pressure filter 
    683680      !!---------------------------------------------------------------------- 
    684681      ! 
    685682      IF( ln_wd_il ) THEN 
    686          ALLOCATE( zcpx(jpi,jpj) , zcpy(jpi,jpj) ) 
    687683        DO jj = 2, jpjm1 
    688684           DO ji = 2, jpim1  
     
    926922      END DO 
    927923      ! 
    928       IF( ln_wd_il )   DEALLOCATE( zcpx, zcpy ) 
    929       ! 
    930924   END SUBROUTINE hpg_djc 
    931925 
     
    942936      !! ** Action : - Update (ua,va) with the now hydrastatic pressure trend 
    943937      !!---------------------------------------------------------------------- 
     938      USE scoce, ONLY : zdept => scr1, zrhh => scr2,                          & 
     939                       zhpi => scr3, zu => scr4, zv => scr5, fsp => scr6,    & 
     940                       xsp => scr7, asp => scr8, bsp => scr9,                & 
     941                       csp => scr10, dsp => scr11,                           & 
     942                       zsshu_n => scr2D1, zsshv_n => scr2D2, & 
     943                       zcpx => scr2D3, zcpy => scr2D4 
    944944      INTEGER, PARAMETER  :: polynomial_type = 1    ! 1: cubic spline, 2: linear 
    945945      INTEGER, INTENT(in) ::   kt                   ! ocean time-step index 
     
    954954      REAL(wp) :: zrhdt1 
    955955      REAL(wp) :: zdpdx1, zdpdx2, zdpdy1, zdpdy2 
    956       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdept, zrhh 
    957       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zhpi, zu, zv, fsp, xsp, asp, bsp, csp, dsp 
    958       REAL(wp), DIMENSION(jpi,jpj)   ::   zsshu_n, zsshv_n 
    959       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   zcpx, zcpy   !W/D pressure filter 
    960956      !!---------------------------------------------------------------------- 
    961957      ! 
     
    972968 
    973969      IF( ln_wd_il ) THEN 
    974          ALLOCATE( zcpx(jpi,jpj) , zcpy(jpi,jpj) ) 
    975970         DO jj = 2, jpjm1 
    976971           DO ji = 2, jpim1  
     
    12711266      END DO 
    12721267      ! 
    1273       IF( ln_wd_il )   DEALLOCATE( zcpx, zcpy ) 
    1274       ! 
    12751268   END SUBROUTINE hpg_prj 
    12761269 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DYN/dynnxt.F90

    r10843 r11467  
    9292      !!               un,vn   now horizontal velocity of next time-step 
    9393      !!---------------------------------------------------------------------- 
     94      USE scoce, ONLY : zue => scr2D1, zve => scr2D2, & 
     95                       ze3u_f => scr1, ze3v_f => scr2, zua => scr3, zva => scr4 
    9496      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    9597      ! 
     
    98100      REAL(wp) ::   zue3a, zue3n, zue3b, zuf, zcoef    ! local scalars 
    99101      REAL(wp) ::   zve3a, zve3n, zve3b, zvf, z1_2dt   !   -      - 
    100       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   zue, zve 
    101       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ze3u_f, ze3v_f, zua, zva  
    102102      !!---------------------------------------------------------------------- 
    103103      ! 
    104104      IF( ln_timing    )   CALL timing_start('dyn_nxt') 
    105       IF( ln_dynspg_ts )   ALLOCATE( zue(jpi,jpj)     , zve(jpi,jpj)     ) 
    106       IF( l_trddyn     )   ALLOCATE( zua(jpi,jpj,jpk) , zva(jpi,jpj,jpk) ) 
    107105      ! 
    108106      IF( kt == nit000 ) THEN 
     
    275273            ELSE                          ! Asselin filter applied on thickness weighted velocity 
    276274               ! 
    277                ALLOCATE( ze3u_f(jpi,jpj,jpk) , ze3v_f(jpi,jpj,jpk) ) 
    278275               ! Before filtered scale factor at (u/v)-points stored in ze3u_f, ze3v_f 
    279276               CALL dom_vvl_interpol( e3t_b(:,:,:), ze3u_f, 'U' ) 
     
    302299               e3v_b(:,:,1:jpkm1) = ze3v_f(:,:,1:jpkm1) 
    303300               ! 
    304                DEALLOCATE( ze3u_f , ze3v_f ) 
    305301            ENDIF 
    306302            ! 
     
    368364         &                       tab3d_2=vn, clinfo2=' Vn: '       , mask2=vmask ) 
    369365      !  
    370       IF( ln_dynspg_ts )   DEALLOCATE( zue, zve ) 
    371       IF( l_trddyn     )   DEALLOCATE( zua, zva ) 
    372366      IF( ln_timing    )   CALL timing_stop('dyn_nxt') 
    373367      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DYN/dynspg.F90

    r10843 r11467  
    7171      !!             period is used to prevent the divergence of odd and even time step. 
    7272      !!---------------------------------------------------------------------- 
     73      USE scoce, ONLY : zpice => scr2D1, ztrdu => scr1, ztrdv => scr2 
    7374      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    7475      ! 
    7576      INTEGER  ::   ji, jj, jk                   ! dummy loop indices 
    7677      REAL(wp) ::   z2dt, zg_2, zintp, zgrau0r, zld   ! local scalars 
    77       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   zpice 
    78       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdu, ztrdv 
    7978      !!---------------------------------------------------------------------- 
    8079      ! 
     
    8281      ! 
    8382      IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends 
    84          ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) )  
    8583         ztrdu(:,:,:) = ua(:,:,:) 
    8684         ztrdv(:,:,:) = va(:,:,:) 
     
    134132         ! 
    135133         IF( ln_ice_embd ) THEN              !== embedded sea ice: Pressure gradient due to snow-ice mass ==! 
    136             ALLOCATE( zpice(jpi,jpj) ) 
    137134            zintp = REAL( MOD( kt-1, nn_fsbc ) ) / REAL( nn_fsbc ) 
    138135            zgrau0r     = - grav * r1_rau0 
     
    144141               END DO 
    145142            END DO 
    146             DEALLOCATE( zpice )          
    147143         ENDIF 
    148144         ! 
     
    169165         ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 
    170166         CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt ) 
    171          DEALLOCATE( ztrdu , ztrdv )  
    172167      ENDIF 
    173168      !                                      ! print mean trends (used for debugging) 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DYN/dynvor.F90

    r10843 r11467  
    205205      !! ** Action : - Update (ua,va) with the now vorticity term trend 
    206206      !!---------------------------------------------------------------------- 
     207      USE scoce, ONLY : zwx => scr2D1, zwy => scr2D2, zwz  => scr2D3, zwt => scr2D4 
    207208      INTEGER                         , INTENT(in   ) ::   kt               ! ocean time-step index 
    208209      INTEGER                         , INTENT(in   ) ::   kvor             ! total, planetary, relative, or metric 
     
    212213      INTEGER  ::   ji, jj, jk           ! dummy loop indices 
    213214      REAL(wp) ::   zx1, zy1, zx2, zy2   ! local scalars 
    214       REAL(wp), DIMENSION(jpi,jpj) ::   zwx, zwy, zwz, zwt   ! 2D workspace 
    215215      !!---------------------------------------------------------------------- 
    216216      ! 
     
    327327      !! References : Sadourny, r., 1975, j. atmos. sciences, 32, 680-689. 
    328328      !!---------------------------------------------------------------------- 
     329      USE scoce, ONLY : zwx => scr2D1, zwy => scr2D2, zwz => scr2D3 
    329330      INTEGER                         , INTENT(in   ) ::   kt          ! ocean time-step index 
    330331      INTEGER                         , INTENT(in   ) ::   kvor        ! total, planetary, relative, or metric 
     
    334335      INTEGER  ::   ji, jj, jk           ! dummy loop indices 
    335336      REAL(wp) ::   zx1, zy1, zx2, zy2   ! local scalars 
    336       REAL(wp), DIMENSION(jpi,jpj) ::   zwx, zwy, zwz   ! 2D workspace 
    337337      !!---------------------------------------------------------------------- 
    338338      ! 
     
    435435      !! References : Sadourny, r., 1975, j. atmos. sciences, 32, 680-689. 
    436436      !!---------------------------------------------------------------------- 
     437      USE scoce, ONLY : zwx => scr2D1, zwy => scr2D2, & 
     438                       zwz => scr2D3, zww => scr2D4    ! 2D workspace 
    437439      INTEGER                         , INTENT(in   ) ::   kt          ! ocean time-step index 
    438440      INTEGER                         , INTENT(in   ) ::   kvor        ! total, planetary, relative, or metric 
     
    442444      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    443445      REAL(wp) ::   zuav, zvau   ! local scalars 
    444       REAL(wp), DIMENSION(jpi,jpj) ::   zwx, zwy, zwz, zww   ! 2D workspace 
    445446      !!---------------------------------------------------------------------- 
    446447      ! 
     
    539540      !! References : Arakawa and Lamb 1980, Mon. Wea. Rev., 109, 18-36 
    540541      !!---------------------------------------------------------------------- 
     542      USE scoce, ONLY : zwx => scr2D1, zwy => scr2D2, zwz => scr2D3, z1_e3f => scr2D4, & 
     543                       ztnw => scr2D5, ztne => scr2D6, ztsw => scr2D7, ztse => scr2D8 
    541544      INTEGER                         , INTENT(in   ) ::   kt          ! ocean time-step index 
    542545      INTEGER                         , INTENT(in   ) ::   kvor        ! total, planetary, relative, or metric 
     
    548551      REAL(wp) ::   zua, zva     ! local scalars 
    549552      REAL(wp) ::   zmsk, ze3f   ! local scalars 
    550       REAL(wp), DIMENSION(jpi,jpj) ::   zwx , zwy , zwz , z1_e3f 
    551       REAL(wp), DIMENSION(jpi,jpj) ::   ztnw, ztne, ztsw, ztse 
    552553      !!---------------------------------------------------------------------- 
    553554      ! 
     
    692693      !! References : Arakawa and Lamb 1980, Mon. Wea. Rev., 109, 18-36 
    693694      !!---------------------------------------------------------------------- 
     695      USE scoce, ONLY : zwx => scr2D1, zwy => scr2D2, zwz => scr2D3, z1_e3f => scr2D4, & 
     696                       ztnw => scr2D1, ztne => scr2D2, ztsw => scr2D3, ztse => scr2D4 
    694697      INTEGER                         , INTENT(in   ) ::   kt          ! ocean time-step index 
    695698      INTEGER                         , INTENT(in   ) ::   kvor        ! total, planetary, relative, or metric 
     
    701704      REAL(wp) ::   zua, zva       ! local scalars 
    702705      REAL(wp) ::   zmsk, z1_e3t   ! local scalars 
    703       REAL(wp), DIMENSION(jpi,jpj) ::   zwx , zwy , zwz 
    704       REAL(wp), DIMENSION(jpi,jpj) ::   ztnw, ztne, ztsw, ztse 
    705706      !!---------------------------------------------------------------------- 
    706707      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DYN/dynzdf.F90

    r10843 r11467  
    6565      !! ** Action :   (ua,va)   after velocity  
    6666      !!--------------------------------------------------------------------- 
     67      USE scoce, ONLY : zwi => scr1, zwd => scr2, zws => scr3, &    ! 3D workspace 
     68                       ztrdu => scr3 , ztrdv => scr4 
    6769      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    6870      ! 
     
    7173      REAL(wp) ::   zzwi, ze3ua, zdt   ! local scalars 
    7274      REAL(wp) ::   zzws, ze3va        !   -      - 
    73       REAL(wp), DIMENSION(jpi,jpj,jpk)        ::  zwi, zwd, zws   ! 3D workspace  
    74       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdu, ztrdv   !  -      - 
    7575      !!--------------------------------------------------------------------- 
    7676      ! 
     
    9696      ! 
    9797      IF( l_trddyn )   THEN         !* temporary save of ta and sa trends 
    98          ALLOCATE( ztrdu(jpi,jpj,jpk), ztrdv(jpi,jpj,jpk) )  
    9998         ztrdu(:,:,:) = ua(:,:,:) 
    10099         ztrdv(:,:,:) = va(:,:,:) 
     
    391390         ztrdv(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) / r2dt - ztrdv(:,:,:) 
    392391         CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt ) 
    393          DEALLOCATE( ztrdu, ztrdv )  
    394392      ENDIF 
    395393      !                                          ! print mean trends (used for debugging) 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/DYN/sshwzv.F90

    r10843 r11467  
    6666      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
    6767      !!---------------------------------------------------------------------- 
     68      use scoce, ONLY : zhdiv => scr2D1 
    6869      INTEGER, INTENT(in) ::   kt   ! time step 
    6970      !  
    7071      INTEGER  ::   jk            ! dummy loop indice 
    7172      REAL(wp) ::   z2dt, zcoef   ! local scalars 
    72       REAL(wp), DIMENSION(jpi,jpj) ::   zhdiv   ! 2D workspace 
    7373      !!---------------------------------------------------------------------- 
    7474      ! 
     
    140140      !! Reference  : Leclair, M., and G. Madec, 2009, Ocean Modelling. 
    141141      !!---------------------------------------------------------------------- 
     142      USE scoce, ONLY : zhdiv => scr1 
    142143      INTEGER, INTENT(in) ::   kt   ! time step 
    143144      ! 
    144145      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    145146      REAL(wp) ::   z1_2dt       ! local scalars 
    146       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zhdiv 
    147147      !!---------------------------------------------------------------------- 
    148148      ! 
     
    163163      ! 
    164164      IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN      ! z_tilde and layer cases 
    165          ALLOCATE( zhdiv(jpi,jpj,jpk) )  
    166165         ! 
    167166         DO jk = 1, jpkm1 
     
    183182         END DO 
    184183         !          IF( ln_vvl_layer ) wn(:,:,:) = 0.e0 
    185          DEALLOCATE( zhdiv )  
    186184      ELSE   ! z_star and linear free surface cases 
    187185         DO jk = jpkm1, 1, -1                       ! integrate from the bottom the hor. divergence 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/LDF/ldfslp.F90

    r10843 r11467  
    106106      !!               of now neutral surfaces at u-, w- and v- w-points, resp. 
    107107      !!---------------------------------------------------------------------- 
     108      USE scoce, ONLY : zslpml_hmlpu => scr2D1, zslpml_hmlpv => scr2D2, & 
     109                       zgru => scr1, zwz => scr2, zdzr => scr3, & 
     110                       zgrv => scr4, zww => scr5 
    108111      INTEGER , INTENT(in)                   ::   kt    ! ocean time-step index 
    109112      REAL(wp), INTENT(in), DIMENSION(:,:,:) ::   prd   ! in situ density 
     
    118121      REAL(wp) ::   zck, zfk,      zbw             !   -      - 
    119122      REAL(wp) ::   zdepu, zdepv                   !   -      - 
    120       REAL(wp), DIMENSION(jpi,jpj)     ::  zslpml_hmlpu, zslpml_hmlpv 
    121       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zgru, zwz, zdzr 
    122       REAL(wp), DIMENSION(jpi,jpj,jpk) ::  zgrv, zww 
    123123      !!---------------------------------------------------------------------- 
    124124      ! 
     
    389389      !!             - wslp2              squared slope of neutral surfaces at w-points. 
    390390      !!---------------------------------------------------------------------- 
     391      USE scoce, ONLY : z1_mlbw => scr2D1, zalbet => scr1 
    391392      INTEGER, INTENT( in ) ::   kt             ! ocean time-step index 
    392393      !! 
     
    401402      REAL(wp) ::   zdzrho_raw 
    402403      REAL(wp) ::   zbeta0, ze3_e1, ze3_e2 
    403       REAL(wp), DIMENSION(jpi,jpj)     ::   z1_mlbw 
    404       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zalbet 
    405404      REAL(wp), DIMENSION(jpi,jpj,jpk,0:1) ::   zdxrho , zdyrho, zdzrho     ! Horizontal and vertical density gradients 
    406405      REAL(wp), DIMENSION(jpi,jpj,0:1,0:1) ::   zti_mlb, ztj_mlb            ! for Griffies operator only 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/TRA/traadv.F90

    r10843 r11467  
    8383      !! ** Method  : - Update (ua,va) with the advection term following nadv 
    8484      !!---------------------------------------------------------------------- 
     85      USE scoce, ONLY : zun => scr1, zvn => scr2, zwn => scr3, &  ! 3D workspace 
     86                       ztrdt => scr4, ztrds => scr5 
    8587      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    8688      ! 
    8789      INTEGER ::   jk   ! dummy loop index 
    88       REAL(wp), DIMENSION(jpi,jpj,jpk)        :: zun, zvn, zwn   ! 3D workspace 
    89       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds 
    9090      !!---------------------------------------------------------------------- 
    9191      ! 
     
    138138      ! 
    139139      IF( l_trdtra )   THEN                    !* Save ta and sa trends 
    140          ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) ) 
    141140         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
    142141         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     
    165164         CALL trd_tra( kt, 'TRA', jp_tem, jptra_totad, ztrdt ) 
    166165         CALL trd_tra( kt, 'TRA', jp_sal, jptra_totad, ztrds ) 
    167          DEALLOCATE( ztrdt, ztrds ) 
    168166      ENDIF 
    169167      !                                              ! print mean trends (used for debugging) 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/TRA/tranxt.F90

    r10843 r11467  
    8686      !! ** Action  : - tsb & tsn ready for the next time step 
    8787      !!---------------------------------------------------------------------- 
     88      USE scoce, ONLY : ztrdt => scr1, ztrds => scr2  
    8889      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    8990      !! 
    9091      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
    9192      REAL(wp) ::   zfact            ! local scalars 
    92       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds 
    9393      !!---------------------------------------------------------------------- 
    9494      ! 
     
    118118      ! trends computation initialisation 
    119119      IF( l_trdtra )   THEN                     
    120          ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 
    121120         ztrdt(:,:,jpk) = 0._wp 
    122121         ztrds(:,:,jpk) = 0._wp 
     
    178177         CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 
    179178      END IF 
    180       IF( l_trdtra )   DEALLOCATE( ztrdt , ztrds ) 
    181179      ! 
    182180      !                        ! control print 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/TRA/traqsr.F90

    r10843 r11467  
    101101      !!              Morel, A. et Berthon, JF, 1989, Limnol Oceanogr 34(8), 1545-1562 
    102102      !!---------------------------------------------------------------------- 
     103      USE scoce, ONLY : zekb => scr2D1, zekg => scr2D2, zekr => scr2D3, & 
     104                       ze0 => scr1, ze1 => scr2, ze2 => scr3, ze3 => scr4, zea => scr5, ztrdt => scr6, & 
     105                       zetot => scr7, zchl3d => scr8  
    103106      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
    104107      ! 
     
    111114      REAL(wp) ::   zCb, zCmax, zze, zpsi, zpsimax, zdelpsi, zCtot, zCze 
    112115      REAL(wp) ::   zlogc, zlogc2, zlogc3  
    113       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   :: zekb, zekg, zekr 
    114       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ze0, ze1, ze2, ze3, zea, ztrdt 
    115       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zetot, zchl3d 
    116116      !!---------------------------------------------------------------------- 
    117117      ! 
     
    125125      ! 
    126126      IF( l_trdtra ) THEN      ! trends diagnostic: save the input temperature trend 
    127          ALLOCATE( ztrdt(jpi,jpj,jpk) )  
    128127         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
    129128      ENDIF 
     
    158157         ! 
    159158      CASE( np_RGB , np_RGBc )         !==  R-G-B fluxes  ==! 
    160          ! 
    161          ALLOCATE( zekb(jpi,jpj)     , zekg(jpi,jpj)     , zekr  (jpi,jpj)     , & 
    162             &      ze0 (jpi,jpj,jpk) , ze1 (jpi,jpj,jpk) , ze2   (jpi,jpj,jpk) , & 
    163             &      ze3 (jpi,jpj,jpk) , zea (jpi,jpj,jpk) , zchl3d(jpi,jpj,jpk)   )  
    164159         ! 
    165160         IF( nqsr == np_RGBc ) THEN          !*  Variable Chlorophyll 
     
    239234         END DO 
    240235         ! 
    241          DEALLOCATE( zekb , zekg , zekr , ze0 , ze1 , ze2 , ze3 , zea , zchl3d )  
    242          ! 
    243236      CASE( np_2BD  )            !==  2-bands fluxes  ==! 
    244237         ! 
     
    278271      ! 
    279272      IF( iom_use('qsr3d') ) THEN      ! output the shortwave Radiation distribution 
    280          ALLOCATE( zetot(jpi,jpj,jpk) ) 
    281273         zetot(:,:,nksr+1:jpk) = 0._wp     ! below ~400m set to zero 
    282274         DO jk = nksr, 1, -1 
     
    284276         END DO          
    285277         CALL iom_put( 'qsr3d', zetot )   ! 3D distribution of shortwave Radiation 
    286          DEALLOCATE( zetot )  
    287278      ENDIF 
    288279      ! 
     
    297288         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) - ztrdt(:,:,:) 
    298289         CALL trd_tra( kt, 'TRA', jp_tem, jptra_qsr, ztrdt ) 
    299          DEALLOCATE( ztrdt )  
    300290      ENDIF 
    301291      !                       ! print mean trends (used for debugging) 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/TRA/trasbc.F90

    r10843 r11467  
    7373      !!              - send trends to trdtra module for further diagnostics(l_trdtra=T) 
    7474      !!---------------------------------------------------------------------- 
     75      USE scoce, ONLY : ztrdt => scr1, ztrds => scr2 
    7576      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    7677      ! 
     
    7879      INTEGER  ::   ikt, ikb                    ! local integers 
    7980      REAL(wp) ::   zfact, z1_e3t, zdep, ztim   ! local scalar 
    80       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    8181      !!---------------------------------------------------------------------- 
    8282      ! 
     
    9090      ! 
    9191      IF( l_trdtra ) THEN                    !* Save ta and sa trends 
    92          ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) )  
    9392         ztrdt(:,:,:) = tsa(:,:,:,jp_tem) 
    9493         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
     
    276275         CALL trd_tra( kt, 'TRA', jp_tem, jptra_nsr, ztrdt ) 
    277276         CALL trd_tra( kt, 'TRA', jp_sal, jptra_nsr, ztrds ) 
    278          DEALLOCATE( ztrdt , ztrds )  
    279277      ENDIF 
    280278      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/ZDF/zdfmxl.F90

    r10843 r11467  
    8686      !! ** Action  :   nmln, hmld, hmlp, hmlpt 
    8787      !!---------------------------------------------------------------------- 
     88      USE scoce, ONLY : imld => iscr2D1 
    8889      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    8990      ! 
     
    9192      INTEGER  ::   iikn, iiki, ikt ! local integer 
    9293      REAL(wp) ::   zN2_c           ! local scalar 
    93       INTEGER, DIMENSION(jpi,jpj) ::   imld   ! 2D workspace 
    9494      !!---------------------------------------------------------------------- 
    9595      ! 
     
    177177      !  
    178178      !!-----------------------------------------------------------------------------------  
    179  
     179      USE scoce, ONLY : ikmt => iscr2D1,   &    ! number of active tracer levels 
     180                       ik_ref => iscr2D2, &    ! index of reference level 
     181                       ik_iso => iscr2D3, &    ! index of last uniform temp level 
     182                       zT => scr1,        &    ! Temperature or density       
     183                       ppzdep => scr2D1,  &    ! depth for use in calculating d(rho) 
     184                       zT_ref => scr2D2,  &    ! reference temperature 
     185                       zdTdz => scr2,     &    ! gradient of zT 
     186                       zmoddT => scr3,    &    ! Absolute temperature difference 
     187                       zdelta_T => scr2D3,&    ! difference critereon 
     188                       zRHO1 => scr2D4,   &    ! Densities 
     189                       zRHO2 => scr2D5         ! Densities 
    180190      TYPE(MXL_ZINT), INTENT(in)  :: sf 
    181191 
     
    188198      ! Local variables 
    189199      REAL(wp), PARAMETER :: zepsilon = 1.e-30          ! local small value 
    190       INTEGER, DIMENSION(jpi,jpj) :: ikmt          ! number of active tracer levels  
    191       INTEGER, DIMENSION(jpi,jpj) :: ik_ref        ! index of reference level  
    192       INTEGER, DIMENSION(jpi,jpj) :: ik_iso        ! index of last uniform temp level  
    193       REAL, DIMENSION(jpi,jpj,jpk)  :: zT            ! Temperature or density  
    194       REAL, DIMENSION(jpi,jpj)    :: ppzdep        ! depth for use in calculating d(rho)  
    195       REAL, DIMENSION(jpi,jpj)    :: zT_ref        ! reference temperature  
    196200      REAL    :: zT_b                                   ! base temperature  
    197       REAL, DIMENSION(jpi,jpj,jpk)  :: zdTdz         ! gradient of zT  
    198       REAL, DIMENSION(jpi,jpj,jpk)  :: zmoddT        ! Absolute temperature difference  
    199201      REAL    :: zdz                                    ! depth difference  
    200202      REAL    :: zdT                                    ! temperature difference  
    201       REAL, DIMENSION(jpi,jpj)    :: zdelta_T      ! difference critereon  
    202       REAL, DIMENSION(jpi,jpj)    :: zRHO1, zRHO2  ! Densities  
    203203      INTEGER :: ji, jj, jk                             ! loop counter  
    204204 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/ZDF/zdfphy.F90

    r10846 r11467  
    225225      !!                bottom stress.....                               <<<<====verifier ! 
    226226      !!---------------------------------------------------------------------- 
     227      USE scoce, ONLY : zsh2 => scr1   ! shear production 
    227228      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    228229      ! 
    229230      INTEGER ::   ji, jj, jk   ! dummy loop indice 
    230       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zsh2   ! shear production 
    231231      !! --------------------------------------------------------------------- 
    232232      ! 
  • NEMO/branches/UKMO/dev_r10037_GPU/src/OCE/nemogcm.F90

    r10843 r11467  
    9292   USE agrif_all_update   ! Master Agrif update 
    9393#endif 
     94   USE scoce, ONLY : scoce_alloc ! scratch arrays 
    9495 
    9596   IMPLICIT NONE 
     
    607608      ierr = ierr + trc_oce_alloc()    ! shared TRC / TRA arrays 
    608609      ierr = ierr + bdy_oce_alloc()    ! bdy masks (incl. initialization) 
     610      ierr = ierr + scoce_alloc()       ! scratch arrays 
    609611      ! 
    610612#if defined key_diadct  
Note: See TracChangeset for help on using the changeset viewer.