[ncl-talk] XY Plot from 3 Different WRF Simulations Question
Dennis Shea
shea at ucar.edu
Mon Feb 26 15:28:16 MST 2018
Just to mention that
https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml
could be quite useful. In particular, Example 2
f = *addfiles* (wrf_fils, "r") ; note the "s" of *addfile*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml>
*ListSetType*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml>
(f, "join")
If you have (say) 3 WRF files with the same dimension (eg: 3 different
ensemble members) then
T = f[:]->T ; read T from all files
*printVarSummary*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>
(T)
The *printVarSummary*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>
procedure yields:
Variable: T
Type: float
Total Size: 460800 bytes
115200 values
Number of Dimensions: 5
Dimensions and sizes: *[ncl_join | 3]* x [time|?] x [lev | 5] x
[lat | 48] x [lon | 96]
Basically, you have 3 versions (ensemble members) of the same variable .
This variable (data) structure facilitates selecting individual
ensemble members via the leftmost dimension.
Really, using NCL's 'dim_*_n* fumctions alloes you to do a lot of statistics.
Good luck
On Mon, Feb 26, 2018 at 2:56 PM, Nicholas Thomas Luchetti <
Nicholas.Luchetti at colorado.edu> wrote:
> Ahh!
>
> Didn't think to do that! This makes plenty sense. I'll give this a try!
>
> Many thanks!
>
> Nick Luchetti
>
> On Mon, Feb 26, 2018 at 2:52 PM, Guido Cioni <guidocioni at gmail.com> wrote:
>
>> It's still not clear to me. Why do you want to read the data in the same
>> variable? Do you want to merge the data over time or still have 3 different
>> lines?
>>
>> In the latter case you need 3 differnt variables a1, a2, a3 which you can
>> then put in an array data=(/a1, A2, a3/) and plot with gsn_csm_xy. NCL will
>> already interpret this as data with a shared x axis and plot it with 3
>> differnt lines.
>>
>> I suggest you to read the beginner guide of NCL.
>>
>> Il 27 feb 2018 8:45 AM, "Nicholas Thomas Luchetti" <
>> Nicholas.Luchetti at colorado.edu> ha scritto:
>>
>>> Hi Guido,
>>>
>>> Thanks for the response.
>>>
>>> I suppose I'm confused considering that the NCL WRF samples suggest
>>> using the "addfile" function to read in the data as so:
>>>
>>> a = addfile("/Users/nicholasluchetti/Build_WRF/WRFV3/test/em_qua
>>> rter_ss/wrfout_d01_simulation_1.nc
>>> <http://secure-web.cisco.com/124RRQDniXpQP_mnEMBPYjNp_N4N8PBqZ60K61bo2n63M_HxMGayFHhB6l0uJywwpe7WHqr-LxyoQf718diKRQtIGTqtVfc0XCZnszB0isK5szD9AaakR2H9ts9MSqhw4vkPGJSMY6f2hYg0v0j9aUAofAmZ6h2l1-MUJ7Lt9xI6XmWwKN7iQs3BsjKz2FxwC7Es0--QrPC3KzJl45lrAEycZXWNUYr7IwvnATqDztdTrNRFLTPKCXQzxibrAyj5AqSbhE5WwTpL-0guBg_h99MXZx87Cb-4vAxLN_T4apcmUOXL0yBjMwq5i-owtY-jkkoIVoJSCfjSLsfjqU3cV7c-aG_hPgl4wxjkwDhVRFt7HhAS0ZPwxehOzj3IhLHRacxE-cnBOZF1T0pSuevzLj2ixkIcjkE_elizbYuucGySO200ukRp-scvrVIRqqyvF/http%3A%2F%2Fwrfout_d01_simulation_1.nc>
>>> ","r")
>>>
>>> That's for 1 simulation..... Can I add a second wrfoutput .nc file (with
>>> my second simulation) in the same variable a? I don't see how this is
>>> possible?
>>>
>>> Thanks!
>>>
>>> Nick Luchetti
>>>
>>> On Mon, Feb 26, 2018 at 2:39 PM, Guido Cioni <guidocioni at gmail.com>
>>> wrote:
>>>
>>>> Nicolas,
>>>> if the data is dimensioned the same in all simulations there is really
>>>> nothing different from plotting 3 variables from the same simulation :)
>>>>
>>>> Just read the data, put it in an array and plot it using gsn_csm_xy.
>>>>
>>>> Otherwise you'll have to explain in detail why it doesn't work.
>>>>
>>>> Cheers
>>>>
>>>> On 27. Feb 2018, at 07:57, Nicholas Thomas Luchetti <
>>>> Nicholas.Luchetti at colorado.edu> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I am trying to plot the same variable from 3 separate WRF runs
>>>> (sensitivity type analysis) on the same x y plot... However, after scouring
>>>> over all xy plot examples on the NCL help site, I can't find a clear cut
>>>> way to do this.... All the examples seem have each line from 1 input data
>>>> source (just sliced arrays from the same data source)...
>>>>
>>>> Can you provide guidance, or a link to an example that plots the same
>>>> variable, over the same time period, but from 3 different data sources?
>>>>
>>>> Thanks!
>>>>
>>>> Nick Luchetti
>>>>
>>>> --
>>>> Nicholas Luchetti
>>>> Graduate Student
>>>> Department of Atmospheric and Oceanic Sciences (ATOC)
>>>> CU Boulder
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>>
>>>> Guido Cioni
>>>> http://guidocioni.altervista
>>>> <http://secure-web.cisco.com/1g-90tMnR_YCu_cJsHHQIlV2s7gjyKNDfZTNaWvzzYXeGY26H6P5IicImdCBslB42b1QkIXGjv93SQ6ym8q39x6Dl2F7YsADUjIgc53fwtK_zy0ICUzxvOE_3pZxidLnp7SegehspEsmxR02PdeLKn-YLc7sWJ4d1bl9QTxCwgW8Xbyclm3g6xNj6qpyzRxQZLrjrS_X_w5No8PTahre2SjO_8xZy6ldiEvkHxwS_eOgcA0n8QG9qpVuyQpJ2wlfOkv66iuQAo9Mc9Au1P8CvA-nYKQ_Yy4NmIRXahEiOH_bNAN71MoKVn97RunUrB2EY7jHd5jBeGI6M2d1rpY0-CcaLysI2YVvooMze_SOW5PVxNS1FRnuUyl0rBC7LNxNQxp2AxKy4u3sVXRo_ThX2e1LzK0QfSzUnhMNcaGElWJejysRxWdLGsLCy4yVdlGSQ/http%3A%2F%2Fguidocioni.altervista>
>>>> .org
>>>>
>>>>
>>>
>>>
>>> --
>>> Nicholas Luchetti
>>> Graduate Student
>>> Department of Atmospheric and Oceanic Sciences (ATOC)
>>> CU Boulder
>>>
>>>
>
>
> --
> Nicholas Luchetti
> Graduate Student
> Department of Atmospheric and Oceanic Sciences (ATOC)
> CU Boulder
>
>
> _______________________________________________
> 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/20180226/a7023835/attachment.html>
More information about the ncl-talk
mailing list