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 6650 – NEMO

Changeset 6650


Ignore:
Timestamp:
2016-06-01T14:38:10+02:00 (8 years ago)
Author:
kingr
Message:

Altered code committed at last revision. Now uses IOM module function to check for surft increment to decide on apllying 2D or 3D increments. Previous code did not work for 2D case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_v3.4_asm_nemovar_community/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r6646 r6650  
    3636   USE in_out_manager   ! I/O manager 
    3737   USE lib_mpp          ! MPP library 
    38    USE netcdf           ! netcdf library 
    3938#if defined key_lim2 
    4039   USE ice_2            ! LIM2 
     
    139138      INTEGER :: iitiaustr_date  ! Date YYYYMMDD of IAU interval start time step 
    140139      INTEGER :: iitiaufin_date  ! Date YYYYMMDD of IAU interval final time step 
    141       INTEGER :: idumvar         ! Local dummy integer 
    142140      INTEGER :: isurfstat       ! Local integer for status of reading surft variable 
    143141      ! 
     
    433431             
    434432            !Test if the increments file contains the surft variable. 
    435             isurfstat = nf90_inq_varid( inum, 'bckinsurft', idumvar ) 
    436             IF ( isurfstat == 0 ) THEN 
     433            isurfstat = iom_varid( inum, 'bckinsurft', ldstop = .FALSE. ) 
     434            IF ( isurfstat == -1 ) THEN 
     435               lk_surft = .FALSE. 
     436            ELSE 
    437437               lk_surft = .TRUE. 
    438             ELSE 
    439                lk_surft = .FALSE. 
    440438            ENDIF              
    441439 
Note: See TracChangeset for help on using the changeset viewer.