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 11209 for NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk_algo_coare3p5.F90 – NEMO

Ignore:
Timestamp:
2019-07-03T09:09:17+02:00 (5 years ago)
Author:
laurent
Message:

LB: making more efficient and more centralized use of physical/thermodynamics functions defined into "OCE/SBC/sbcblk_phy.F90".

File:
1 edited

Legend:

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

    r11111 r11209  
    3535   USE sbc_ice         ! Surface boundary condition: ice fields 
    3636#endif 
    37    ! 
     37   USE sbcblk_phy     !LB: all thermodynamics functions, rho_air, q_sat, etc... #LB 
    3838   USE iom             ! I/O manager library 
    3939   USE lib_mpp         ! distribued memory computing library 
     
    255255   END SUBROUTINE turb_coare3p5 
    256256 
    257  
    258  
    259    FUNCTION One_on_L( ptha, pqa, pus, pts, pqs ) 
    260       !!------------------------------------------------------------------------ 
    261       !! 
    262       !! Evaluates the 1./(Monin Obukhov length) from air temperature and 
    263       !!  specific humidity, and frictional scales u*, t* and q* 
    264       !! 
    265       !! Author: L. Brodeau, june 2016 / AeroBulk 
    266       !!         (https://github.com/brodeau/aerobulk/) 
    267       !!------------------------------------------------------------------------ 
    268       REAL(wp), DIMENSION(jpi,jpj)             :: One_on_L         !: 1./(Monin Obukhov length) [m^-1] 
    269       REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: ptha,  &  !: average potetntial air temperature [K] 
    270          &                                        pqa,   &  !: average specific humidity of air   [kg/kg] 
    271          &                                      pus, pts, pqs   !: frictional velocity, temperature and humidity 
    272       ! 
    273       INTEGER  ::   ji, jj         ! dummy loop indices 
    274       REAL(wp) ::     zqa          ! local scalar 
    275       ! 
    276       DO jj = 1, jpj 
    277          DO ji = 1, jpi 
    278             ! 
    279             zqa = (1. + rctv0*pqa(ji,jj)) 
    280             ! 
    281             One_on_L(ji,jj) =  grav*vkarmn*(pts(ji,jj)*zqa + rctv0*ptha(ji,jj)*pqs(ji,jj)) & 
    282                &                      / ( pus(ji,jj)*pus(ji,jj) * ptha(ji,jj)*zqa ) 
    283             ! 
    284          END DO 
    285       END DO 
    286       ! 
    287    END FUNCTION One_on_L 
    288  
    289  
    290257   FUNCTION psi_m_coare( pzeta ) 
    291258      !!---------------------------------------------------------------------------------- 
     
    389356   END FUNCTION psi_h_coare 
    390357 
    391  
    392    FUNCTION visc_air( ptak ) 
    393       !!--------------------------------------------------------------------- 
    394       !! Air kinetic viscosity (m^2/s) given from temperature in degrees... 
    395       !! 
    396       !! Author: L. Brodeau, june 2016 / AeroBulk 
    397       !!         (https://github.com/brodeau/aerobulk/) 
    398       !!--------------------------------------------------------------------- 
    399       REAL(wp), DIMENSION(jpi,jpj)             ::   visc_air 
    400       REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   ptak       ! air temperature   [K] 
    401       ! 
    402       INTEGER  ::   ji, jj         ! dummy loop indices 
    403       REAL(wp) ::   ztc, ztc2      ! local scalar 
    404       ! 
    405       DO jj = 1, jpj 
    406          DO ji = 1, jpi 
    407             ztc  = ptak(ji,jj) - rt0   ! air temp, in deg. C 
    408             ztc2 = ztc*ztc 
    409             visc_air(ji,jj) = 1.326E-5*(1. + 6.542E-3*ztc + 8.301E-6*ztc2 - 4.84E-9*ztc2*ztc) 
    410          END DO 
    411       END DO 
    412       ! 
    413    END FUNCTION visc_air 
    414  
    415358   !!====================================================================== 
    416359END MODULE sbcblk_algo_coare3p5 
Note: See TracChangeset for help on using the changeset viewer.