Ignore:
Timestamp:
Jul 7, 2014 2:04:59 PM (10 years ago)
Author:
maronga
Message:

bugfix in surface coupler

File:
1 edited

Legend:

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

    r1419 r1427  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Bugfix: value of l_v corrected.
    2323!
    2424! Former revisions:
     
    7272               total_2d_o, tswst, u, usws, uswst, v, vsws, vswst
    7373
     74    USE cloud_parameters,                                                      &
     75        ONLY:  cp, l_v
     76
    7477    USE control_parameters,                                                    &
    7578        ONLY:  coupling_mode, coupling_mode_remote, coupling_topology,         &
     
    9295    REAL(wp)    ::  time_since_reference_point_rem        !:
    9396    REAL(wp)    ::  total_2d(-nbgp:ny+nbgp,-nbgp:nx+nbgp) !:
     97
     98    REAL(wp)    ::  cpw = 4218.0_wp !: heat capacity of water at constant pressure
    9499
    95100#if defined( __parallel )
     
    399404!--       * latent heat of vaporization in m2/s2, or 540 cal/g, or 40.65 kJ/mol
    400405!--       /(rho_atm(=1.0)*c_p)
    401           tswst = tswst + qswst_remote * 2.2626108E6_wp / 1005.0_wp
     406          tswst = tswst + qswst_remote * l_v / cp
    402407!
    403408!--        ...and convert it to a salinity flux at the sea surface (top)
    404409!--       following Steinhorn (1991), JPO 21, pp. 1681-1683:
    405410!--       S'w' = -S * evaporation / ( rho_water * ( 1 - S ) )
    406           saswst = -1.0_wp * sa(nzt,:,:) * 0.001 * qswst_remote /  &
    407                     ( rho(nzt,:,:) * ( 1.0_wp - sa(nzt,:,:) * 0.001 ) )
     411          saswst = -1.0_wp * sa(nzt,:,:) * 0.001_wp * qswst_remote /  &
     412                    ( rho(nzt,:,:) * ( 1.0_wp - sa(nzt,:,:) * 0.001_wp ) )
    408413       ENDIF
    409414
     
    412417!--    (constants are the specific heat capacities for air and water)
    413418!--    now tswst is the ocean top heat flux
    414        tswst = tswst / rho(nzt,:,:) * 1005.0_wp / 4218.0_wp
     419       tswst = tswst / rho(nzt,:,:) * cp / cpw
    415420
    416421!
Note: See TracChangeset for help on using the changeset viewer.