Changeset 10511


Ignore:
Timestamp:
2019-01-14T19:21:49+01:00 (15 months ago)
Author:
clem
Message:

solve crash issue when using lupkes2015 for the drags (see ticket #2136)

Location:
NEMO/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/icedyn_rdgrft.F90

    r10425 r10511  
    861861         CALL tab_2d_1d( npti, nptidx(1:npti), hfx_dyn_1d    (1:npti), hfx_dyn    (:,:) ) 
    862862         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_snw_dyn_1d(1:npti), wfx_snw_dyn(:,:) ) 
    863          CALL tab_2d_1d( npti, nptidx(1:npti), wfx_pnd_1d(1:npti), wfx_pnd(:,:) ) 
     863         CALL tab_2d_1d( npti, nptidx(1:npti), wfx_pnd_1d    (1:npti), wfx_pnd    (:,:) ) 
    864864 
    865865         !                 !---------------------! 
     
    887887         CALL tab_1d_2d( npti, nptidx(1:npti), hfx_dyn_1d    (1:npti), hfx_dyn    (:,:) ) 
    888888         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_snw_dyn_1d(1:npti), wfx_snw_dyn(:,:) ) 
    889          CALL tab_1d_2d( npti, nptidx(1:npti), wfx_pnd_1d(1:npti), wfx_pnd(:,:) ) 
     889         CALL tab_1d_2d( npti, nptidx(1:npti), wfx_pnd_1d    (1:npti), wfx_pnd    (:,:) ) 
    890890         ! 
    891891      END SELECT 
  • NEMO/trunk/src/ICE/icethd.F90

    r10425 r10511  
    152152            ! --- Sensible ocean-to-ice heat flux (mostly>0 but <0 if supercooling, W/m2) 
    153153            zfric_u            = MAX( SQRT( zfric(ji,jj) ), zfric_umin )  
    154             qsb_ice_bot(ji,jj) = rswitch * rau0 * rcp * zch  * zfric_u * ( ( sst_m(ji,jj) + rt0 ) - t_bo(ji,jj) ) ! W.m-2 
     154            qsb_ice_bot(ji,jj) = rswitch * rau0 * rcp * zch * zfric_u * ( ( sst_m(ji,jj) + rt0 ) - t_bo(ji,jj) ) ! W.m-2 
    155155 
    156156            qsb_ice_bot(ji,jj) = rswitch * MIN( qsb_ice_bot(ji,jj), - zqfr_neg * r1_rdtice / MAX( at_i(ji,jj), epsi10 ) ) 
  • NEMO/trunk/src/OCE/SBC/sbcblk.F90

    r10425 r10511  
    4646   USE lib_fortran    ! to use key_nosignedzero 
    4747#if defined key_si3 
    48    USE ice     , ONLY :   u_ice, v_ice, jpl, a_i_b, at_i_b, tm_su, rn_cnd_s, hfx_err_dif 
     48   USE ice     , ONLY :   u_ice, v_ice, jpl, a_i_b, at_i_b, t_su, rn_cnd_s, hfx_err_dif 
    4949   USE icethd_dh      ! for CALL ice_thd_snwblow 
    5050#endif 
     
    10991099      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   Cd 
    11001100      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   Ch 
    1101       REAL(wp), DIMENSION(jpi,jpj)            ::   zst, zqo_sat, zqi_sat 
     1101      REAL(wp), DIMENSION(jpi,jpj)            ::   ztm_su, zst, zqo_sat, zqi_sat 
    11021102      ! 
    11031103      ! ECHAM6 constants 
     
    11271127      !!---------------------------------------------------------------------- 
    11281128 
     1129      ! mean temperature 
     1130      WHERE( at_i_b(:,:) > 1.e-20 )   ;   ztm_su(:,:) = SUM( t_su(:,:,:) * a_i_b(:,:,:) , dim=3 ) / at_i_b(:,:) 
     1131      ELSEWHERE                       ;   ztm_su(:,:) = rt0 
     1132      ENDWHERE 
     1133       
    11291134      ! Momentum Neutral Transfert Coefficients (should be a constant) 
    11301135      zCdn_form_tmp = zce10 * ( LOG( 10._wp / z0_form_ice + 1._wp ) / LOG( rn_zu / z0_form_ice + 1._wp ) )**2   ! Eq. 40 
     
    11371142      
    11381143      ! Atmospheric and Surface Variables 
    1139       zst(:,:)     = sst_m(:,:) + rt0                                       ! convert SST from Celcius to Kelvin 
    1140       zqo_sat(:,:) = 0.98_wp * q_sat( zst(:,:)  , sf(jp_slp)%fnow(:,:,1) )  ! saturation humidity over ocean [kg/kg] 
    1141       zqi_sat(:,:) = 0.98_wp * q_sat( tm_su(:,:), sf(jp_slp)%fnow(:,:,1) )  ! saturation humidity over ice   [kg/kg] 
     1144      zst(:,:)     = sst_m(:,:) + rt0                                        ! convert SST from Celcius to Kelvin 
     1145      zqo_sat(:,:) = 0.98_wp * q_sat( zst(:,:)   , sf(jp_slp)%fnow(:,:,1) )  ! saturation humidity over ocean [kg/kg] 
     1146      zqi_sat(:,:) = 0.98_wp * q_sat( ztm_su(:,:), sf(jp_slp)%fnow(:,:,1) )  ! saturation humidity over ice   [kg/kg] 
    11421147      ! 
    11431148      DO jj = 2, jpjm1           ! reduced loop is necessary for reproducibility 
    11441149         DO ji = fs_2, fs_jpim1 
    11451150            ! Virtual potential temperature [K] 
    1146             zthetav_os = zst(ji,jj)   * ( 1._wp + rctv0 * zqo_sat(ji,jj) )   ! over ocean 
    1147             zthetav_is = tm_su(ji,jj) * ( 1._wp + rctv0 * zqi_sat(ji,jj) )   ! ocean ice 
    1148             zthetav_zu = t_zu (ji,jj) * ( 1._wp + rctv0 * q_zu(ji,jj)    )   ! at zu 
     1151            zthetav_os = zst(ji,jj)    * ( 1._wp + rctv0 * zqo_sat(ji,jj) )   ! over ocean 
     1152            zthetav_is = ztm_su(ji,jj) * ( 1._wp + rctv0 * zqi_sat(ji,jj) )   ! ocean ice 
     1153            zthetav_zu = t_zu (ji,jj)  * ( 1._wp + rctv0 * q_zu(ji,jj)    )   ! at zu 
    11491154             
    11501155            ! Bulk Richardson Number (could use Ri_bulk function from aerobulk instead) 
Note: See TracChangeset for help on using the changeset viewer.