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/OPA_SRC/SBC/sbc_ice.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/OPA_SRC/SBC/sbc_ice.F90

    r2528 r2715  
    22   !!====================================================================== 
    33   !!                 ***  MODULE  sbc_ice  *** 
    4    !!        parameter and  variables defined in memory in forced mode 
     4   !! Surface module - LIM-3: parameters & variables defined in memory 
    55   !!====================================================================== 
    6    !! History :  3.0  !  2006-08  (G. Madec)  Surface module 
    7    !!            3.2  !  2009-06  (S. Masson) merge with ice_oce 
     6   !! History :  3.0  ! 2006-08  (G. Madec)  Surface module 
     7   !!            3.2  ! 2009-06  (S. Masson) merge with ice_oce 
     8   !!            4.0  ! 2011-01  (A. R. Porter, STFC Daresbury) dynamical allocation 
    89   !!---------------------------------------------------------------------- 
    910#if defined key_lim3 || defined key_lim2 
     
    1314   USE par_oce          ! ocean parameters 
    1415# if defined key_lim3 
    15    USE par_ice          ! ice parameters 
     16   USE par_ice          ! LIM-3 parameters 
    1617# endif 
    1718# if defined key_lim2 
    18    USE par_ice_2        ! ice parameters 
     19   USE par_ice_2        ! LIM-2 parameters 
    1920# endif 
     21   USE lib_mpp          ! MPP library 
     22   USE in_out_manager   ! I/O manager 
    2023 
    2124   IMPLICIT NONE 
    2225   PRIVATE 
     26 
     27   PUBLIC sbc_ice_alloc ! called in iceini(_2).F90 
    2328 
    2429# if defined  key_lim2 
     
    3742# endif 
    3843 
    39    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qns_ice   !: non solar heat flux over ice                         [W/m2] 
    40    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qsr_ice   !: solar heat flux over ice                             [W/m2] 
    41    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   qla_ice   !: latent flux over ice                                 [W/m2] 
    42    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   dqla_ice  !: latent sensibility over ice                          [W/m2/K] 
    43    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   dqns_ice  !: non solar heat flux sensibility over ice (LW+SEN+LA) [W/m2/K] 
    44    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   tn_ice    !: ice surface temperature                              [K] 
    45    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpl) ::   alb_ice   !: albedo of ice 
     44   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qns_ice   !: non solar heat flux over ice                  [W/m2] 
     45   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qsr_ice   !: solar heat flux over ice                      [W/m2] 
     46   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qla_ice   !: latent flux over ice                          [W/m2] 
     47   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dqla_ice  !: latent sensibility over ice                 [W/m2/K] 
     48   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dqns_ice  !: non solar heat flux over ice (LW+SEN+LA)    [W/m2/K] 
     49   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tn_ice    !: ice surface temperature                          [K] 
     50   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   alb_ice   !: albedo of ice 
    4651 
    47    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   utau_ice    !: u-stress over ice (I-pt for VP or U,V-pts for EVP)   [N/m2] 
    48    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   vtau_ice    !: v-stress over ice (I-pt for VP or U,V-pts for EVP)   [N/m2] 
    49    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fr1_i0      !: 1st fraction of Qsr which penetrates inside the ice cover 
    50    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   fr2_i0      !: 2nd fraction of Qsr which penetrates inside the ice cover 
    51    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   emp_ice     !: solid freshwater budget over ice: sublivation - snow 
     52   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   utau_ice  !: atmos-ice u-stress. VP: I-pt ; EVP: U,V-pts   [N/m2] 
     53   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   vtau_ice  !: atmos-ice v-stress. VP: I-pt ; EVP: U,V-pts   [N/m2] 
     54   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr1_i0    !: 1st Qsr fraction penetrating inside ice cover    [-] 
     55   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fr2_i0    !: 2nd Qsr fraction penetrating inside ice cover    [-] 
     56   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   emp_ice   !: sublimation-snow budget over ice             [kg/m2] 
    5257 
    5358# if defined key_lim3 
    54    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   tatm_ice    !: air temperature 
     59   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tatm_ice    !: air temperature 
    5560# endif 
     61 
     62   !!---------------------------------------------------------------------- 
     63   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     64   !! $Id$  
     65   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     66   !!---------------------------------------------------------------------- 
     67CONTAINS 
     68 
     69   INTEGER FUNCTION sbc_ice_alloc() 
     70      !!---------------------------------------------------------------------- 
     71      !!                     ***  FUNCTION sbc_ice_alloc  *** 
     72      !!---------------------------------------------------------------------- 
     73      ALLOCATE( qns_ice (jpi,jpj,jpl) , qsr_ice (jpi,jpj,jpl) ,     & 
     74         &      qla_ice (jpi,jpj,jpl) , dqla_ice(jpi,jpj,jpl) ,     & 
     75         &      dqns_ice(jpi,jpj,jpl) , tn_ice  (jpi,jpj,jpl) ,     & 
     76         &      alb_ice (jpi,jpj,jpl) ,                             & 
     77         &      utau_ice(jpi,jpj)     , vtau_ice(jpi,jpj)     ,     & 
     78         &      fr1_i0  (jpi,jpj)     , fr2_i0  (jpi,jpj)     ,     & 
     79         &      emp_ice(jpi,jpj)                              , STAT= sbc_ice_alloc ) 
     80         ! 
     81      IF( lk_mpp            )   CALL mpp_sum ( sbc_ice_alloc ) 
     82      IF( sbc_ice_alloc > 0 )   CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed') 
     83   END FUNCTION sbc_ice_alloc 
    5684 
    5785#else 
     
    6492#endif 
    6593 
    66    !!---------------------------------------------------------------------- 
    67    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    68    !! $Id$  
    69    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    7094   !!====================================================================== 
    7195END MODULE sbc_ice 
Note: See TracChangeset for help on using the changeset viewer.