[ncl-talk] Sub:Ensemble Mean..
Dennis Shea
shea at ucar.edu
Tue May 19 17:40:20 MDT 2015
Read the 'addfiles' documentation. In particular, Example 2, ....
http://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml
==
; all files in the same directory
diri = "./"
fili = (/ "Model_A.nc", "Model_Bnc", "Model_C.nc",/)
fils = diri + fili
print(fils)
; different directories
diri = (/ "/ADIR/" , "/BDIR/" , "/CDIR/" /)
fili = (/ "Model_A.nc", "Model_Bnc", "Model_C.nc",/)
fils = diri + fili
print(fils)
f = *addfiles* (fils, "r") ; note the "s" of *addfile*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml>
*ListSetType*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml>
(f, "join")
T = f[:]->T ; read T from all files
*printVarSummary*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>
(T)
The *printVarSummary*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml>
procedure yields:
Variable: T
Number of Dimensions: 5
Dimensions and sizes:
[ncl_join | 5] x [lev | 5] x [lat | 48] x [lon | 96]
or
Dimensions and sizes:
[ncl_join | 5] [time | 100] x [lev | 5] x [lat | 48] x [lon | 96]
Tmean = dim_avg_n_Wrap(T, 0)
printVarSummary(Tmean)
On Tue, May 19, 2015 at 4:48 PM, Adv <advita6 at gmail.com> wrote:
> Hi ,
> I would like to calculate the ensemble mean of three different model data
> sets with same time , lat and lon coordinate.
> For example,
> X(time,lat,lon) Model1
> X1(time,lat,lon) Model2
> X2(time,lat,lon) Model3
> Could someone explain me, how to accomplish the ensemble mean?
>
> Thanks,
> Adv
>
> _______________________________________________
> ncl-talk mailing list
> 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/20150519/95bb8629/attachment.html
More information about the ncl-talk
mailing list