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/sbcapr.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/sbcapr.F90

    r2528 r2715  
    1919   USE in_out_manager  ! I/O manager 
    2020   USE lib_fortran     ! distribued memory computing library 
    21    USE iom 
    22    USE restart 
     21   USE iom             ! IOM library 
     22   USE lib_mpp         ! MPP library 
     23   USE restart         ! ocean restart 
    2324 
    2425   IMPLICIT NONE 
     
    3233   LOGICAL, PUBLIC ::   ln_ref_apr = .FALSE.  !: ref. pressure: global mean Patm (F) or a constant (F) 
    3334 
    34    REAL(wp), ALLOCATABLE, PUBLIC, DIMENSION(:,:) ::   ssh_ib    ! Inverse barometer now    sea surface height     [m] 
    35    REAL(wp), ALLOCATABLE, PUBLIC, DIMENSION(:,:) ::   ssh_ibb   ! Inverse barometer before sea surface height     [m] 
    36    REAL(wp), ALLOCATABLE, PUBLIC, DIMENSION(:,:) ::   apr       ! atmospheric pressure at kt                   [N/m2] 
     35   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   ssh_ib    ! Inverse barometer now    sea surface height   [m] 
     36   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   ssh_ibb   ! Inverse barometer before sea surface height   [m] 
     37   REAL(wp), ALLOCATABLE, SAVE, PUBLIC, DIMENSION(:,:) ::   apr       ! atmospheric pressure at kt                 [N/m2] 
    3738    
    3839   REAL(wp) ::   rpref = 101000._wp   ! reference atmospheric pressure          [N/m2] 
    3940   REAL(wp) ::   tarea                ! whole domain mean masked ocean surface 
    4041   REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rau0) 
    41  
    4242    
    43    TYPE(FLD), ALLOCATABLE, DIMENSION(:)   ::   sf_apr   ! structure of input fields (file informations, fields read) 
     43   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_apr   ! structure of input fields (file informations, fields read) 
    4444 
    4545   !! * Substitutions 
    4646#  include "domzgr_substitute.h90" 
    4747   !!---------------------------------------------------------------------- 
    48    !! NEMO/OPA 3.3 , NEMO Consortium (2010)  
    49    !! $Id $ 
    50    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     48   !! NEMO/OPA 4.0 , NEMO Consortium (2011)  
     49   !! $Id: $ 
     50   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    5151   !!---------------------------------------------------------------------- 
    5252CONTAINS 
     
    9191         ! 
    9292         ALLOCATE( sf_apr(1), STAT=ierror )           !* allocate and fill sf_sst (forcing structure) with sn_sst 
    93          IF( ierror > 0 ) THEN 
    94             CALL ctl_stop( 'sbc_apr: unable to allocate sf_apr structure' )   ;   RETURN 
    95          ENDIF 
     93         IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_apr: unable to allocate sf_apr structure' ) 
     94         ! 
    9695         CALL fld_fill( sf_apr, (/ sn_apr /), cn_dir, 'sbc_apr', 'Atmospheric pressure ', 'namsbc_apr' ) 
    9796                                ALLOCATE( sf_apr(1)%fnow(jpi,jpj,1)   ) 
Note: See TracChangeset for help on using the changeset viewer.