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 2636 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/thd_ice_2.F90 – NEMO

Ignore:
Timestamp:
2011-03-01T20:04:06+01:00 (13 years ago)
Author:
gm
Message:

dynamic mem: #785 ; move ctl_stop & warn in lib_mpp to avoid a circular dependency + ctl_stop improvment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/LIM_SRC_2/thd_ice_2.F90

    r2590 r2636  
    1212   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    1313   !!---------------------------------------------------------------------- 
    14    !! * Modules used 
    1514   USE par_ice_2 
    1615 
     
    8584      tbif_1d              !: corresponding to the 2D var  tbif 
    8685 
    87    !!====================================================================== 
     86   !!---------------------------------------------------------------------- 
     87   !! NEMO/LIM2 3.3 , UCL - NEMO Consortium (2010) 
     88   !! $Id$ 
     89   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     90   !!---------------------------------------------------------------------- 
    8891 CONTAINS 
    8992 
    90    FUNCTION thd_ice_alloc_2() 
    91       USE in_out_manager, ONLY: ctl_warn 
    92       IMPLICIT none 
    93       INTEGER :: thd_ice_alloc_2 
    94       ! Local vars 
     93   INTEGER FUNCTION thd_ice_alloc_2() 
     94      !!---------------------------------------------------------------------- 
     95      USE lib_mpp        ! MPP library 
    9596      INTEGER :: ierr(4) 
    96  
     97      !!---------------------------------------------------------------------- 
     98      ! 
    9799      ierr(:) = 0 
    98  
    99       ALLOCATE(npb(jpij), npac(jpij),                             & 
    100                qldif_1d(jpij), qcmif_1d(jpij), thcm_1d(jpij),     & 
    101                fstbif_1d(jpij), fltbif_1d(jpij), fscbq_1d(jpij),  & 
    102                qsr_ice_1d(jpij),fr1_i0_1d(jpij), fr2_i0_1d(jpij), Stat=ierr(1)) 
    103  
    104       ALLOCATE(qns_ice_1d(jpij), qfvbq_1d(jpij), sist_1d(jpij), tfu_1d(jpij), & 
    105                sprecip_1d(jpij), h_snow_1d(jpij),h_ice_1d(jpij),frld_1d(jpij),& 
    106                qstbif_1d(jpij),  fbif_1d(jpij),  Stat=ierr(2)) 
    107  
    108       ALLOCATE(rdmicif_1d(jpij), rdmsnif_1d(jpij), qlbbq_1d(jpij),   & 
    109                dmgwi_1d(jpij)  , dvsbq_1d(jpij)  , rdvomif_1d(jpij), & 
    110                dvbbq_1d(jpij)  , dvlbq_1d(jpij)  , dvnbq_1d(jpij)  , & 
    111                Stat=ierr(3)) 
    112  
    113       ALLOCATE(dqns_ice_1d(jpij) ,qla_ice_1d(jpij), dqla_ice_1d(jpij), & 
    114                tbif_1d(jpij, jplayersp1), Stat=ierr(4)) 
    115  
     100      ! 
     101      ALLOCATE( npb(jpij), npac(jpij),                             & 
     102         &      qldif_1d(jpij), qcmif_1d(jpij), thcm_1d(jpij),     & 
     103         &      fstbif_1d(jpij), fltbif_1d(jpij), fscbq_1d(jpij),  & 
     104         &      qsr_ice_1d(jpij),fr1_i0_1d(jpij), fr2_i0_1d(jpij), Stat=ierr(1)) 
     105         ! 
     106      ALLOCATE( qns_ice_1d(jpij), qfvbq_1d(jpij), sist_1d(jpij), tfu_1d(jpij), & 
     107         &      sprecip_1d(jpij), h_snow_1d(jpij),h_ice_1d(jpij),frld_1d(jpij),& 
     108         &      qstbif_1d(jpij),  fbif_1d(jpij),  Stat=ierr(2)) 
     109         ! 
     110      ALLOCATE( rdmicif_1d(jpij), rdmsnif_1d(jpij), qlbbq_1d(jpij),   & 
     111         &      dmgwi_1d(jpij)  , dvsbq_1d(jpij)  , rdvomif_1d(jpij), & 
     112         &      dvbbq_1d(jpij)  , dvlbq_1d(jpij)  , dvnbq_1d(jpij)  , & 
     113         &      Stat=ierr(3)) 
     114         ! 
     115      ALLOCATE( dqns_ice_1d(jpij) ,qla_ice_1d(jpij), dqla_ice_1d(jpij), & 
     116         &      tbif_1d(jpij, jplayersp1), Stat=ierr(4)) 
     117         ! 
    116118      thd_ice_alloc_2 = MAXVAL(ierr) 
    117  
    118       IF(thd_ice_alloc_2 /= 0)THEN 
    119          CALL ctl_warn('thd_ice_alloc_2: failed to allocate arrays.') 
    120       END IF 
    121  
     119      IF( thd_ice_alloc_2 /= 0 )   CALL ctl_warn('thd_ice_alloc_2: failed to allocate arrays') 
     120      ! 
    122121   END FUNCTION thd_ice_alloc_2 
    123122 
    124123#endif 
     124   !!====================================================================== 
    125125END MODULE thd_ice_2 
Note: See TracChangeset for help on using the changeset viewer.