# Re: center_finite_diff_n missing values

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 01 2011 - 15:56:15 MST

Hi Nicole,

Why are dx and dy calculated the way they are?

> dx = 6378388*cos(0.0174533*lat(n2))*dlon
> dy = 6378388.*0.0174533*dlon

Did you mean to subscript "lat" with n2? You use "n2" as a longitude
subscript
in the center_finite_diff_n call, so I'm wondering if there's an error
there...

Something doesn't look quite right with the above code. I'm guessing
one or
both of dx or dy are incorrect.

--Mary

On Dec 1, 2011, at 10:31 AM, Nicole Schiffer wrote:

> I'm using center_finite_diff_n on two 4D array (time, pressure, lat,
> lon) with missing values. With one array, the u-wind, it handles
> missing
> values fine. With the v-wind array, it doesn't. Both arrays have the
> same metadata (missing and fill values). Any ideas why v-wind is a
> problem?
>
> Code snippet:
> dlat = 2.5*0.0174533
> dlon = dlat
> do n2=0,nlon-1
> dx = 6378388*cos(0.0174533*lat(n2))*dlon
> mfu(:,:,:,n2) =
> center_finite_diff_n((hus(time|:,plev|:,lat|:,lon|n2)/
> g)*ua(:,:,:,n2),dx,False,0,2)
> end do
> dlon = 2.5*0.0174533
> do n1=0,nlat-1
> dy = 6378388.*0.0174533*dlon
> mfv(:,:,n1,:) =
> center_finite_diff_n((hus(time|:,plev|:,lat|n1,lon|:)/
> g)*va(:,:,n1,:),dy,False,0,2)
> end do
>
> Thanks,
> Nicole
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> * Nicole Schiffer
> * Graduate Research Fellow (Dept. of Energy)
> * Department of Atmospheric Sciences
> * University of Illinois, Urbana-Champaign
> * Email: nschiff2 [at] illinois [dot] edu
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> _______________________________________________
> 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 Thu Dec 1 15:56:24 2011

This archive was generated by hypermail 2.1.8 : Fri Dec 02 2011 - 16:10:18 MST