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 11841 for NEMO – NEMO

Changeset 11841 for NEMO


Ignore:
Timestamp:
2019-10-31T16:39:00+01:00 (5 years ago)
Author:
laurent
Message:

Better use of function "bulk_formula()" (in sbcblk_phy.F90)

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/sbcblk.F90

    r11831 r11841  
    604604       
    605605 
    606       !  Turbulent fluxes over ocean  => TURB_FLUXES @ sbcblk_phy.F90 
     606      !  Turbulent fluxes over ocean  => BULK_FORMULA @ sbcblk_phy.F90 
    607607      ! ------------------------------------------------------------- 
    608608       
    609       CALL TURB_FLUXES( rn_zu, zst(:,:), zsq(:,:), t_zu(:,:), q_zu(:,:), Cd_atm(:,:), Ch_atm(:,:), Ce_atm(:,:), & 
     609      CALL BULK_FORMULA( rn_zu, zst(:,:), zsq(:,:), t_zu(:,:), q_zu(:,:), Cd_atm(:,:), Ch_atm(:,:), Ce_atm(:,:), & 
    610610         &                 wndm(:,:), zU_zu(:,:), sf(jp_slp)%fnow(:,:,1), & 
    611611         &                 taum(:,:), zqsb(:,:), zqla(:,:),               & 
     
    617617      zevap(:,:) = zevap(:,:) * tmask(:,:,1) 
    618618       
    619       DO jj = 1, jpj             ! tau i and j component on T-grid points 
    620          DO ji = 1, jpi 
    621             zztmp = taum(ji,jj) / wndm(ji,jj) 
    622             zwnd_i(ji,jj) = zztmp * zwnd_i(ji,jj) 
    623             zwnd_j(ji,jj) = zztmp * zwnd_j(ji,jj) 
    624          END DO 
    625       END DO 
     619      ! Tau i and j component on T-grid points, using array "Cd_atm" as a temporary array... 
     620      Cd_atm = 0._wp 
     621      WHERE ( wndm > 0._wp ) Cd_atm = taum / wndm 
     622      zwnd_i = Cd_atm * zwnd_i 
     623      zwnd_j = Cd_atm * zwnd_j       
     624      !DO jj = 1, jpj             ! tau i and j component on T-grid points 
     625      !   DO ji = 1, jpi 
     626      !      zztmp = taum(ji,jj) / MAX( wndm(ji,jj) , 0.01_wp ) 
     627      !      zwnd_i(ji,jj) = zztmp * zwnd_i(ji,jj) 
     628      !      zwnd_j(ji,jj) = zztmp * zwnd_j(ji,jj) 
     629      !   END DO 
     630      !END DO 
    626631      !                          ! add the HF tau contribution to the wind stress module 
    627632      IF( lhftau )   taum(:,:) = taum(:,:) + sf(jp_tdif)%fnow(:,:,1) 
  • NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk_phy.F90

    r11826 r11841  
    7979   END INTERFACE alpha_sw 
    8080 
    81    INTERFACE turb_fluxes 
    82       MODULE PROCEDURE turb_fluxes_vctr, turb_fluxes_sclr 
    83    END INTERFACE turb_fluxes 
     81   INTERFACE bulk_formula 
     82      MODULE PROCEDURE bulk_formula_vctr, bulk_formula_sclr 
     83   END INTERFACE bulk_formula 
    8484 
    8585 
     
    9898   PUBLIC update_qnsol_tau 
    9999   PUBLIC alpha_sw 
    100    PUBLIC turb_fluxes 
     100   PUBLIC bulk_formula 
    101101 
    102102   !!---------------------------------------------------------------------- 
     
    539539            zCe = zz0*pqst(ji,jj)/zdq 
    540540 
    541             CALL TURB_FLUXES( pzu, pTs(ji,jj), pqs(ji,jj), pTa(ji,jj), pqa(ji,jj), zCd, zCh, zCe, & 
     541            CALL BULK_FORMULA( pzu, pTs(ji,jj), pqs(ji,jj), pTa(ji,jj), pqa(ji,jj), zCd, zCh, zCe, & 
    542542               &              pwnd(ji,jj), pUb(ji,jj), pslp(ji,jj), & 
    543543               &              pTau(ji,jj), zQsen, zQlat ) 
     
    554554 
    555555 
    556    SUBROUTINE TURB_FLUXES_VCTR( pzu, pTs, pqs, pTa, pqa, pCd, pCh, pCe, pwnd, pUb, pslp, & 
     556   SUBROUTINE BULK_FORMULA_VCTR( pzu, pTs, pqs, pTa, pqa, pCd, pCh, pCe, pwnd, pUb, pslp, & 
    557557      &                                 pTau, pQsen, pQlat,  pEvap, prhoa ) 
    558558      !!---------------------------------------------------------------------------------- 
     
    604604         END DO 
    605605      END DO 
    606    END SUBROUTINE TURB_FLUXES_VCTR 
    607  
    608  
    609    SUBROUTINE TURB_FLUXES_SCLR( pzu, pTs, pqs, pTa, pqa, pCd, pCh, pCe, pwnd, pUb, pslp, & 
     606   END SUBROUTINE BULK_FORMULA_VCTR 
     607 
     608 
     609   SUBROUTINE BULK_FORMULA_SCLR( pzu, pTs, pqs, pTa, pqa, pCd, pCh, pCe, pwnd, pUb, pslp, & 
    610610      &                                 pTau, pQsen, pQlat,  pEvap, prhoa ) 
    611611      !!---------------------------------------------------------------------------------- 
     
    653653      IF ( PRESENT(prhoa) ) prhoa = zrho 
    654654 
    655    END SUBROUTINE TURB_FLUXES_SCLR 
     655   END SUBROUTINE BULK_FORMULA_SCLR 
    656656 
    657657 
Note: See TracChangeset for help on using the changeset viewer.