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

Changeset 6646


Ignore:
Timestamp:
2016-05-31T15:53:49+02:00 (8 years ago)
Author:
mattmartin
Message:

Committing change to branch to check whether the increments file has the "surft" increment variable, and if it does then to only apply those ones, and if not then to go through the normal increments application code in NEMO.

File:
1 edited

Legend:

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

    r6630 r6646  
    3636   USE in_out_manager   ! I/O manager 
    3737   USE lib_mpp          ! MPP library 
     38   USE netcdf           ! netcdf library 
    3839#if defined key_lim2 
    3940   USE ice_2            ! LIM2 
     
    138139      INTEGER :: iitiaustr_date  ! Date YYYYMMDD of IAU interval start time step 
    139140      INTEGER :: iitiaufin_date  ! Date YYYYMMDD of IAU interval final time step 
     141      INTEGER :: idumvar         ! Local dummy integer 
     142      INTEGER :: isurfstat       ! Local integer for status of reading surft variable 
    140143      ! 
    141144      REAL(wp) :: znorm        ! Normalization factor for IAU weights 
     
    153156           
    154157      REAL(wp), POINTER, DIMENSION(:,:) ::   hdiv   ! 2D workspace 
     158      ! 
     159      LOGICAL :: lk_surft      ! Logical: T => Increments file contains surft variable  
     160                               !               so only apply surft increments. 
    155161      !! 
    156162      NAMELIST/nam_asminc/ ln_bkgwri,                                      & 
     
    426432         IF ( ln_trainc ) THEN    
    427433             
    428             IF (ln_sco) THEN  
     434            !Test if the increments file contains the surft variable. 
     435            isurfstat = nf90_inq_varid( inum, 'bckinsurft', idumvar ) 
     436            IF ( isurfstat == 0 ) THEN 
     437               lk_surft = .TRUE. 
     438            ELSE 
     439               lk_surft = .FALSE. 
     440            ENDIF              
     441 
     442            IF (lk_surft) THEN  
    429443                 
    430444               ALLOCATE(z_mld(jpi,jpj))  
Note: See TracChangeset for help on using the changeset viewer.