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 14072 for NEMO/trunk/src/OCE/TRA/eosbn2.F90 – NEMO

Ignore:
Timestamp:
2020-12-04T08:48:38+01:00 (3 years ago)
Author:
laurent
Message:

Merging branch "2020/dev_r13648_ASINTER-04_laurent_bulk_ice", ticket #2369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/TRA/eosbn2.F90

    r14010 r14072  
    3131   !!   bn2           : compute the Brunt-Vaisala frequency 
    3232   !!   eos_pt_from_ct: compute the potential temperature from the Conservative Temperature 
    33    !!   eos_rab       : generic interface of in situ thermal/haline expansion ratio  
     33   !!   eos_rab       : generic interface of in situ thermal/haline expansion ratio 
    3434   !!   eos_rab_3d    : compute in situ thermal/haline expansion ratio 
    3535   !!   eos_rab_2d    : compute in situ thermal/haline expansion ratio for 2d fields 
     
    4646   USE in_out_manager ! I/O manager 
    4747   USE lib_mpp        ! MPP library 
    48    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     48   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    4949   USE prtctl         ! Print control 
    5050   USE lbclnk         ! ocean lateral boundary conditions 
     
    6363   END INTERFACE 
    6464   ! 
    65    INTERFACE eos_fzp  
     65   INTERFACE eos_fzp 
    6666      MODULE PROCEDURE eos_fzp_2d, eos_fzp_0d 
    6767   END INTERFACE 
     
    8989 
    9090   !                               !!!  simplified eos coefficients (default value: Vallis 2006) 
    91    REAL(wp) ::   rn_a0      = 1.6550e-1_wp     ! thermal expansion coeff.  
    92    REAL(wp) ::   rn_b0      = 7.6554e-1_wp     ! saline  expansion coeff.  
    93    REAL(wp) ::   rn_lambda1 = 5.9520e-2_wp     ! cabbeling coeff. in T^2         
    94    REAL(wp) ::   rn_lambda2 = 5.4914e-4_wp     ! cabbeling coeff. in S^2         
    95    REAL(wp) ::   rn_mu1     = 1.4970e-4_wp     ! thermobaric coeff. in T   
    96    REAL(wp) ::   rn_mu2     = 1.1090e-5_wp     ! thermobaric coeff. in S   
    97    REAL(wp) ::   rn_nu      = 2.4341e-3_wp     ! cabbeling coeff. in theta*salt   
    98     
     91   REAL(wp) ::   rn_a0      = 1.6550e-1_wp     ! thermal expansion coeff. 
     92   REAL(wp) ::   rn_b0      = 7.6554e-1_wp     ! saline  expansion coeff. 
     93   REAL(wp) ::   rn_lambda1 = 5.9520e-2_wp     ! cabbeling coeff. in T^2 
     94   REAL(wp) ::   rn_lambda2 = 5.4914e-4_wp     ! cabbeling coeff. in S^2 
     95   REAL(wp) ::   rn_mu1     = 1.4970e-4_wp     ! thermobaric coeff. in T 
     96   REAL(wp) ::   rn_mu2     = 1.1090e-5_wp     ! thermobaric coeff. in S 
     97   REAL(wp) ::   rn_nu      = 2.4341e-3_wp     ! cabbeling coeff. in theta*salt 
     98 
    9999   ! TEOS10/EOS80 parameters 
    100100   REAL(wp) ::   r1_S0, r1_T0, r1_Z0, rdeltaS 
    101     
     101 
    102102   ! EOS parameters 
    103103   REAL(wp) ::   EOS000 , EOS100 , EOS200 , EOS300 , EOS400 , EOS500 , EOS600 
     
    117117   REAL(wp) ::   EOS022 
    118118   REAL(wp) ::   EOS003 , EOS103 
    119    REAL(wp) ::   EOS013  
    120     
     119   REAL(wp) ::   EOS013 
     120 
    121121   ! ALPHA parameters 
    122122   REAL(wp) ::   ALP000 , ALP100 , ALP200 , ALP300 , ALP400 , ALP500 
     
    133133   REAL(wp) ::   ALP012 
    134134   REAL(wp) ::   ALP003 
    135     
     135 
    136136   ! BETA parameters 
    137137   REAL(wp) ::   BET000 , BET100 , BET200 , BET300 , BET400 , BET500 
     
    160160   REAL(wp) ::   PEN002 , PEN102 
    161161   REAL(wp) ::   PEN012 
    162     
     162 
    163163   ! ALPHA_PEN parameters 
    164164   REAL(wp) ::   APE000 , APE100 , APE200 , APE300 
     
    295295               &  + rn_b0 * ( 1._wp - 0.5_wp*rn_lambda2*zs - rn_mu2*zh ) * zs   & 
    296296               &  - rn_nu * zt * zs 
    297                !                                  
     297               ! 
    298298            prd(ji,jj,jk) = zn * r1_rho0 * ztm                ! density anomaly (masked) 
    299299         END_3D 
     
    448448            END_3D 
    449449         ENDIF 
    450           
     450 
    451451      CASE( np_seos )                !==  simplified EOS  ==! 
    452452         ! 
     
    997997      !!                  ***  ROUTINE bn2  *** 
    998998      !! 
    999       !! ** Purpose :   Compute the local Brunt-Vaisala frequency at the  
     999      !! ** Purpose :   Compute the local Brunt-Vaisala frequency at the 
    10001000      !!                time-step of the input arguments 
    10011001      !! 
     
    10041004      !!      N.B. N^2 is set one for all to zero at jk=1 in istate module. 
    10051005      !! 
    1006       !! ** Action  :   pn2 : square of the brunt-vaisala frequency at w-point  
     1006      !! ** Action  :   pn2 : square of the brunt-vaisala frequency at w-point 
    10071007      !! 
    10081008      !!---------------------------------------------------------------------- 
     
    10211021      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 2, jpkm1 )      ! interior points only (2=< jk =< jpkm1 ); surface and bottom value set to zero one for all in istate.F90 
    10221022         zrw =   ( gdepw(ji,jj,jk  ,Kmm) - gdept(ji,jj,jk,Kmm) )   & 
    1023             &  / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) )  
    1024             ! 
    1025          zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw  
     1023            &  / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) ) 
     1024            ! 
     1025         zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw 
    10261026         zbw = pab(ji,jj,jk,jp_sal) * (1. - zrw) + pab(ji,jj,jk-1,jp_sal) * zrw 
    10271027         ! 
     
    11511151         CALL ctl_stop( 'eos_fzp_2d:', ctmp1 ) 
    11521152         ! 
    1153       END SELECT       
     1153      END SELECT 
    11541154      ! 
    11551155  END SUBROUTINE eos_fzp_2d_t 
     
    12081208      !! ** Purpose :   Calculates nonlinear anomalies of alpha_PE, beta_PE and PE at T-points 
    12091209      !! 
    1210       !! ** Method  :   PE is defined analytically as the vertical  
     1210      !! ** Method  :   PE is defined analytically as the vertical 
    12111211      !!                   primitive of EOS times -g integrated between 0 and z>0. 
    12121212      !!                pen is the nonlinear bsq-PE anomaly: pen = ( PE - rho0 gz ) / rho0 gz - rd 
    1213       !!                                                      = 1/z * /int_0^z rd dz - rd  
     1213      !!                                                      = 1/z * /int_0^z rd dz - rd 
    12141214      !!                                where rd is the density anomaly (see eos_rhd function) 
    12151215      !!                ab_pe are partial derivatives of PE anomaly with respect to T and S: 
     
    12751275               ! 
    12761276            zn  = ( zn2 * zh + zn1 ) * zh + zn0 
    1277             !                               
     1277            ! 
    12781278            pab_pe(ji,jj,jk,jp_tem) = zn * zh * r1_rho0 * ztm 
    12791279            ! 
     
    12901290               ! 
    12911291            zn  = ( zn2 * zh + zn1 ) * zh + zn0 
    1292             !                               
     1292            ! 
    12931293            pab_pe(ji,jj,jk,jp_sal) = zn / zs * zh * r1_rho0 * ztm 
    12941294            ! 
     
    13701370         IF(lwp) WRITE(numout,*) '   ==>>>   use of TEOS-10 equation of state (cons. temp. and abs. salinity)' 
    13711371         ! 
    1372          l_useCT = .TRUE.                          ! model temperature is Conservative temperature  
     1372         l_useCT = .TRUE.                          ! model temperature is Conservative temperature 
    13731373         ! 
    13741374         rdeltaS = 32._wp 
     
    17511751 
    17521752         r1_S0  = 0.875_wp/35.16504_wp   ! Used to convert CT in potential temperature when using bulk formulae (eos_pt_from_ct) 
    1753           
     1753 
    17541754         IF(lwp) THEN 
    17551755            WRITE(numout,*) 
     
    17751775      END SELECT 
    17761776      ! 
    1777       rho0_rcp    = rho0 * rcp  
     1777      rho0_rcp    = rho0 * rcp 
    17781778      r1_rho0     = 1._wp / rho0 
    17791779      r1_rcp      = 1._wp / rcp 
    1780       r1_rho0_rcp = 1._wp / rho0_rcp  
     1780      r1_rho0_rcp = 1._wp / rho0_rcp 
    17811781      ! 
    17821782      IF(lwp) THEN 
Note: See TracChangeset for help on using the changeset viewer.