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/TOP_SRC/PISCES/p4zint.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/TOP_SRC/PISCES/p4zint.F90

    r2528 r2715  
    2121 
    2222   PUBLIC   p4z_int   
     23   PUBLIC   p4z_int_alloc 
    2324 
    24    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) ::   &   !: 
    25       tgfunc,            &  !:  Temp. dependancy of various biological rates 
    26       tgfunc2               !:  Temp. dependancy of mesozooplankton rates  
     25   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc    !: Temp. dependancy of various biological rates 
     26   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tgfunc2   !: Temp. dependancy of mesozooplankton rates 
    2727 
    28    !! * Module variables 
    29    REAL(wp) :: & 
    30       xksilim = 16.5E-6        ! Half-saturation constant for the computation of the Si half-saturation constant 
    31  
     28   REAL(wp) ::   xksilim = 16.5e-6_wp   ! Half-saturation constant for the Si half-saturation constant computation 
    3229 
    3330   !!---------------------------------------------------------------------- 
    3431   !! NEMO/TOP 3.3 , NEMO Consortium (2010) 
    3532   !! $Id$  
    36    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     33   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3734   !!---------------------------------------------------------------------- 
    38  
    3935CONTAINS 
    4036 
     
    4743      !! ** Method  : - ??? 
    4844      !!--------------------------------------------------------------------- 
    49       !! 
    5045      INTEGER  ::   ji, jj 
    5146      REAL(wp) ::   zdum 
     
    5449      ! Computation of phyto and zoo metabolic rate 
    5550      ! ------------------------------------------- 
    56  
    5751      tgfunc (:,:,:) = EXP( 0.063913 * tsn(:,:,:,jp_tem) ) 
    5852      tgfunc2(:,:,:) = EXP( 0.07608  * tsn(:,:,:,jp_tem) ) 
     
    6155      ! constant for silica uptake 
    6256      ! --------------------------------------------------- 
    63  
    6457      DO ji = 1, jpi 
    6558         DO jj = 1, jpj 
     
    6861         END DO 
    6962      END DO 
    70  
     63      ! 
    7164      IF( nday_year == nyear_len(1) ) THEN 
    7265         xksi    = xksimax 
    73          xksimax = 0.e0 
     66         xksimax = 0._wp 
    7467      ENDIF 
    7568      ! 
    7669   END SUBROUTINE p4z_int 
     70 
     71 
     72   INTEGER FUNCTION p4z_int_alloc() 
     73      !!---------------------------------------------------------------------- 
     74      !!                     ***  ROUTINE p4z_int_alloc  *** 
     75      !!---------------------------------------------------------------------- 
     76      ALLOCATE( tgfunc(jpi,jpj,jpk), tgfunc2(jpi,jpj,jpk), STAT=p4z_int_alloc ) 
     77      ! 
     78      IF( p4z_int_alloc /= 0 )   CALL ctl_warn('p4z_int_alloc : failed to allocate arrays.') 
     79      ! 
     80   END FUNCTION p4z_int_alloc 
    7781 
    7882#else 
Note: See TracChangeset for help on using the changeset viewer.