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

Changeset 12322 for NEMO/branches


Ignore:
Timestamp:
2020-01-15T10:33:19+01:00 (4 years ago)
Author:
cguiavarch
Message:

Update with George's latest changes for restartability and reproducibility

Location:
NEMO/branches/UKMO/NEMO_4.0_FKOSM
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/cfgs/GYRE_PISCES/EXPREF/namelist_cfg

    r10072 r12322  
    142142      rn_Ld        = 100.e+3        !  lateral diffusive length   [m] 
    143143/ 
     144!----------------------------------------------------------------------- 
     145&namtra_mle    !   mixed layer eddy parametrisation (Fox-Kemper)       (default: OFF) 
     146!----------------------------------------------------------------------- 
     147/ 
    144148!!====================================================================== 
    145149!!                      ***  Dynamics namelists  ***                  !! 
     
    212216!----------------------------------------------------------------------- 
    213217   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves 
     218/ 
     219!----------------------------------------------------------------------- 
     220&namzdf_osm    !   OSM vertical diffusion                               (ln_zdfosm =T) 
     221!----------------------------------------------------------------------- 
     222/ 
     223!----------------------------------------------------------------------- 
     224&namosm_mle    !   mixed layer eddy parametrisation (Fox-Kemper)       (default: OFF) 
     225!----------------------------------------------------------------------- 
    214226/ 
    215227!!====================================================================== 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg

    r10779 r12322  
    135135/ 
    136136!----------------------------------------------------------------------- 
     137&namtra_mle    !   mixed layer eddy parametrisation (Fox-Kemper)       (default: OFF) 
     138!----------------------------------------------------------------------- 
     139/ 
     140!----------------------------------------------------------------------- 
    137141&namsbc_ssr    !   surface boundary condition : sea surface restoring   (ln_ssr =T) 
    138142!----------------------------------------------------------------------- 
     
    377381/ 
    378382!----------------------------------------------------------------------- 
     383&namzdf_osm    !   OSM vertical diffusion                               (ln_zdfosm =T) 
     384!----------------------------------------------------------------------- 
     385/ 
     386!----------------------------------------------------------------------- 
     387&namosm_mle    !   mixed layer eddy parametrisation (Fox-Kemper)       (default: OFF) 
     388!----------------------------------------------------------------------- 
     389/ 
     390!----------------------------------------------------------------------- 
    379391&namzdf_iwm    !    internal wave-driven mixing parameterization        (ln_zdfiwm =T) 
    380392!----------------------------------------------------------------------- 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/cfgs/SHARED/field_def_nemo-oce.xml

    r12245 r12322  
    300300          <field id="emp_oce"      long_name="Evap minus Precip over ocean"         standard_name="evap_minus_precip_over_sea_water"                                     unit="kg/m2/s"   /> 
    301301          <field id="emp_ice"      long_name="Evap minus Precip over ice"           standard_name="evap_minus_precip_over_sea_ice"                                       unit="kg/m2/s"   /> 
    302           <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="1e-3/m2/s" /> 
    303           <field id="fmmflx"       long_name="Water flux due to freezing/melting"                                                                                        unit="kg/m2/s"   /> 
     302          <field id="saltflx"      long_name="Total downward salinity flux"             standard_name="total_downward_salinity_flux"                                   unit="1e-3/m2/s" /> 
     303          <field id="fmmflx"       long_name="Water flux due to freezing/melting"     standard_name="water_flux_due_to_freezing/melting"                  unit="kg/m2/s"   /> 
    304304          <field id="snowpre"      long_name="Snow precipitation"                   standard_name="snowfall_flux"                                                        unit="kg/m2/s"   /> 
    305305          <field id="runoffs"      long_name="River Runoffs"                        standard_name="water_flux_into_sea_water_from_rivers"                                unit="kg/m2/s"   /> 
     
    776776 
    777777          <!-- ln_zdfosm=T only (OSMOSIS-OBL) --> 
    778      <field id="ttrd_osm"      long_name="temperature-trend: OSM-OSBL non-local forcing"                             unit="degC/s * m" >  ttrd_osm * e3t </field> 
    779      <field id="strd_osm"      long_name="salinity   -trend: OSM-OSBL non-local forcing"                             unit="1e-3/s * m" >  strd_osm * e3t </field> 
     778     <field id="ttrd_osm_e3t"      long_name="temperature-trend: OSM-OSBL non-local forcing"                             unit="degC/s * m" >  ttrd_osm * e3t </field> 
     779     <field id="strd_osm_e3t"      long_name="salinity   -trend: OSM-OSBL non-local forcing"                             unit="1e-3/s * m" >  strd_osm * e3t </field> 
    780780      
    781781     <!-- --> 
     
    787787     <field id="strd_npc_e3t"      unit="1e-3/s * m"  >  strd_npc * e3t </field> 
    788788     <field id="ttrd_qns_e3t"      unit="degC/s * m"  >  ttrd_qns * e3t_surf </field> 
    789      <field id="strd_cdt_e3t"      unit="degC/s * m"  >  strd_cdt * e3t_surf </field> 
     789     <!-- <field id="strd_cdt_e3t"      unit="degC/s * m"  >  strd_cdt * e3t_surf </field> --> 
    790790     <field id="ttrd_qsr_e3t"      unit="degC/s * m"  >  ttrd_qsr * e3t </field> 
    791791     <field id="ttrd_bbc_e3t"      unit="degC/s * m"  >  ttrd_bbc * e3t </field> 
    792792 
    793793     <!-- OMIP  layer-integrated trends --> 
     794     <field id="sfd"      long_name="Total downward salt flux"                                                     unit="kg/(m^2 s)" > saltflux * 1026.0 * 0.001 </field> 
     795     <field id="wfo"      long_name="Total downward FW mass flux"                                                   unit="kg/(m^2 s)" > -empmr </field> 
     796 
    794797     <field id="ttrd_totad_li"    long_name="layer integrated heat-trend: total advection"         unit="W/m^2"     > ttrd_totad_e3t * 1026.0 * 3991.86795711963 </field> 
    795798     <field id="strd_totad_li"    long_name="layer integrated salt-trend: total advection"         unit="kg/(m^2 s)"    > strd_totad_e3t * 1026.0 * 0.001  </field> 
     799     <field id="ttrd_osm_li"    long_name="layer integrated heat-trend: non-local OSM"         unit="W/m^2"     > ttrd_osm_e3t * 1026.0 * 3991.86795711963 </field> 
     800     <field id="strd_osm_li"    long_name="layer integrated salt-trend: non-local OSM"         unit="kg/(m^2 s)"    > strd_osm_e3t * 1026.0 * 0.001  </field> 
    796801     <field id="ttrd_evd_li"      long_name="layer integrated heat-trend: EVD convection"          unit="W/m^2"    > ttrd_evd_e3t * 1026.0 * 3991.86795711963 </field> 
    797802     <field id="strd_evd_li"      long_name="layer integrated salt-trend: EVD convection"          unit="kg/(m^2 s)"  > strd_evd_e3t * 1026.0 * 0.001  </field> 
     803     <field id="ttrd_npc_li"      long_name="layer integrated heat-trend: NPC convection"          unit="W/m^2"    > ttrd_npc_e3t * 1026.0 * 3991.86795711963 </field> 
     804     <field id="strd_npc_li"      long_name="layer integrated salt-trend: NPC convection"          unit="kg/(m^2 s)"  > strd_npc_e3t * 1026.0 * 0.001  </field> 
    798805     <field id="ttrd_iso_li"      long_name="layer integrated heat-trend: isopycnal diffusion"     unit="W/m^2" > ttrd_iso_e3t * 1026.0 * 3991.86795711963 </field> 
    799806     <field id="strd_iso_li"      long_name="layer integrated salt-trend: isopycnal diffusion"     unit="kg/(m^2 s)" > strd_iso_e3t * 1026.0 * 0.001  </field> 
     
    802809     <field id="ttrd_qns_li"      long_name="layer integrated heat-trend: non-solar flux + runoff" unit="W/m^2" grid_ref="grid_T_2D"> ttrd_qns_e3t * 1026.0 * 3991.86795711963 </field> 
    803810     <field id="ttrd_qsr_li"      long_name="layer integrated heat-trend: solar flux"              unit="W/m^2"  grid_ref="grid_T_3D"> ttrd_qsr_e3t * 1026.0 * 3991.86795711963 </field> 
     811     <field id="ttrd_bbc_li"      long_name="layer integrated heat-trend: geothermal heating "  unit="W/m^2" > ttrd_bbc_e3t * 1026.0 * 3991.86795711963 </field> 
    804812     <field id="ttrd_bbl_li"      long_name="layer integrated heat-trend: bottom boundary layer "  unit="W/m^2" > ttrd_bbl_e3t * 1026.0 * 3991.86795711963 </field> 
    805813     <field id="strd_bbl_li"      long_name="layer integrated salt-trend: bottom boundary layer "  unit="kg/(m^2 s)" > strd_bbl_e3t * 1026.0 * 0.001  </field> 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/cfgs/SHARED/grid_def_nemo.xml

    r12245 r12322  
    128128         <axis axis_ref="depthw" /> 
    129129       </grid> 
    130     </grid_definition> 
     130        <!--  --> 
     131       <grid id="grid_T_SFC"> 
     132         <domain domain_ref="grid_T" /> 
     133         <scalar> 
     134           <extract_axis position="0" /> 
     135         </scalar> 
     136       </grid> 
     137     </grid_definition> 
    131138 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/cfgs/SHARED/namelist_ref

    r12245 r12322  
    253253   ln_COARE_3p5 = .false.   ! "COARE 3.5" algorithm   (Edson et al. 2013) 
    254254   ln_ECMWF    = .false.   ! "ECMWF"     algorithm   (IFS cycle 31) 
     255 
     256   ln_humi_dpt    = .false.   !  Supply dewpoint tempearture instead of specific humidity (is true for ERA5) 
     257 
    255258      ! 
    256259      rn_zqt      = 10.       !  Air temperature & humidity reference height (m) 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/src/OCE/SBC/sbcblk.F90

    r10888 r12322  
    124124   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   cdn_oce, chn_oce, cen_oce ! needed by Lupkes 2015 bulk scheme 
    125125 
     126   LOGICAL  ::   ln_humi_dpt = .FALSE.                                        ! calculate specific hunidity from dewpoint 
     127   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qair                      ! specific humidity of air at input height 
     128 
    126129   INTEGER  ::   nblk           ! choice of the bulk algorithm 
    127130   !                            ! associated indices: 
     
    145148      !!------------------------------------------------------------------- 
    146149      ALLOCATE( Cd_atm (jpi,jpj), Ch_atm (jpi,jpj), Ce_atm (jpi,jpj), t_zu(jpi,jpj), q_zu(jpi,jpj), & 
    147          &      cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), STAT=sbc_blk_alloc ) 
     150         &      cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), qair(jpi,jpj), STAT=sbc_blk_alloc ) 
    148151      ! 
    149152      CALL mpp_sum ( 'sbcblk', sbc_blk_alloc ) 
     
    171174      NAMELIST/namsbc_blk/ sn_wndi, sn_wndj, sn_humi, sn_qsr, sn_qlw ,                &   ! input fields 
    172175         &                 sn_tair, sn_prec, sn_snow, sn_slp, sn_tdif,                & 
    173          &                 ln_NCAR, ln_COARE_3p0, ln_COARE_3p5, ln_ECMWF,             &   ! bulk algorithm 
     176         &                 ln_NCAR, ln_COARE_3p0, ln_COARE_3p5, ln_ECMWF, ln_humi_dpt,&   ! bulk algorithm 
    174177         &                 cn_dir , ln_taudif, rn_zqt, rn_zu,                         &  
    175178         &                 rn_pfac, rn_efac, rn_vfac, ln_Cd_L12, ln_Cd_L15 
     
    323326      ! 
    324327      !                                            ! compute the surface ocean fluxes using bulk formulea 
     328      ! ..... if dewpoint supplied instead of specific humidaity, calculate specific humidity 
     329      IF(ln_humi_dpt) THEN 
     330         qair(:,:) = q_sat( sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 
     331      ELSE 
     332         qair(:,:) = sf(jp_humi)%fnow(:,:,1) 
     333      END IF 
     334       
    325335      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce( kt, sf, sst_m, ssu_m, ssv_m ) 
    326336 
     
    332342         ENDIF  
    333343         tatm_ice(:,:)    = sf(jp_tair)%fnow(:,:,1) 
    334          qatm_ice(:,:)    = sf(jp_humi)%fnow(:,:,1) 
     344         qatm_ice(:,:)    = qair(:,:) 
    335345         tprecip(:,:)     = sf(jp_prec)%fnow(:,:,1) * rn_pfac 
    336346         sprecip(:,:)     = sf(jp_snow)%fnow(:,:,1) * rn_pfac 
     
    434444      !!    (see Josey, Gulev & Yu, 2013) / doi=10.1016/B978-0-12-391851-2.00005-2 
    435445      !!    (since reanalysis products provide T at z, not theta !) 
    436       ztpot = sf(jp_tair)%fnow(:,:,1) + gamma_moist( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1) ) * rn_zqt 
     446      ztpot(:,:) = sf(jp_tair)%fnow(:,:,1) + gamma_moist( sf(jp_tair)%fnow(:,:,1), qair(:,:) ) * rn_zqt 
    437447 
    438448      SELECT CASE( nblk )        !==  transfer coefficients  ==!   Cd, Ch, Ce at T-point 
    439449      ! 
    440       CASE( np_NCAR      )   ;   CALL turb_ncar    ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm,   &  ! NCAR-COREv2 
     450      CASE( np_NCAR      )   ;   CALL turb_ncar    ( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm,   &  ! NCAR-COREv2 
    441451         &                                           Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 
    442       CASE( np_COARE_3p0 )   ;   CALL turb_coare   ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm,   &  ! COARE v3.0 
     452      CASE( np_COARE_3p0 )   ;   CALL turb_coare   ( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm,   &  ! COARE v3.0 
    443453         &                                           Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 
    444       CASE( np_COARE_3p5 )   ;   CALL turb_coare3p5( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm,   &  ! COARE v3.5 
     454      CASE( np_COARE_3p5 )   ;   CALL turb_coare3p5( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm,   &  ! COARE v3.5 
    445455         &                                           Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 
    446       CASE( np_ECMWF     )   ;   CALL turb_ecmwf   ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm,   &  ! ECMWF 
     456      CASE( np_ECMWF     )   ;   CALL turb_ecmwf   ( rn_zqt, rn_zu, zst, ztpot, zsq, qair, wndm,   &  ! ECMWF 
    447457         &                                           Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 
    448458      CASE DEFAULT 
     
    454464         zrhoa(:,:) = rho_air( t_zu(:,:)              , q_zu(:,:)              , sf(jp_slp)%fnow(:,:,1) ) 
    455465      ELSE                                      ! At zt: 
    456          zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 
     466         zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), qair(:,:), sf(jp_slp)%fnow(:,:,1) ) 
    457467      END IF 
    458468 
     
    495505      IF( ABS( rn_zu - rn_zqt) < 0.01_wp ) THEN 
    496506         !! q_air and t_air are given at 10m (wind reference height) 
    497          zevap(:,:) = rn_efac*MAX( 0._wp,             zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - sf(jp_humi)%fnow(:,:,1)) ) ! Evaporation, using bulk wind speed 
    498          zqsb (:,:) = cp_air(sf(jp_humi)%fnow(:,:,1))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - ztpot(:,:)             )   ! Sensible Heat, using bulk wind speed 
     507         zevap(:,:) = rn_efac*MAX( 0._wp,             zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - qair(:,:)) ) ! Evaporation, using bulk wind speed 
     508         zqsb (:,:) = cp_air(qair(:,:))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - ztpot(:,:)             )   ! Sensible Heat, using bulk wind speed 
    499509      ELSE 
    500510         !! q_air and t_air are not given at 10m (wind reference height) 
    501511         ! Values of temp. and hum. adjusted to height of wind during bulk algorithm iteration must be used!!! 
    502512         zevap(:,:) = rn_efac*MAX( 0._wp,             zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - q_zu(:,:) ) ) ! Evaporation, using bulk wind speed 
    503          zqsb (:,:) = cp_air(sf(jp_humi)%fnow(:,:,1))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - t_zu(:,:) )   ! Sensible Heat, using bulk wind speed 
     513         zqsb (:,:) = cp_air(qair(:,:))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - t_zu(:,:) )   ! Sensible Heat, using bulk wind speed 
    504514      ENDIF 
    505515 
     
    742752      ! local scalars ( place there for vector optimisation purposes) 
    743753      ! Computing density of air! Way denser that 1.2 over sea-ice !!! 
    744       zrhoa (:,:) =  rho_air(sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1)) 
     754      zrhoa (:,:) =  rho_air(sf(jp_tair)%fnow(:,:,1), qair(:,:), sf(jp_slp)%fnow(:,:,1)) 
    745755 
    746756      !!gm brutal.... 
     
    806816      zcoef_dqla = -Ls * 11637800. * (-5897.8) 
    807817      ! 
    808       zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 
     818      zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), qair(:,:), sf(jp_slp)%fnow(:,:,1) ) 
    809819      ! 
    810820      zztmp = 1. / ( 1. - albo ) 
     
    837847               ! Latent Heat 
    838848               qla_ice(ji,jj,jl) = rn_efac * MAX( 0.e0, zrhoa(ji,jj) * Ls  * Ch_atm(ji,jj) * wndm_ice(ji,jj) *  & 
    839                   &                ( 11637800. * EXP( -5897.8 * z1_st(ji,jj,jl) ) / zrhoa(ji,jj) - sf(jp_humi)%fnow(ji,jj,1) ) ) 
     849                  &                ( 11637800. * EXP( -5897.8 * z1_st(ji,jj,jl) ) / zrhoa(ji,jj) - qair(ji,jj) ) ) 
    840850               ! Latent heat sensitivity for ice (Dqla/Dt) 
    841851               IF( qla_ice(ji,jj,jl) > 0._wp ) THEN 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/src/OCE/ZDF/zdfosm.F90

    r12311 r12322  
    141141   !!---------------------------------------------------------------------- 
    142142   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    143    !! $Id$ 
     143   !! $Id: zdfosm.F90 12317 2020-01-14 12:40:47Z agn $ 
    144144   !! Software governed by the CeCILL license (see ./LICENSE) 
    145145   !!---------------------------------------------------------------------- 
     
    483483     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    484484     ! BL must be always 4 levels deep. 
     485     ! For calculation of lateral buoyancy gradients for FK in 
     486     ! zdf_osm_zmld_horizontal_gradients need halo values for ibld, so must 
     487     ! previously exist for hbl also. 
    485488      hbl(:,:) = MAX(hbl(:,:), gdepw_n(:,:,4) ) 
    486489      ibld(:,:) = 4 
    487490      DO jk = 5, jpkm1 
    488          DO jj = 2, jpjm1 
    489             DO ji = 2, jpim1 
     491         DO jj = 1, jpj 
     492            DO ji = 1, jpi 
    490493               IF ( hbl(ji,jj) >= gdepw_n(ji,jj,jk) ) THEN 
    491494                  ibld(ji,jj) = MIN(mbkt(ji,jj), jk) 
     
    526529         END DO 
    527530 
    528       imld = ibld           ! use imld to hold previous blayer index 
     531      imld(:,:) = ibld(:,:)           ! use imld to hold previous blayer index 
    529532      ibld(:,:) = 4 
    530533 
     
    10081011       END DO 
    10091012 
     1013       IF(ln_dia_osm) THEN 
     1014          IF ( iom_use("zdtdz_pyc") ) CALL iom_put( "zdtdz_pyc", wmask*zdtdz_pyc ) 
     1015          IF ( iom_use("zdsdz_pyc") ) CALL iom_put( "zdsdz_pyc", wmask*zdsdz_pyc ) 
     1016          IF ( iom_use("zdbdz_pyc") ) CALL iom_put( "zdbdz_pyc", wmask*zdbdz_pyc ) 
     1017       END IF 
     1018 
    10101019! KPP-style Ri# mixing 
    10111020       IF( ln_kpprimix) THEN 
     
    11391148           END DO 
    11401149        END DO 
     1150        ! Lateral boundary conditions on final outputs for hbl,  on T-grid (sign unchanged) 
     1151        CALL lbc_lnk_multi( 'zdfosm', hbl, 'T', 1., dh, 'T', 1., hmle, 'T', 1. ) 
    11411152        ! Lateral boundary conditions on final outputs for gham[ts],  on W-grid  (sign unchanged) 
    11421153        ! Lateral boundary conditions on final outputs for gham[uv],  on [UV]-grid  (sign unchanged) 
     
    21862197        CALL iom_set_rstw_var_active('wn') 
    21872198        CALL iom_set_rstw_var_active('hbl') 
    2188         CALL iom_set_rstw_var_active('hbli') 
     2199        CALL iom_set_rstw_var_active('dh') 
     2200        IF( ln_osm_mle ) THEN 
     2201            CALL iom_set_rstw_var_active('hmle') 
     2202        END IF 
    21892203     ENDIF 
    21902204   END SUBROUTINE zdf_osm_init 
     
    22042218     CHARACTER(len=*), INTENT(in) ::   cdrw   ! "READ"/"WRITE" flag 
    22052219 
    2206      INTEGER ::   id1, id2   ! iom enquiry index 
     2220     INTEGER ::   id1, id2, id3   ! iom enquiry index 
    22072221     INTEGER  ::   ji, jj, jk     ! dummy loop indices 
    22082222     INTEGER  ::   iiki, ikt ! local integer 
     
    22322246           CALL iom_get( numror, jpdom_autoglo, 'dh', dh, ldxios = lrxios  ) 
    22332247           WRITE(numout,*) ' ===>>>> :  hbl & dh read from restart file' 
     2248           IF( ln_osm_mle ) THEN 
     2249              id3 = iom_varid( numror, 'hmle'   , ldstop = .FALSE. ) 
     2250              IF( id3 > 0) THEN 
     2251                 CALL iom_get( numror, jpdom_autoglo, 'hmle' , hmle , ldxios = lrxios ) 
     2252                 WRITE(numout,*) ' ===>>>> :  hmle read from restart file' 
     2253              ELSE 
     2254                 WRITE(numout,*) ' ===>>>> :  hmle not found, set to hbl' 
     2255                 hmle(:,:) = hbl(:,:)            ! Initialise MLE depth. 
     2256              END IF 
     2257           END IF 
    22342258           RETURN 
    22352259        ELSE                      ! 'hbl' & 'dh' not in restart file, recalculate 
     
    22432267     IF( TRIM(cdrw) == 'WRITE') THEN     !* Write hbli into the restart file, then return 
    22442268        IF(lwp) WRITE(numout,*) '---- osm-rst ----' 
    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          ) 
     2269         CALL iom_rstput( kt, nitrst, numrow, 'wn'     , wn,   ldxios = lwxios ) 
     2270         CALL iom_rstput( kt, nitrst, numrow, 'hbl'    , hbl,  ldxios = lwxios ) 
     2271         CALL iom_rstput( kt, nitrst, numrow, 'dh'     , dh,   ldxios = lwxios ) 
     2272         IF( ln_osm_mle ) THEN 
     2273            CALL iom_rstput( kt, nitrst, numrow, 'hmle', hmle, ldxios = lwxios ) 
     2274         END IF 
    22502275        RETURN 
    22512276     END IF 
     
    22812306     END DO 
    22822307 
    2283      IF( ln_osm_mle ) hmle(:,:) = hbl(:,:)            ! Initialise MLE depth. 
    2284  
    22852308     WRITE(numout,*) ' ===>>>> : hbl computed from stratification' 
     2309 
     2310     IF( ln_osm_mle ) THEN 
     2311        hmle(:,:) = hbl(:,:)            ! Initialise MLE depth. 
     2312        WRITE(numout,*) ' ===>>>> : hmle set = to hbl' 
     2313     END IF 
     2314 
    22862315     wn(:,:,:) = 0._wp 
    22872316     WRITE(numout,*) ' ===>>>> :  wn not in restart file, set to zero initially' 
  • NEMO/branches/UKMO/NEMO_4.0_FKOSM/src/OCE/ZDF/zdfphy.F90

    r11081 r12322  
    5656   !!---------------------------------------------------------------------- 
    5757   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    58    !! $Id$ 
     58   !! $Id: zdfphy.F90 12178 2019-12-11 11:02:38Z agn $ 
    5959   !! Software governed by the CeCILL license (see ./LICENSE) 
    6060   !!---------------------------------------------------------------------- 
     
    172172      IF( ln_zdfosm .AND. ln_zdfevd )   CALL ctl_stop( 'zdf_phy_init: chose between ln_zdfosm and ln_zdfevd' ) 
    173173      IF( lk_top    .AND. ln_zdfnpc )   CALL ctl_stop( 'zdf_phy_init: npc scheme is not working with key_top' ) 
    174       IF( lk_top    .AND. ln_zdfosm )   CALL ctl_stop( 'zdf_phy_init: osmosis scheme is not working with key_top' ) 
     174      IF( lk_top    .AND. ln_zdfosm )   CALL ctl_warn( 'zdf_phy_init: osmosis gives no non-local fluxes for TOP tracers yet' ) 
    175175      IF(lwp) THEN 
    176176         WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.