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 2715 for trunk/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90 – NEMO

Ignore:
Timestamp:
2011-03-30T17:58:35+02:00 (13 years ago)
Author:
rblod
Message:

First attempt to put dynamic allocation on the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90

    r2528 r2715  
    7575      !! References :   Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90 
    7676      !!--------------------------------------------------------------------- 
     77      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 
     78      USE wrk_nemo, ONLY: ztmp    => wrk_2d_1, & ! 2D workspace 
     79                          zqlbsbq => wrk_2d_2, & ! link with lead energy budget qldif 
     80                          zlicegr => wrk_2d_3    ! link with lateral ice growth  
     81      USE wrk_nemo, ONLY: zmsk => wrk_3d_4       ! 3D workspace 
     82      USE wrk_nemo, ONLY: zdvosif => wrk_2d_4, & !: Variation of volume at surface 
     83                          zdvobif => wrk_2d_5, & !: Variation of ice volume at the bottom ice     (outputs only) 
     84                          zdvolif => wrk_2d_6, & !: Total variation of ice volume                 (outputs only) 
     85                          zdvonif => wrk_2d_7, & !: Surface accretion Snow to Ice transformation  (outputs only) 
     86                          zdvomif => wrk_2d_8, & !: Bottom variation of ice volume due to melting (outputs only) 
     87                          zu_imasstr =>wrk_2d_9, & !: Sea-ice transport along i-axis at U-point     (outputs only)  
     88                          zv_imasstr =>wrk_2d_10   !: Sea-ice transport along j-axis at V-point     (outputs only)  
     89      !! 
    7790      INTEGER, INTENT(in) ::   kt     ! number of iteration 
    7891      !! 
     
    91104      REAL(wp) ::   zfontn               ! heat flux from snow thickness 
    92105      REAL(wp) ::   zfntlat, zpareff     ! test. the val. of lead heat budget 
    93       REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp      ! 2D workspace 
    94       REAL(wp), DIMENSION(jpi,jpj)     ::   zqlbsbq   ! link with lead energy budget qldif 
     106 
    95107      REAL(wp) ::   zuice_m, zvice_m     ! Sea-ice velocities at U & V-points 
    96108      REAL(wp) ::   zhice_u, zhice_v     ! Sea-ice volume at U & V-points 
     
    98110      REAL(wp) ::   zrhoij, zrhoijm1     ! temporary scalars 
    99111      REAL(wp) ::   zztmp                ! temporary scalars within a loop 
    100       REAL(wp), DIMENSION(jpi,jpj)     ::   zlicegr   ! link with lateral ice growth  
    101       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmsk      ! 3D workspace 
    102112!!$      REAL(wp), DIMENSION(jpi,jpj) ::   firic         !: IR flux over the ice            (outputs only) 
    103113!!$      REAL(wp), DIMENSION(jpi,jpj) ::   fcsic         !: Sensible heat flux over the ice (outputs only) 
    104114!!$      REAL(wp), DIMENSION(jpi,jpj) ::   fleic         !: Latent heat flux over the ice   (outputs only) 
    105115!!$      REAL(wp), DIMENSION(jpi,jpj) ::   qlatic        !: latent flux                     (outputs only) 
    106       REAL(wp), DIMENSION(jpi,jpj) ::   zdvosif       !: Variation of volume at surface                (outputs only) 
    107       REAL(wp), DIMENSION(jpi,jpj) ::   zdvobif       !: Variation of ice volume at the bottom ice     (outputs only) 
    108       REAL(wp), DIMENSION(jpi,jpj) ::   zdvolif       !: Total variation of ice volume                 (outputs only) 
    109       REAL(wp), DIMENSION(jpi,jpj) ::   zdvonif       !: Surface accretion Snow to Ice transformation  (outputs only) 
    110       REAL(wp), DIMENSION(jpi,jpj) ::   zdvomif       !: Bottom variation of ice volume due to melting (outputs only) 
    111       REAL(wp), DIMENSION(jpi,jpj) ::   zu_imasstr    !: Sea-ice transport along i-axis at U-point     (outputs only)  
    112       REAL(wp), DIMENSION(jpi,jpj) ::   zv_imasstr    !: Sea-ice transport along j-axis at V-point     (outputs only)  
    113116      !!------------------------------------------------------------------- 
     117 
     118      IF( wrk_in_use(2, 1,2,3,4,5,6,7,8,9,10)   .OR.  & 
     119          wrk_in_use(3, 4)                    ) THEN 
     120         CALL ctl_stop('lim_thd_2 : requested workspace arrays unavailable')   ;   RETURN 
     121      ENDIF 
    114122 
    115123      IF( kt == nit000 )   CALL lim_thd_init_2  ! Initialization (first time-step only) 
     
    512520      ENDIF 
    513521       ! 
     522      IF( wrk_not_released(2, 1,2,3,4,5,6,7,8,9,10)   .OR.  & 
     523          wrk_not_released(3, 4)                    ) THEN 
     524         CALL ctl_stop('lim_thd_2 : failed to release workspace arrays') 
     525      ENDIF 
     526      ! 
    514527    END SUBROUTINE lim_thd_2 
    515528 
Note: See TracChangeset for help on using the changeset viewer.