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

Ignore:
Timestamp:
2015-12-21T12:35:23+01:00 (8 years ago)
Author:
timgraham
Message:

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

File:
1 edited

Legend:

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

    r5541 r6140  
    22   !!============================================================================== 
    33   !!                       ***  MODULE  eosbn2  *** 
    4    !! Ocean diagnostic variable : equation of state - in situ and potential density 
    5    !!                                               - Brunt-Vaisala frequency 
     4   !! Equation Of Seawater : in situ density - Brunt-Vaisala frequency 
    65   !!============================================================================== 
    76   !! History :  OPA  ! 1989-03  (O. Marti)  Original code 
     
    2625 
    2726   !!---------------------------------------------------------------------- 
    28    !!   eos            : generic interface of the equation of state 
    29    !!   eos_insitu     : Compute the in situ density 
    30    !!   eos_insitu_pot : Compute the insitu and surface referenced potential volumic mass 
    31    !!   eos_insitu_2d  : Compute the in situ density for 2d fields 
    32    !!   bn2            : Compute the Brunt-Vaisala frequency 
    33    !!   eos_rab        : generic interface of in situ thermal/haline expansion ratio  
    34    !!   eos_rab_3d     : compute in situ thermal/haline expansion ratio 
    35    !!   eos_rab_2d     : compute in situ thermal/haline expansion ratio for 2d fields 
    36    !!   eos_fzp_2d     : freezing temperature for 2d fields 
    37    !!   eos_fzp_0d     : freezing temperature for scalar 
    38    !!   eos_init       : set eos parameters (namelist) 
     27   !!   eos           : generic interface of the equation of state 
     28   !!   eos_insitu    : Compute the in situ density 
     29   !!   eos_insitu_pot: Compute the insitu and surface referenced potential volumic mass 
     30   !!   eos_insitu_2d : Compute the in situ density for 2d fields 
     31   !!   bn2           : Compute the Brunt-Vaisala frequency 
     32   !!   eos_rab       : generic interface of in situ thermal/haline expansion ratio  
     33   !!   eos_rab_3d    : compute in situ thermal/haline expansion ratio 
     34   !!   eos_rab_2d    : compute in situ thermal/haline expansion ratio for 2d fields 
     35   !!   eos_fzp_2d    : freezing temperature for 2d fields 
     36   !!   eos_fzp_0d    : freezing temperature for scalar 
     37   !!   eos_init      : set eos parameters (namelist) 
    3938   !!---------------------------------------------------------------------- 
    40    USE dom_oce         ! ocean space and time domain 
    41    USE phycst          ! physical constants 
     39   USE dom_oce        ! ocean space and time domain 
     40   USE phycst         ! physical constants 
     41   USE stopar         ! Stochastic T/S fluctuations 
     42   USE stopts         ! Stochastic T/S fluctuations 
    4243   ! 
    43    USE in_out_manager  ! I/O manager 
    44    USE lib_mpp         ! MPP library 
    45    USE lib_fortran     ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    46    USE prtctl          ! Print control 
    47    USE wrk_nemo        ! Memory Allocation 
     44   USE in_out_manager ! I/O manager 
     45   USE lib_mpp        ! MPP library 
     46   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
     47   USE prtctl         ! Print control 
     48   USE wrk_nemo       ! Memory Allocation 
    4849   USE lbclnk         ! ocean lateral boundary conditions 
    49    USE timing          ! Timing 
    50    USE stopar          ! Stochastic T/S fluctuations 
    51    USE stopts          ! Stochastic T/S fluctuations 
     50   USE timing         ! Timing 
    5251 
    5352   IMPLICIT NONE 
    5453   PRIVATE 
    5554 
    56    !                   !! * Interface 
     55   !                  !! * Interface 
    5756   INTERFACE eos 
    5857      MODULE PROCEDURE eos_insitu, eos_insitu_pot, eos_insitu_2d 
     
    7574   PUBLIC   eos_init       ! called by istate module 
    7675 
    77    !                                !!* Namelist (nameos) * 
     76   !                               !!** Namelist nameos ** 
    7877   INTEGER , PUBLIC ::   nn_eos     ! = 0/1/2 type of eq. of state and Brunt-Vaisala frequ. 
    7978   LOGICAL , PUBLIC ::   ln_useCT   ! determine if eos_pt_from_ct is used to compute sst_m 
    8079 
    81    !                                   !!!  simplified eos coefficients 
    82    ! default value: Vallis 2006 
     80   !                               !!!  simplified eos coefficients (default value: Vallis 2006) 
    8381   REAL(wp) ::   rn_a0      = 1.6550e-1_wp     ! thermal expansion coeff.  
    8482   REAL(wp) ::   rn_b0      = 7.6554e-1_wp     ! saline  expansion coeff.  
     
    172170 
    173171   !! * Substitutions 
    174 #  include "domzgr_substitute.h90" 
    175172#  include "vectopt_loop_substitute.h90" 
    176173   !!---------------------------------------------------------------------- 
     
    587584               DO ji = 1, jpi 
    588585                  ! 
    589                   zh  = fsdept(ji,jj,jk) * r1_Z0                                ! depth 
     586                  zh  = gdept_n(ji,jj,jk) * r1_Z0                                ! depth 
    590587                  zt  = pts (ji,jj,jk,jp_tem) * r1_T0                           ! temperature 
    591588                  zs  = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 )   ! square root salinity 
     
    645642                  zt  = pts (ji,jj,jk,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0) 
    646643                  zs  = pts (ji,jj,jk,jp_sal) - 35._wp   ! abs. salinity anomaly (s-S0) 
    647                   zh  = fsdept(ji,jj,jk)                 ! depth in meters at t-point 
     644                  zh  = gdept_n(ji,jj,jk)                ! depth in meters at t-point 
    648645                  ztm = tmask(ji,jj,jk)                  ! land/sea bottom mask = surf. mask 
    649646                  ! 
     
    913910         DO jj = 1, jpj          ! surface and bottom value set to zero one for all in istate.F90 
    914911            DO ji = 1, jpi 
    915                zrw =   ( fsdepw(ji,jj,jk  ) - fsdept(ji,jj,jk) )   & 
    916                   &  / ( fsdept(ji,jj,jk-1) - fsdept(ji,jj,jk) )  
     912               zrw =   ( gdepw_n(ji,jj,jk  ) - gdept_n(ji,jj,jk) )   & 
     913                  &  / ( gdept_n(ji,jj,jk-1) - gdept_n(ji,jj,jk) )  
    917914                  ! 
    918915               zaw = pab(ji,jj,jk,jp_tem) * (1. - zrw) + pab(ji,jj,jk-1,jp_tem) * zrw  
     
    921918               pn2(ji,jj,jk) = grav * (  zaw * ( pts(ji,jj,jk-1,jp_tem) - pts(ji,jj,jk,jp_tem) )     & 
    922919                  &                    - zbw * ( pts(ji,jj,jk-1,jp_sal) - pts(ji,jj,jk,jp_sal) )  )  & 
    923                   &            / fse3w(ji,jj,jk) * tmask(ji,jj,jk) 
     920                  &            / e3w_n(ji,jj,jk) * tmask(ji,jj,jk) 
    924921            END DO 
    925922         END DO 
     
    11291126               DO ji = 1, jpi 
    11301127                  ! 
    1131                   zh  = fsdept(ji,jj,jk) * r1_Z0                                ! depth 
     1128                  zh  = gdept_n(ji,jj,jk) * r1_Z0                                ! depth 
    11321129                  zt  = pts (ji,jj,jk,jp_tem) * r1_T0                           ! temperature 
    11331130                  zs  = SQRT( ABS( pts(ji,jj,jk,jp_sal) + rdeltaS ) * r1_S0 )   ! square root salinity 
     
    11931190                  zt  = pts(ji,jj,jk,jp_tem) - 10._wp  ! temperature anomaly (t-T0) 
    11941191                  zs = pts (ji,jj,jk,jp_sal) - 35._wp  ! abs. salinity anomaly (s-S0) 
    1195                   zh  = fsdept(ji,jj,jk)               ! depth in meters  at t-point 
     1192                  zh  = gdept_n(ji,jj,jk)              ! depth in meters  at t-point 
    11961193                  ztm = tmask(ji,jj,jk)                ! tmask 
    11971194                  zn  = 0.5_wp * zh * r1_rau0 * ztm 
Note: See TracChangeset for help on using the changeset viewer.