Changeset 12020


Ignore:
Timestamp:
2019-12-01T19:18:50+01:00 (6 months ago)
Author:
laurent
Message:

Improved syntax…

Location:
NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbc_oce.F90

    r11615 r12020  
    153153   !!                     Cool-skin/Warm-layer 
    154154   !!---------------------------------------------------------------------- 
    155    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tsk       !: sea-surface skin temperature (used if ln_skin_cs==.true. .OR. ln_skin_wl==.true.)  [K] !LB 
     155   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tsk !: sea-surface skin temperature [K] (ln_skin_cs==T or ln_skin_wl==T)  
    156156 
    157157    
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk.F90

    r11997 r12020  
    4747   USE sbcblk_algo_ncar     ! => turb_ncar     : NCAR - CORE (Large & Yeager, 2009) 
    4848   USE sbcblk_algo_coare3p0 ! => turb_coare3p0 : COAREv3.0 (Fairall et al. 2003) 
    49    USE sbcblk_algo_coare3p6 ! => turb_coare3p6 : COAREv3.6 (Fairall et al. 2018 + Edson et al. 2013) 
     49   USE sbcblk_algo_coare3p6 ! => turb_coare3p6 : COAREv3.6 (Fairall et al. 201 + Edson et al. 2013) 
    5050   USE sbcblk_algo_ecmwf    ! => turb_ecmwf    : ECMWF (IFS cycle 45r1) 
    5151   ! 
     
    5656   USE prtctl         ! Print control 
    5757 
    58    USE sbcblk_phy     !LB: all thermodynamics functions in the marine boundary layer, rho_air, q_sat, etc... 
     58   USE sbcblk_phy     ! a catalog of functions for physical/meteorological parameters in the marine boundary layer, rho_air, q_sat, etc... 
    5959 
    6060 
     
    142142      !!------------------------------------------------------------------- 
    143143      ALLOCATE( Cd_atm (jpi,jpj), Ch_atm (jpi,jpj), Ce_atm (jpi,jpj), t_zu(jpi,jpj), q_zu(jpi,jpj), & 
    144          &      cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), tsk(jpi,jpj), STAT=sbc_blk_alloc ) 
     144         &      cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), tsk (jpi,jpj), STAT=sbc_blk_alloc ) 
    145145      ! 
    146146      CALL mpp_sum ( 'sbcblk', sbc_blk_alloc ) 
     
    212212         !! Some namelist sanity tests: 
    213213         IF( ln_NCAR )      & 
    214             & CALL ctl_stop( 'sbc_blk_init: Cool-skin/warm-layer param. not compatible with NCAR algorithm' )          
     214            & CALL ctl_stop( 'sbc_blk_init: Cool-skin/warm-layer param. not compatible with NCAR algorithm' ) 
    215215         IF( nn_fsbc /= 1 ) & 
    216             & CALL ctl_stop( 'sbc_blk_init: Please set "nn_fsbc" to 1 when using cool-skin/warm-layer param.')                   
     216            & CALL ctl_stop( 'sbc_blk_init: Please set "nn_fsbc" to 1 when using cool-skin/warm-layer param.') 
    217217      END IF 
    218        
     218 
    219219      ioptio = 0 
    220220      IF( ln_humi_sph ) THEN 
     
    364364      CALL fld_read( kt, nn_fsbc, sf )             ! input fields provided at the current time-step 
    365365      ! 
    366       IF( kt == nit000 ) tsk(:,:) = sst_m(:,:)*tmask(:,:,1)  ! no previous estimate of skin temperature => using bulk SST 
    367       ! 
    368       IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce( kt, sf, sst_m, ssu_m, ssv_m ) !  compute the surface ocean fluxes using bulk formulea 
     366      IF( kt == nit000 ) tsk(:,:) = sst_m(:,:)*tmask(:,:,1)  ! no previous estimate of skin temperature => using bulk SST (use restart?) 
     367      !                                                      ! compute the surface ocean fluxes using bulk formulea 
     368      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce( kt, sf, sst_m, ssu_m, ssv_m ) 
    369369 
    370370#if defined key_cice 
     
    377377         ENDIF 
    378378         tatm_ice(:,:)    = sf(jp_tair)%fnow(:,:,1) 
    379  
    380379         SELECT CASE( nhumi ) 
    381380         CASE( np_humi_sph ) 
     
    386385            qatm_ice(:,:) = q_air_rh( 0.01_wp*sf(jp_humi)%fnow(:,:,1), sf(jp_tair)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1)) !LB: 0.01 => RH is % percent in file 
    387386         END SELECT 
    388  
    389387         tprecip(:,:)     = sf(jp_prec)%fnow(:,:,1) * rn_pfac 
    390388         sprecip(:,:)     = sf(jp_snow)%fnow(:,:,1) * rn_pfac 
     
    510508      ztpot = sf(jp_tair)%fnow(:,:,1) + gamma_moist( sf(jp_tair)%fnow(:,:,1), zqair(:,:) ) * rn_zqt 
    511509 
    512        
     510 
    513511      !! Time to call the user-selected bulk parameterization for 
    514512      !!  ==  transfer coefficients  ==!   Cd, Ch, Ce at T-point, and more... 
    515       SELECT CASE( nblk )         
    516           
     513      SELECT CASE( nblk ) 
     514 
    517515      CASE( np_NCAR      ) 
    518516         CALL turb_ncar     (     rn_zqt, rn_zu, zst, ztpot, zsq, zqair, wndm,                         & 
    519517            &                Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 
    520           
     518 
    521519      CASE( np_COARE_3p0 ) 
    522520         CALL turb_coare3p0 ( kt, rn_zqt, rn_zu, zst, ztpot, zsq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 
    523521            &                Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce,     & 
    524522            &                Qsw=qsr(:,:), rad_lw=sf(jp_qlw)%fnow(:,:,1), slp=sf(jp_slp)%fnow(:,:,1) ) 
    525           
     523 
    526524      CASE( np_COARE_3p6 ) 
    527525         CALL turb_coare3p6 ( kt, rn_zqt, rn_zu, zst, ztpot, zsq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 
    528526            &                Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce,     & 
    529527            &                Qsw=qsr(:,:), rad_lw=sf(jp_qlw)%fnow(:,:,1), slp=sf(jp_slp)%fnow(:,:,1) ) 
    530           
     528 
    531529      CASE( np_ECMWF     ) 
    532530         CALL turb_ecmwf   ( kt, rn_zqt, rn_zu, zst, ztpot, zsq, zqair, wndm, ln_skin_cs, ln_skin_wl,  & 
     
    537535         CALL ctl_stop( 'STOP', 'sbc_oce: non-existing bulk formula selected' ) 
    538536      END SELECT 
    539        
     537 
    540538      IF( ln_skin_cs .OR. ln_skin_wl ) THEN 
    541539         !! In the presence of sea-ice we forget about the cool-skin/warm-layer update of zst and zsq: 
    542          WHERE ( fr_i < 0.001_wp ) 
    543             ! zst and zsq have been updated by cool-skin/warm-layer scheme and we keep it!!! 
     540         WHERE ( fr_i(:,:) < 0.001_wp ) 
     541            ! zst and zsq have been updated by cool-skin/warm-layer scheme and we keep them !!! 
    544542            zst(:,:) = zst(:,:)*tmask(:,:,1) 
    545543            zsq(:,:) = zsq(:,:)*tmask(:,:,1) 
     
    577575 
    578576      ! Tau i and j component on T-grid points, using array "Cd_atm" as a temporary array... 
    579       Cd_atm = 0._wp 
    580       WHERE ( wndm > 0._wp ) Cd_atm = taum / wndm 
    581       zwnd_i = Cd_atm * zwnd_i 
    582       zwnd_j = Cd_atm * zwnd_j 
    583  
     577      Cd_atm(:,:) = 0._wp 
     578      WHERE ( wndm(:,:) > 0._wp ) Cd_atm(:,:) = taum(:,:) / wndm(:,:) 
     579      zwnd_i(:,:) = Cd_atm(:,:) * zwnd_i(:,:) 
     580      zwnd_j(:,:) = Cd_atm(:,:) * zwnd_j(:,:) 
     581       
    584582      !                          ! add the HF tau contribution to the wind stress module 
    585583      IF( lhftau )   taum(:,:) = taum(:,:) + sf(jp_tdif)%fnow(:,:,1) 
     
    661659         CALL iom_put( "dt_skin" , (zst - pst - rt0) * tmask(:,:,1) )     ! T_skin - SST temperature difference... 
    662660      ENDIF 
    663       !!#LB. ENDIF 
    664661      ! 
    665662      IF(ln_ctl) THEN 
Note: See TracChangeset for help on using the changeset viewer.