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

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 23 Sep 2009 18:06:14 -0600 (MDT)

Hi folks,

We have verified this is a bug, and it will be fixed for V5.2.0.
Thanks to Christine Shields and Steve Yeager for providing the fix.

The bug makes a difference in values for depths > 0.

I've attached a new version of this function if anybody needs it.

--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 Wed Sep 23 2009 - 18:06:14 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 24 2009 - 13:55:09 MDT