[ncl-talk] Using NCL to Average Over Grid Cells
Mary Haley
haley at ucar.edu
Fri Jul 13 16:33:00 MDT 2018
Stuart,
Were these plots generated with NCL? They look like Excel or similar to me.
Your VIC data has rectilinear lat / lon coordinate arrays which means you
can easily slice the data by a lat / lon pair, like (45.4375,-96.4375) and
do an XY plot.
With the LIS data, however, the lat / lon arrays are 2D and they contain
lots of missing values, so when you created the XY plot across
45.4375,-96.4375 using what looks like Excel, I'm not sure exactly what you
were plotting. I see from your lat/lon data that index 0 of lat and 25 of
lon is equal to 45.4375 and -96.4375. When I create plots at this time
slice, however, they don't look the same to me (see timeseries.000005.png
attached).
Note: the VIC data goes from 1/1/1999 to 3/30/1999, but since there are
only three LIS files, the data only goes from 1/1/1999 to 1/3/1999. You'll
see this on the plots, where the orange curves only have three points.
In order to understand your question, we have to better understand the
original plots you created, and why you think they should be the same.
I modified both of your codes quite a bit and combined them into one, so
you could better see the individual plots and the overlaid plots.
See attached script and images. Hopefully this will help you figure things
out.
--Mary
On Thu, Jul 12, 2018 at 9:07 AM, Smith, Stuart <smit1770 at purdue.edu> wrote:
> Hello,
>
>
>
> I am using NCL to average simulated output variables over many grid cells,
> and evaluate the results between hydrologic models (LIS-VIC and VIC). The
> simulated outputs for both models should be the same. When I compare
> results of individual grid cells the results are the same, as shown below.
> However, when I average over the total number of grid cells (703 grid
> cells), the results are different which was unexpected (also shown below).
> I believe this is an error with my plotting script.
>
>
>
> I wanted to ask for guidance on correcting the difference in calculation,
> as I can’t determine what is causing the differences. In the attached
> compressed file are examples of the LIS-VIC and VIC NetCDF output files
> along with the scripts used to calculate the average for each. I hope this
> file is not too large. I think the information within it is important for
> analyzing the differences. Thank you for your time.
>
>
>
>
>
> Regards,
>
>
>
> -Stuart
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 36502 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 35618 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeseries.000001.png
Type: image/png
Size: 56452 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeseries.000002.png
Type: image/png
Size: 62373 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeseries.000003.png
Type: image/png
Size: 38827 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeseries.000004.png
Type: image/png
Size: 42928 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeseries.000005.png
Type: image/png
Size: 59491 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timeseries.000006.png
Type: image/png
Size: 68280 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VIC_LIS_Time_Series.ncl
Type: application/octet-stream
Size: 4519 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180713/258e30e5/attachment-0001.obj>
More information about the ncl-talk
mailing list