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 12311 for NEMO/branches – NEMO

Changeset 12311 for NEMO/branches


Ignore:
Timestamp:
2020-01-14T11:18:59+01:00 (4 years ago)
Author:
cguiavarch
Message:

Corrected reversion in tramle.F90 whereby ikmax set too late

Location:
NEMO/branches/UKMO/NEMO_4.0_FKOSM/src/OCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/src/OCE/TRA/tramle.F90

    r12245 r12311  
    2121   USE lbclnk         ! lateral boundary condition / mpp link 
    2222 
     23   ! where OSMOSIS_OBL is used with integrated FK 
     24   USE zdf_oce, ONLY : ln_zdfosm 
    2325   USE zdfosm, ONLY  : ln_osm_mle, hmle, dbdx_mle, dbdy_mle, mld_prof 
    2426 
     
    9799    ! 
    98100    ! 
    99     IF(ln_osm_mle) THEN 
     101    IF(ln_osm_mle.and.ln_zdfosm) THEN 
    100102       ikmax = MIN( MAXVAL( mld_prof(:,:) ), jpkm1 )                  ! max level of the computation 
    101103       ! 
     
    151153    ELSE !do not use osn_mle 
    152154       !                                      !==  MLD used for MLE  ==! 
    153        !                                                ! convert density into buoyancy 
     155       !                                                ! compute from the 10m density to deal with the diurnal cycle 
    154156       inml_mle(:,:) = mbkt(:,:) + 1                    ! init. to number of ocean w-level (T-level + 1) 
    155157       IF ( nla10 > 0 ) THEN                            ! avoid case where first level is thicker than 10m 
     
    162164          END DO 
    163165       ENDIF 
     166       ikmax = MIN( MAXVAL( inml_mle(:,:) ), jpkm1 )                  ! max level of the computation 
    164167 
    165168       ! 
     
    203206       END SELECT 
    204207       !                                                ! convert density into buoyancy 
    205        ikmax = MIN( MAXVAL( inml_mle(:,:) ), jpkm1 )                  ! max level of the computation 
    206208       zbm(:,:) = + grav * zbm(:,:) / MAX( e3t_n(:,:,1), zmld(:,:) ) 
    207209       ! 
     
    294296    IF( cdtype == 'TRA') THEN              !==  outputs  ==! 
    295297       ! 
    296        IF (ln_osm_mle) THEN 
     298       IF (ln_osm_mle.and.ln_zdfosm) THEN 
    297299          zLf_NH(:,:) = SQRT( rb_c * hmle(:,:) ) * r1_ft(:,:)      ! Lf = N H / f 
    298300       ELSE 
     
    352354         WRITE(numout,*) '         Density difference used to define ML for FK              rn_rho_c_mle  = ', rn_rho_c_mle 
    353355      ENDIF 
    354  
    355  
    356       IF( ln_osm_mle .AND. ln_mle ) THEN 
    357          WRITE(numout,*) 'WARNING: You are running with both OSM-FK and default FK' 
    358          ! CALL ctl_stop('STOP in zdf_osm_init: Cannot run with both OSM-FK and default FK') 
    359      END IF 
    360  
    361      IF(lwp) THEN 
     356      ! 
     357      IF(lwp) THEN 
    362358         WRITE(numout,*) 
    363359         IF( ln_mle ) THEN 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/src/OCE/ZDF/zdfosm.F90

    r12266 r12311  
    22432243     IF( TRIM(cdrw) == 'WRITE') THEN     !* Write hbli into the restart file, then return 
    22442244        IF(lwp) WRITE(numout,*) '---- osm-rst ----' 
    2245          CALL iom_rstput( kt, nitrst, numrow, 'wn'     , wn  , ldxios = lwxios ) 
    2246          CALL iom_rstput( kt, nitrst, numrow, 'hbl'    , hbl , ldxios = lwxios ) 
    2247          CALL iom_rstput( kt, nitrst, numrow, 'dh'     , dh, ldxios = lwxios ) 
     2245         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     2246            CALL iom_rstput( kt, nitrst, numrow, 'wn'     , wn  , ldxios = lwxios ) 
     2247            CALL iom_rstput( kt, nitrst, numrow, 'hbl'    , hbl , ldxios = lwxios ) 
     2248            CALL iom_rstput( kt, nitrst, numrow, 'dh'     , dh, ldxios = lwxios ) 
     2249         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    22482250        RETURN 
    22492251     END IF 
Note: See TracChangeset for help on using the changeset viewer.