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 15 for trunk/NEMO/OPA_SRC/eosbn2.F90 – NEMO

Ignore:
Timestamp:
2004-02-17T08:25:44+01:00 (20 years ago)
Author:
opalod
Message:

CT : UPDATE001 : First major NEMO update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/eosbn2.F90

    r3 r15  
    3737 
    3838   !! * Share module variables 
    39    INTEGER, PUBLIC ::   & !!! nameos : ocean physical parameters 
    40       neos     ,        &  ! = 0/1/2 type of eq. of state and Brunt-Vaisala frequ. 
    41       neos_init = 0        ! control flag for initialization 
    42  
    43    REAL(wp), PUBLIC ::   & !!! nameos : ocean physical parameters 
    44       ralpha,            &  ! thermal expension coeff. (linear equation of state) 
    45       rbeta                 ! saline  expension coeff. (linear equation of state) 
     39   INTEGER , PUBLIC ::   &  !: nameos : ocean physical parameters 
     40      neos          ,    &  !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ. 
     41      neos_init = 0         !: control flag for initialization 
     42 
     43   REAL(wp), PUBLIC ::   &  !: nameos : ocean physical parameters 
     44      ralpha        ,    &  !: thermal expension coeff. (linear equation of state) 
     45      rbeta                 !: saline  expension coeff. (linear equation of state) 
    4646    
    4747   !! * Substitutions 
     
    594594      !!         The brunt-vaisala frequency is computed using the polynomial 
    595595      !!      polynomial expression of McDougall (1987): 
    596       !!            N^2 = g * beta * ( alpha/beta*dk[ t ] - dk[ s ] )/e3w 
     596      !!            N^2 = grav * beta * ( alpha/beta*dk[ t ] - dk[ s ] )/e3w 
    597597      !!      If lk_zdfddm=T, the heat/salt buoyancy flux ratio Rrau is 
    598598      !!      computed and used in zdfddm module : 
    599599      !!              Rrau = alpha/beta * ( dk[ t ] / dk[ s ] ) 
    600600      !!       * neos = 1  : linear equation of state (temperature only) 
    601       !!            N^2 = g * ralpha * dk[ t ]/e3w 
     601      !!            N^2 = grav * ralpha * dk[ t ]/e3w 
    602602      !!       * neos = 2  : linear equation of state (temperature & salinity) 
    603       !!            N^2 = g * (ralpha * dk[ t ] - rbeta * dk[ s ] ) / e3w 
     603      !!            N^2 = grav * (ralpha * dk[ t ] - rbeta * dk[ s ] ) / e3w 
    604604      !!      The use of potential density to compute N^2 introduces e r r o r 
    605605      !!      in the sign of N^2 at great depths. We recommand the use of  
     
    631631      REAL(wp) ::   & 
    632632         zgde3w, zt, zs, zh,  &  ! temporary scalars  
    633          zalbet, zbeta, zds      !    "         " 
     633         zalbet, zbeta           !    "         " 
     634#if defined key_zdfddm 
     635      REAL(wp) ::   zds          ! temporary scalars 
     636#endif 
    634637      !!---------------------------------------------------------------------- 
    635638      !!  OPA8.5, LODYC-IPSL (2002) 
     
    653656            DO jj = 1, jpj 
    654657               DO ji = 1, jpi 
    655                   zgde3w = g/fse3w(ji,jj,jk) 
    656                   zt = 0.5*( ptem(ji,jj,jk) + ptem(ji,jj,jk-1) )          ! potential temperature at w-point 
    657                   zs = 0.5*( psal(ji,jj,jk) + psal(ji,jj,jk-1) ) - 35.0   ! salinity anomaly (s-35) at w-point 
    658                   zh = fsdepw(ji,jj,jk)                                   ! depth in meters  at w-point 
     658                  zgde3w = grav / fse3w(ji,jj,jk) 
     659                  zt = 0.5 * ( ptem(ji,jj,jk) + ptem(ji,jj,jk-1) )          ! potential temperature at w-point 
     660                  zs = 0.5 * ( psal(ji,jj,jk) + psal(ji,jj,jk-1) ) - 35.0   ! salinity anomaly (s-35) at w-point 
     661                  zh = fsdepw(ji,jj,jk)                                     ! depth in meters  at w-point 
    659662 
    660663                  zalbet = ( ( ( - 0.255019e-07 * zt + 0.298357e-05 ) * zt   &   ! ratio alpha/beta 
     
    706709            DO jj = 1, jpj 
    707710               DO ji = 1, jpi 
    708                   zgde3w = g/fse3w(ji,jj,jk) * tmask(ji,jj,jk) 
     711                  zgde3w = grav / fse3w(ji,jj,jk) * tmask(ji,jj,jk) 
    709712                  pn2(ji,jj,jk) = zgde3w * ralpha * ( ptem(ji,jj,jk-1) - ptem(ji,jj,jk) ) 
    710713               END DO 
     
    722725            DO jj = 1, jpj 
    723726               DO ji = 1, jpi 
    724                   zgde3w = g/fse3w(ji,jj,jk) * tmask(ji,jj,jk) 
     727                  zgde3w = grav / fse3w(ji,jj,jk) * tmask(ji,jj,jk) 
    725728                  pn2(ji,jj,jk) = zgde3w * (  ralpha * ( ptem(ji,jj,jk-1) - ptem(ji,jj,jk) )   & 
    726729                     &                      - rbeta  * ( psal(ji,jj,jk-1) - psal(ji,jj,jk) )  ) 
Note: See TracChangeset for help on using the changeset viewer.