Changeset 3270


Ignore:
Timestamp:
Sep 24, 2018 6:28:20 AM (6 years ago)
Author:
raasch
Message:

bugfix for r2502: wrong calculation of hyp(nzt) in second iterative step

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_ocean.f90

    r2846 r3270  
    2525! ------------------
    2626! $Id$
     27! bugfix for r2502: wrong calculation of hyp(nzt) in second iterative step
     28!
     29! 2846 2018-03-01 08:48:47Z raasch
    2730! FORTRAN bugfix for r2845
    2831!
     
    132135!-- First step: Calculate pressure using reference density
    133136    hyp(nzt+1) = surface_pressure * 100.0_wp
    134 
    135     hyp(nzt)      = hyp(nzt+1) + rho_surface * g * 0.5_wp * dzu(nzt+1)
    136     rho_ocean_init(nzt) = rho_surface
     137    hyp(nzt)   = hyp(nzt+1) + rho_surface * g * 0.5_wp * dzu(nzt+1)
     138    rho_ocean_init(nzt)   = rho_surface
     139    rho_ocean_init(nzt+1) = rho_surface  ! only required for output
    137140
    138141    DO  k = nzt-1, 1, -1
     
    161164       rho_reference = rho_reference / ( zw(nzt) - zu(nzb) )
    162165
    163        DO  k = nzt, 0, -1
     166       hyp(nzt) = hyp(nzt+1) + rho_surface * g * 0.5_wp * dzu(nzt+1)
     167       DO  k = nzt-1, 0, -1
    164168          hyp(k) = hyp(k+1) + g * 0.5_wp * ( rho_ocean_init(k)                 &
    165169                                           + rho_ocean_init(k+1) ) * dzu(k+1)
Note: See TracChangeset for help on using the changeset viewer.