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 12459 for NEMO/trunk – NEMO

Changeset 12459 for NEMO/trunk


Ignore:
Timestamp:
2020-02-25T17:14:19+01:00 (4 years ago)
Author:
smasson
Message:

trunk: fix uninitialized variable in sbcblk, see #2387

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/SBC/sbcblk.F90

    r12377 r12459  
    259259      IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_blk_init: unable to allocate sf structure' ) 
    260260      ! 
     261      !                                      !- fill the bulk structure with namelist informations 
     262      CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_init', 'surface boundary condition -- bulk formulae', 'namsbc_blk' ) 
     263      ! 
    261264      DO jfpr= 1, jpfld 
    262265         ! 
     
    269272               &      jfpr == jp_hpgi .OR. jfpr == jp_hpgj .OR. jfpr == jp_tair     )  ) THEN   ! ABL: some fields are 3D input 
    270273               ALLOCATE( sf(jfpr)%fnow(jpi,jpj,jpka) ) 
    271                IF( slf_i(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,jpka,2) ) 
     274               IF( sf(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,jpka,2) ) 
    272275            ELSE                                                                                ! others or Bulk fields are 2D fiels 
    273276               ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 
    274                IF( slf_i(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,1,2) ) 
     277               IF( sf(jfpr)%ln_tint )   ALLOCATE( sf(jfpr)%fdta(jpi,jpj,1,2) ) 
    275278            ENDIF 
    276279            ! 
    277             IF( slf_i(jfpr)%freqh > 0. .AND. MOD( NINT(3600. * slf_i(jfpr)%freqh), nn_fsbc * NINT(rdt) ) /= 0 )   & 
     280            IF( sf(jfpr)%freqh > 0. .AND. MOD( NINT(3600. * sf(jfpr)%freqh), nn_fsbc * NINT(rdt) ) /= 0 )   & 
    278281               &  CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rdt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.',   & 
    279282               &                 '               This is not ideal. You should consider changing either rdt or nn_fsbc value...' ) 
    280283         ENDIF 
    281284      END DO 
    282       !                                      !- fill the bulk structure with namelist informations 
    283       CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_init', 'surface boundary condition -- bulk formulae', 'namsbc_blk' ) 
    284285      ! 
    285286      IF( ln_wave ) THEN 
Note: See TracChangeset for help on using the changeset viewer.