Re: Bug in code/documentation of contributed function 'rho_mwfj'

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 8 Sep 2009 10:14:20 -0600 (MDT)

Hi Arne,

The person who is responsible for this code is out-of-town until next
week. I have sent her an email and will post back to the list once I
know more.

--Mary

On Tue, 8 Sep 2009 arne.melsom_at_met.no wrote:

> Hi!
>
> The contributed code with the eq. of state in the ocean, rho_mwfj, appears to me to be incorrect. It's basic syntax in ncl is
> function rho_mwjf (t2d [*][*] : numeric, s2d [*][*] : numeric, depth [1] : numeric)
> where 'depth' is the depth at which to compute density, which should be given in meters, according to http://www.ncl.ucar.edu/Document/Functions/Contributed/rho_mwjf.shtml. In this function, the pressure is computed as
> pressure=0.100766*depth
> with some corrections (mostly for large depths), i.e., meter are converted to bar. Then, the density at reference level 'depth' is (supposedly) computed.
>
> The code is taken from one of the eq. of state provided with the POP code. In POP, the variable 'pressz [*]' holds the ref. pressure at each model level, in bar. Before entering the computation of density, this is modified to
> p = c10*pressz(kk)
> (c10=10.), i.e. to desibar. Thus, it seems to me that the contributed code needs to be modified by e.g. inserting
> pressure = c10*pressure
> after the initial computation of 'pressure'.
>
> Hoping this might be of some help,
> Arne Melsom
> Norwegian Met. Institute
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Sep 08 2009 - 10:14:20 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 08 2009 - 11:49:50 MDT