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 3294 for trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90 – NEMO

Ignore:
Timestamp:
2012-01-28T17:44:18+01:00 (12 years ago)
Author:
rblod
Message:

Merge of 3.4beta into the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_lac.F90

    r2777 r3294  
    2626   USE limtab           ! LIM 2D <==> 1D 
    2727   USE limcons          ! LIM conservation 
    28    USE wrk_nemo         ! workspace manager 
    2928   USE in_out_manager   ! I/O manager 
    3029   USE lib_mpp          ! MPP library 
     30   USE wrk_nemo         ! work arrays 
    3131 
    3232   IMPLICIT NONE 
     
    7777      !!               update ht_s_b, ht_i_b and tbif_1d(:,:)       
    7878      !!------------------------------------------------------------------------ 
    79       USE wrk_nemo, ONLY :   vt_i_init => wrk_2d_1 , vt_i_final => wrk_2d_4 , et_i_init => wrk_2d_7 
    80       USE wrk_nemo, ONLY :   vt_s_init => wrk_2d_2 , vt_s_final => wrk_2d_5 , et_s_init => wrk_2d_8 
    81       USE wrk_nemo, ONLY :   zvrel     => wrk_2d_3 , et_i_final => wrk_2d_6  
    82       ! 
    8379      INTEGER ::   ji,jj,jk,jl,jm   ! dummy loop indices 
    8480      INTEGER ::   layer, nbpac     ! local integers  
     
    9086      CHARACTER (len = 15) :: fieldid 
    9187      ! 
    92       INTEGER, DIMENSION(jpij) ::   zcatac    !  indexes of categories where new ice grows 
    93  
    94       REAL(wp), DIMENSION(jpij,jpl) ::   zhice_old   ! previous ice thickness 
    95       REAL(wp), DIMENSION(jpij,jpl) ::   zdummy      ! dummy thickness of new ice  
    96       REAL(wp), DIMENSION(jpij,jpl) ::   zdhicbot    ! thickness of new ice which is accreted vertically 
    97       REAL(wp), DIMENSION(jpij,jpl) ::   zv_old      ! old volume of ice in category jl 
    98       REAL(wp), DIMENSION(jpij,jpl) ::   za_old      ! old area of ice in category jl 
    99       REAL(wp), DIMENSION(jpij,jpl) ::   za_i_ac     ! 1-D version of a_i 
    100       REAL(wp), DIMENSION(jpij,jpl) ::   zv_i_ac     ! 1-D version of v_i 
    101       REAL(wp), DIMENSION(jpij,jpl) ::   zoa_i_ac    ! 1-D version of oa_i 
    102       REAL(wp), DIMENSION(jpij,jpl) ::   zsmv_i_ac   ! 1-D version of smv_i 
    103  
    104       REAL(wp), DIMENSION(jpij,jkmax  ,jpl) ::   ze_i_ac   !: 1-D version of e_i 
    105       REAL(wp), DIMENSION(jpij,jkmax+1,jpl) ::   zqm0      ! old layer-system heat content 
    106       REAL(wp), DIMENSION(jpij,jkmax+1,jpl) ::   zthick0   ! old ice thickness 
    107  
    108       REAL(wp), POINTER, DIMENSION(:) ::   zv_newice, zh_newice, zs_newice, zdv_res, zat_i_ac , zdh_frazb, zqbgow 
    109       REAL(wp), POINTER, DIMENSION(:) ::   za_newice, ze_newice, zo_newice, zda_res, zat_i_lev, zvrel_ac , zdhex 
    110       REAL(wp), POINTER, DIMENSION(:) ::   zswinew 
     88      INTEGER , POINTER, DIMENSION(:) ::   zcatac      ! indexes of categories where new ice grows 
     89      REAL(wp), POINTER, DIMENSION(:) ::   zswinew     ! switch for new ice or not 
     90 
     91      REAL(wp), POINTER, DIMENSION(:) ::   zv_newice   ! volume of accreted ice 
     92      REAL(wp), POINTER, DIMENSION(:) ::   za_newice   ! fractional area of accreted ice 
     93      REAL(wp), POINTER, DIMENSION(:) ::   zh_newice   ! thickness of accreted ice 
     94      REAL(wp), POINTER, DIMENSION(:) ::   ze_newice   ! heat content of accreted ice 
     95      REAL(wp), POINTER, DIMENSION(:) ::   zs_newice   ! salinity of accreted ice 
     96      REAL(wp), POINTER, DIMENSION(:) ::   zo_newice   ! age of accreted ice 
     97      REAL(wp), POINTER, DIMENSION(:) ::   zdv_res     ! residual volume in case of excessive heat budget 
     98      REAL(wp), POINTER, DIMENSION(:) ::   zda_res     ! residual area in case of excessive heat budget 
     99      REAL(wp), POINTER, DIMENSION(:) ::   zat_i_ac    ! total ice fraction     
     100      REAL(wp), POINTER, DIMENSION(:) ::   zat_i_lev   ! total ice fraction for level ice only (type 1)    
     101      REAL(wp), POINTER, DIMENSION(:) ::   zdh_frazb   ! accretion of frazil ice at the ice bottom 
     102      REAL(wp), POINTER, DIMENSION(:) ::   zvrel_ac    ! relative ice / frazil velocity (1D vector) 
     103 
     104      REAL(wp), POINTER, DIMENSION(:,:) ::   zhice_old   ! previous ice thickness 
     105      REAL(wp), POINTER, DIMENSION(:,:) ::   zdummy      ! dummy thickness of new ice  
     106      REAL(wp), POINTER, DIMENSION(:,:) ::   zdhicbot    ! thickness of new ice which is accreted vertically 
     107      REAL(wp), POINTER, DIMENSION(:,:) ::   zv_old      ! old volume of ice in category jl 
     108      REAL(wp), POINTER, DIMENSION(:,:) ::   za_old      ! old area of ice in category jl 
     109      REAL(wp), POINTER, DIMENSION(:,:) ::   za_i_ac     ! 1-D version of a_i 
     110      REAL(wp), POINTER, DIMENSION(:,:) ::   zv_i_ac     ! 1-D version of v_i 
     111      REAL(wp), POINTER, DIMENSION(:,:) ::   zoa_i_ac    ! 1-D version of oa_i 
     112      REAL(wp), POINTER, DIMENSION(:,:) ::   zsmv_i_ac   ! 1-D version of smv_i 
     113 
     114      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ze_i_ac   !: 1-D version of e_i 
     115 
     116      REAL(wp), POINTER, DIMENSION(:) ::   zqbgow    ! heat budget of the open water (negative) 
     117      REAL(wp), POINTER, DIMENSION(:) ::   zdhex     ! excessively thick accreted sea ice (hlead-hice) 
     118 
     119      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zqm0      ! old layer-system heat content 
     120      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zthick0   ! old ice thickness 
     121 
     122      REAL(wp), POINTER, DIMENSION(:,:) ::   vt_i_init, vt_i_final   ! ice volume summed over categories 
     123      REAL(wp), POINTER, DIMENSION(:,:) ::   vt_s_init, vt_s_final   !  snow volume summed over categories 
     124      REAL(wp), POINTER, DIMENSION(:,:) ::   et_i_init, et_i_final   !  ice energy summed over categories 
     125      REAL(wp), POINTER, DIMENSION(:,:) ::   et_s_init               !  snow energy summed over categories 
     126      REAL(wp), POINTER, DIMENSION(:,:) ::   zvrel                   ! relative ice / frazil velocity 
    111127      !!-----------------------------------------------------------------------! 
    112128 
    113       IF(  wrk_in_use(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) .OR.   & 
    114          & wrk_in_use(2, 1,2,3,4,5,6,7,8)                        ) THEN 
    115          CALL ctl_stop('lim_thd_lac : requestead workspace arrays unavailable.')   ;   RETURN 
    116       END IF 
    117       ! Set-up pointers to sub-arrays of workspace arrays 
    118       zv_newice =>  wrk_1d_1 (1:jpij)   ! volume of accreted ice 
    119       za_newice =>  wrk_1d_2 (1:jpij)   ! fractional area of accreted ice 
    120       zh_newice =>  wrk_1d_3 (1:jpij)   ! thickness of accreted ice 
    121       ze_newice =>  wrk_1d_4 (1:jpij)   ! heat content of accreted ice 
    122       zs_newice =>  wrk_1d_5 (1:jpij)   ! salinity of accreted ice 
    123       zo_newice =>  wrk_1d_6 (1:jpij)   ! age of accreted ice 
    124       zdv_res   =>  wrk_1d_7 (1:jpij)   ! residual volume in case of excessive heat budget 
    125       zda_res   =>  wrk_1d_8 (1:jpij)   ! residual area in case of excessive heat budget 
    126       zat_i_ac  =>  wrk_1d_9 (1:jpij)   ! total ice fraction 
    127       zat_i_lev =>  wrk_1d_10(1:jpij)   ! total ice fraction for level ice only (type 1)    
    128       zdh_frazb =>  wrk_1d_11(1:jpij)   ! accretion of frazil ice at the ice bottom 
    129       zvrel_ac  =>  wrk_1d_12(1:jpij)   ! relative ice / frazil velocity (1D vector) 
    130       zqbgow    =>  wrk_1d_13(1:jpij)   ! heat budget of the open water (negative) 
    131       zdhex     =>  wrk_1d_14(1:jpij)   ! excessively thick accreted sea ice (hlead-hice) 
    132       zswinew   =>  wrk_1d_15(1:jpij)   ! switch for new ice or not 
    133  
    134  
     129      CALL wrk_alloc( jpij, zcatac )   ! integer 
     130      CALL wrk_alloc( jpij, zswinew, zv_newice, za_newice, zh_newice, ze_newice, zs_newice, zo_newice ) 
     131      CALL wrk_alloc( jpij, zdv_res, zda_res, zat_i_ac, zat_i_lev, zdh_frazb, zvrel_ac, zqbgow, zdhex ) 
     132      CALL wrk_alloc( jpij,jpl, zhice_old, zdummy, zdhicbot, zv_old, za_old, za_i_ac, zv_i_ac, zoa_i_ac, zsmv_i_ac ) 
     133      CALL wrk_alloc( jpij,jkmax,jpl, ze_i_ac ) 
     134      CALL wrk_alloc( jpij,jkmax+1,jpl, zqm0, zthick0 ) 
     135      CALL wrk_alloc( jpi,jpj, vt_i_init, vt_i_final, vt_s_init, vt_s_final, et_i_init, et_i_final, et_s_init, zvrel ) 
    135136 
    136137      et_i_init(:,:) = 0._wp 
     
    691692      ENDIF 
    692693      ! 
    693       IF( wrk_not_released(1, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) .OR.     & 
    694           wrk_not_released(2, 1,2,3,4,5,6,7,8)                       )   & 
    695           CALL ctl_stop( 'lim_thd_lac : failed to release workspace arrays' ) 
     694      CALL wrk_dealloc( jpij, zcatac )   ! integer 
     695      CALL wrk_dealloc( jpij, zswinew, zv_newice, za_newice, zh_newice, ze_newice, zs_newice, zo_newice ) 
     696      CALL wrk_dealloc( jpij, zdv_res, zda_res, zat_i_ac, zat_i_lev, zdh_frazb, zvrel_ac, zqbgow, zdhex ) 
     697      CALL wrk_dealloc( jpij,jpl, zhice_old, zdummy, zdhicbot, zv_old, za_old, za_i_ac, zv_i_ac, zoa_i_ac, zsmv_i_ac ) 
     698      CALL wrk_dealloc( jpij,jkmax,jpl, ze_i_ac ) 
     699      CALL wrk_dealloc( jpij,jkmax+1,jpl, zqm0, zthick0 ) 
     700      CALL wrk_dealloc( jpi,jpj, vt_i_init, vt_i_final, vt_s_init, vt_s_final, et_i_init, et_i_final, et_s_init, zvrel ) 
    696701      ! 
    697702   END SUBROUTINE lim_thd_lac 
Note: See TracChangeset for help on using the changeset viewer.