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 8369 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/thd_ice.F90 – NEMO

Ignore:
Timestamp:
2017-07-25T16:38:38+02:00 (7 years ago)
Author:
clem
Message:

STEP4 (4): put all thermodynamics in 1D (limitd_th OK)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/thd_ice.F90

    r8342 r8369  
    1212   USE in_out_manager ! I/O manager 
    1313   USE lib_mpp        ! MPP library 
    14    USE ice, ONLY :   nlay_i, nlay_s 
     14   USE ice, ONLY :   nlay_i, nlay_s, jpl 
    1515 
    1616   IMPLICIT NONE 
     
    1919   PUBLIC thd_ice_alloc ! Routine called by nemogcm.F90 
    2020 
    21    !!----------------------------- 
    22    !! * Share 1D Module variables 
    23    !!----------------------------- 
     21   !!---------------------- 
     22   !! * 1D Module variables 
     23   !!---------------------- 
    2424   !: In ice thermodynamics, to spare memory, the vectors are folded 
    2525   !: from 1D to 2D vectors. The following variables, with ending _1d 
     
    9090   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   evap_ice_1d   !: <==> the 2D  evap_ice 
    9191   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   qprec_ice_1d  !: <==> the 2D  qprec_ice 
    92    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   qevap_ice_1d  !: <==> the 3D  qevap_ice 
    9392   !                                                     ! to reintegrate longwave flux inside the ice thermodynamics 
    9493   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   i0            !: fraction of radiation transmitted to the ice 
     
    9897   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   t_si_1d       !: <==> the 2D  t_si 
    9998   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   a_i_1d        !: <==> the 2D  a_i 
    100    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ht_i_1d       !: <==> the 2D  ht_s 
    101    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ht_s_1d       !: <==> the 2D  ht_i 
     99   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   a_ib_1d       !: <==> the 2D  a_i_b 
     100   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ht_i_1d       !: <==> the 2D  ht_i 
     101   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ht_ib_1d      !: <==> the 2D  ht_i_b 
     102   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   ht_s_1d       !: <==> the 2D  ht_s 
    102103   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   fc_su         !: Surface Conduction flux  
    103104   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   fc_bo_i       !: Bottom  Conduction flux  
     
    109110   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   sm_i_1d       !: Ice bulk salinity [ppt] 
    110111   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   s_i_new       !: Salinity of new ice at the bottom 
     112   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   a_ip_1d        !: 
     113   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   v_ip_1d        !: 
     114   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   v_i_1d        !: 
    111115 
    112116   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   t_s_1d   !: corresponding to the 2D var  t_s 
     
    127131   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   sss_1d 
    128132 
     133   !  
     134   !!---------------------- 
     135   !! * 2D Module variables 
     136   !!---------------------- 
     137   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   a_i_2d  
     138   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   v_i_2d  
     139   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   v_s_2d  
     140   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   oa_i_2d  
     141   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   smv_i_2d  
     142   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   a_ip_2d 
     143   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   v_ip_2d  
     144   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   t_su_2d  
     145   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_i_2d 
     146 
     147   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   a_ib_2d 
     148   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_ib_2d 
     149    
    129150   INTEGER , PUBLIC ::   jiindex_1d   ! 1D index of debugging point 
    130151 
     
    141162      !!---------------------------------------------------------------------! 
    142163      INTEGER ::   thd_ice_alloc   ! return value 
    143       INTEGER ::   ierr(6), ii 
     164      INTEGER ::   ierr(7), ii 
    144165      !!---------------------------------------------------------------------! 
    145166      ierr(:) = 0 
     
    164185         &      wfx_snw_sub_1d(jpij), wfx_ice_sub_1d(jpij), wfx_err_sub_1d(jpij) ,              & 
    165186         &      wfx_lam_1d(jpij)  , dqns_ice_1d(jpij) , evap_ice_1d (jpij),                     & 
    166          &      qprec_ice_1d(jpij), qevap_ice_1d(jpij), i0         (jpij) ,                     &   
     187         &      qprec_ice_1d(jpij), i0         (jpij) ,                                         &   
    167188         &      sfx_bri_1d (jpij) , sfx_bog_1d (jpij) , sfx_bom_1d (jpij) , sfx_sum_1d (jpij),  & 
    168189         &      sfx_sni_1d (jpij) , sfx_opw_1d (jpij) , sfx_res_1d (jpij) , sfx_sub_1d (jpij),  & 
     
    170191      ! 
    171192      ii = ii + 1 
    172       ALLOCATE( t_su_1d   (jpij) , t_si_1d  (jpij)  , a_i_1d   (jpij) , ht_i_1d  (jpij) ,    & 
    173          &      ht_s_1d   (jpij) , fc_su     (jpij) , fc_bo_i  (jpij) ,                      &     
    174          &      dh_s_tot  (jpij) , dh_i_surf (jpij) , dh_i_sub (jpij) ,                      &     
    175          &      dh_i_bott (jpij) , dh_snowice(jpij) , sm_i_1d  (jpij) , s_i_new  (jpij) ,    & 
    176          &      STAT=ierr(ii) ) 
     193      ALLOCATE( t_su_1d  (jpij) , t_si_1d   (jpij) , a_i_1d  (jpij) , a_ib_1d(jpij) ,                  & 
     194         &      ht_i_1d  (jpij) , ht_ib_1d  (jpij) , ht_s_1d (jpij) , fc_su  (jpij) , fc_bo_i(jpij) ,  &     
     195         &      dh_s_tot (jpij) , dh_i_surf (jpij) , dh_i_sub(jpij) ,                                  &     
     196         &      dh_i_bott(jpij) , dh_snowice(jpij) , sm_i_1d (jpij) , s_i_new(jpij) , & 
     197         &      a_ip_1d  (jpij) , v_ip_1d   (jpij) , v_i_1d  (jpij) , STAT=ierr(ii) ) 
    177198      ! 
    178199      ii = ii + 1 
     
    186207      ii = ii + 1 
    187208      ALLOCATE( sst_1d(jpij) , sss_1d(jpij) , STAT=ierr(ii) ) 
     209      ! 
     210      ii = ii + 1 
     211      ALLOCATE( a_i_2d(jpij,jpl) , a_ib_2d(jpij,jpl) , ht_i_2d(jpij,jpl) , ht_ib_2d(jpij,jpl) , & 
     212         &      v_i_2d(jpij,jpl) ,v_s_2d(jpij,jpl) ,oa_i_2d(jpij,jpl) ,smv_i_2d(jpij,jpl) ,  & 
     213         &      a_ip_2d(jpij,jpl) ,v_ip_2d(jpij,jpl) ,t_su_2d(jpij,jpl) ,  & 
     214         &      STAT=ierr(ii) ) 
    188215 
    189216      thd_ice_alloc = MAXVAL( ierr(:) ) 
Note: See TracChangeset for help on using the changeset viewer.