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 13557 for NEMO/trunk/src/OCE/IOM/iom.F90 – NEMO

Ignore:
Timestamp:
2020-10-02T17:19:04+02:00 (4 years ago)
Author:
smasson
Message:

trunk fix diaprt gugs, see #2532

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/IOM/iom.F90

    r13472 r13557  
    123123      REAL(wp), DIMENSION(2,jpkam1)         :: za_bnds   ! ABL vertical boundaries 
    124124      LOGICAL ::   ll_closedef = .TRUE. 
     125      LOGICAL ::   ll_exist 
    125126      !!---------------------------------------------------------------------- 
    126127      ! 
     
    230231          CALL iom_set_axis_attr( "ghw_abl", bounds=za_bnds ) 
    231232 
    232           CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,jpnfl) /) ) 
     233          CALL iom_set_axis_attr(  "nfloat", (/ (REAL(ji,wp), ji=1,jpnfl) /) ) 
    233234# if defined key_si3 
    234235          CALL iom_set_axis_attr( "ncatice", (/ (REAL(ji,wp), ji=1,jpl) /) ) 
     
    243244          CALL iom_set_axis_attr( "iax_26C", (/ REAL(26,wp) /) )   ! strange syntaxe and idea... 
    244245          CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) )   ! strange syntaxe and idea... 
    245           CALL iom_set_axis_attr( "basin"  , (/ (REAL(ji,wp), ji=1,5) /) ) 
     246          ! for diaprt, we need to define an axis which size can be 1 (default) or 5 (if the file subbasins.nc exists) 
     247          INQUIRE( FILE = 'subbasins.nc', EXIST = ll_exist ) 
     248          nbasin = 1 + 4 * COUNT( (/ll_exist/) ) 
     249          CALL iom_set_axis_attr( "basin"  , (/ (REAL(ji,wp), ji=1,nbasin) /) ) 
    246250      ENDIF 
    247251      ! 
Note: See TracChangeset for help on using the changeset viewer.