Ignore:
Timestamp:
2017-09-13T18:46:56+02:00 (3 years ago)
Author:
clem
Message:

changes in style - part6 - commits of the day

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/icedia.F90

    r8514 r8518  
    4545   !!---------------------------------------------------------------------- 
    4646CONTAINS 
     47 
     48   INTEGER FUNCTION ice_dia_alloc() 
     49      !!---------------------------------------------------------------------! 
     50      !!                ***  ROUTINE ice_rdgrft_alloc *** 
     51      !!---------------------------------------------------------------------! 
     52      ALLOCATE( vol_loc_ini(jpi,jpj), sal_loc_ini(jpi,jpj), tem_loc_ini(jpi,jpj), STAT=ice_dia_alloc ) 
     53 
     54      IF( lk_mpp             )   CALL mpp_sum ( ice_dia_alloc ) 
     55      IF( ice_dia_alloc /= 0 )   CALL ctl_warn( 'ice_dia_alloc: failed to allocate arrays' ) 
     56      ! 
     57   END FUNCTION ice_dia_alloc 
    4758 
    4859   SUBROUTINE ice_dia( kt ) 
     
    188199      !       
    189200      IF( ln_icediahsb ) THEN 
    190          ALLOCATE( vol_loc_ini(jpi,jpj), sal_loc_ini(jpi,jpj), tem_loc_ini(jpi,jpj), STAT=ierror ) 
    191          IF( ierror > 0 )  THEN 
    192             CALL ctl_stop( 'ice_dia: unable to allocate vol_loc_ini' ) 
    193             RETURN 
    194          ENDIF 
    195          ! 
    196          CALL ice_dia_rst( 'READ' )  !* read or initialize all required files 
     201         IF( ice_dia_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'ice_dia_init : unable to allocate arrays' )   ! allocate tke arrays 
     202         CALL ice_dia_rst( 'READ' )   ! read or initialize all required files 
    197203      ENDIF 
    198204      ! 
     
    220226            CALL iom_get( numrir, 'kt_ice' , ziter ) 
    221227            IF(lwp) WRITE(numout,*) 
    222             IF(lwp) WRITE(numout,*) ' ice_dia_rst read at time step = ', ziter 
    223             IF(lwp) WRITE(numout,*) '~~~~~~~' 
     228            IF(lwp) WRITE(numout,*) 'ice_dia_rst read at time step = ', ziter 
     229            IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 
    224230            CALL iom_get( numrir, 'frc_voltop' , frc_voltop  ) 
    225231            CALL iom_get( numrir, 'frc_volbot' , frc_volbot  ) 
     
    252258         IF( iter == nitrst ) THEN 
    253259            IF(lwp) WRITE(numout,*) 
    254             IF(lwp) WRITE(numout,*) ' ice_dia_rst write at time step = ', kt 
    255             IF(lwp) WRITE(numout,*) '~~~~~~~' 
     260            IF(lwp) WRITE(numout,*) 'ice_dia_rst write at time step = ', kt 
     261            IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    256262         ENDIF 
    257263         ! 
Note: See TracChangeset for help on using the changeset viewer.