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 2682 for branches – NEMO

Changeset 2682 for branches


Ignore:
Timestamp:
2011-03-10T18:22:51+01:00 (13 years ago)
Author:
trackstand2
Message:

key_bdy bug fix. Made arrays allocatable and added _alloc() routine plus call

Location:
branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/BDY
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90

    r2528 r2682  
    3535   PUBLIC   bdy_dta_frs      ! routines called by step.F90 
    3636   PUBLIC   bdy_dta_fla  
     37   PUBLIC   bdy_dta_alloc    ! routine called by bdy_init.F90 
    3738 
    3839   INTEGER ::   numbdyt, numbdyu, numbdyv                      ! logical units for T-, U-, & V-points data file, resp. 
     
    4748   REAL(wp) ::  zoffset                                        ! time offset between time origin in file & start time of model run 
    4849 
    49    REAL(wp), DIMENSION(jpbdim,jpk,2) ::   tbdydta, sbdydta     ! time interpolated values of T and S bdy data    
    50    REAL(wp), DIMENSION(jpbdim,jpk,2) ::   ubdydta, vbdydta     ! time interpolated values of U and V bdy data  
     50   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tbdydta, sbdydta   ! time interpolated values of T and S bdy data    
     51   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ubdydta, vbdydta   ! time interpolated values of U and V bdy data  
    5152   REAL(wp), DIMENSION(jpbdim,2)     ::   ubtbdydta, vbtbdydta ! Arrays used for time interpolation of bdy data    
    5253   REAL(wp), DIMENSION(jpbdim,2)     ::   sshbdydta            ! bdy data of ssh 
     
    6465   !!---------------------------------------------------------------------- 
    6566CONTAINS 
     67 
     68  FUNCTION bdy_dta_alloc() 
     69     !!---------------------------------------------------------------------- 
     70     USE lib_mpp, ONLY: ctl_warn, mpp_sum 
     71     ! 
     72     INTEGER :: bdy_dta_alloc 
     73     !!---------------------------------------------------------------------- 
     74     ! 
     75     ALLOCATE(tbdydta(jpbdim,jpk,2), sbdydta(jpbdim,jpk,2), & 
     76              ubdydta(jpbdim,jpk,2), vbdydta(jpbdim,jpk,2), Stat=bdy_dta_alloc) 
     77 
     78     IF( lk_mpp           ) CALL mpp_sum ( bdy_dta_alloc ) 
     79     IF(bdy_dta_alloc /= 0) CALL ctl_warn('bdy_dta_alloc: failed to allocate arrays') 
     80 
     81   END FUNCTION bdy_dta_alloc 
     82 
    6683 
    6784   SUBROUTINE bdy_dta_frs( kt ) 
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90

    r2613 r2682  
    2121   USE obc_par         ! ocean open boundary conditions 
    2222   USE bdy_oce         ! unstructured open boundary conditions 
     23   USE bdydta, ONLY: bdy_dta_alloc ! open boundary data 
    2324   USE bdytides        ! tides at open boundaries initialization (tide_init routine) 
    2425   USE in_out_manager  ! I/O units 
     
    7576      ! 
    7677      !                                      ! allocate bdy_oce arrays 
    77       IF( bdy_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'bdy_init : unable to allocate arrays' ) 
     78      IF( bdy_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'bdy_init : unable to allocate oce arrays' ) 
     79      IF( bdy_dta_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'bdy_init : unable to allocate dta arrays' ) 
    7880 
    7981      IF( jperio /= 0 )   CALL ctl_stop( 'Cyclic or symmetric,',   & 
Note: See TracChangeset for help on using the changeset viewer.