<div dir="ltr">Thanks Jonathan!, I'll check it out. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qui., 29 de out. de 2020 às 02:38, Buzan, Jonathan <<a href="mailto:jbuzan@purdue.edu">jbuzan@purdue.edu</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Luiz,<br>
<br>
Please see the ncl manual.<br>
<a href="http://www.ncl.ucar.edu/Applications/write_netcdf.shtml" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/Applications/write_netcdf.shtml</a><br>
<br>
-Jonathan<br>
<br>
<br>
<br>
> On Oct 29, 2020, at 7:01 AM, Luiz Octavio Fabricio dos Santos via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
> <br>
> Hello, I have calculated the correlation between precipitation anomalies and sea surface temperature anomalies. <br>
> And I would like to export the variable with the correlation and significance values to a new NETCDF file. <br>
> How export variables r and sig for a new NETCDF file? <br>
> Can anybody help me? Thank you very much in advance.<br>
> <br>
> begin<br>
> <br>
> f = addfile("Grid_Data/GPCP/aprecip_anomalia_temporal_DJF.nc", "r")<br>
> g = addfile("Grid_Data/ERSSTV5/nino34_DJF.nc", "r")<br>
> <br>
> ;get variables<br>
> ppt = f->precip<br>
> asst = g->asst<br>
> <br>
> ; Fix missing values<br>
> asst@_FillValue = 9.96921e36<br>
> asst@missing_value = 9.96921e36<br>
> <br>
> ppt@_FillValue = 9.96921e36<br>
> ppt@missing_value = 9.96921e36<br>
> <br>
> <br>
> x = ppt(:,:,:) ; grid data<br>
> y = asst(:,0,0) ; time series<br>
> <br>
> ; Calculate correlation between variables <br>
> r = escorc_n(x,y,0,0)<br>
> <br>
> ; get coordinates<br>
> var = x(0,:,:)<br>
> copy_VarCoords(var,r)<br>
> <br>
> ; Get size of dimensions<br>
> dim = dimsizes(ppt)<br>
> ;Get size of dimension time<br>
> nt = dim(0)<br>
> <br>
> ;Significance Test<br>
> sig = rtest(r,nt,0)<br>
> ;printVarSummary(sig)<br>
> <br>
> ; get coordinates<br>
> copy_VarCoords(var,sig)<br>
> ;printVarSummary(sig)<br>
> <br>
> end<br>
> ;====================================================<br>
> Variable: ppt<br>
> Type: float<br>
> Total Size: 4852224 bytes<br>
> 1213056 values<br>
> Number of Dimensions: 3<br>
> Dimensions and sizes: [time | 117] x [lat | 72] x [lon | 144]<br>
> Coordinates:<br>
> time: [ 0..14213]<br>
> lat: [-88.75..88.75]<br>
> lon: [1.25..358.75]<br>
> Number Of Attributes: 2<br>
> _FillValue : 9.96921e+36<br>
> missing_value : 9.96921e+36<br>
> ncl 39><br>
> ;=================================================<br>
> printVarSummary(sig) <br>
> Variable: sig<br>
> Type: float<br>
> Total Size: 41472 bytes<br>
> 10368 values<br>
> Number of Dimensions: 2<br>
> Dimensions and sizes: [lat | 72] x [lon | 144]<br>
> Coordinates:<br>
> lat: [-88.75..88.75]<br>
> lon: [1.25..358.75]<br>
> ;=============================================<br>
> <br>
> printVarSummary(r)<br>
> <br>
> Variable: r<br>
> Type: float<br>
> Total Size: 41472 bytes<br>
> 10368 values<br>
> Number of Dimensions: 2<br>
> Dimensions and sizes: [lat | 72] x [lon | 144]<br>
> Coordinates:<br>
> lat: [-88.75..88.75]<br>
> lon: [1.25..358.75]<br>
> Number Of Attributes: 1<br>
> _FillValue : 9.96921e+36<br>
> ;===================================================================<br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><font face="verdana, sans-serif"><font color="#666666"><span style="font-size:11.3333px"><b>Luiz Octavio Fabricio dos Santos</b></span></font></font></div><font face="verdana, sans-serif"><font color="#666666"><span style="font-size:11.3333px"><div><font face="verdana, sans-serif"><font color="#666666"><span style="font-size:11.3333px"><br></span></font></font></div>Bacharel em Engenharia Ambiental pela Universidade Federal do Amazonas - UFAM</span></font><br>
</font><p class="MsoNormal"><font face="verdana, sans-serif"><span style="font-size:8.5pt;color:rgb(102,102,102);background-image:initial;background-position:initial;background-repeat:initial">Mestrando no Programa de Pós Graduação em Fisica Ambiental pela Universidade
Federal de Mato Grosso - UFMT/PPGFA.</span><span></span></font></p>
<p class="MsoNormal"><span style="font-size:8.5pt;color:rgb(102,102,102);background-image:initial;background-position:initial;background-repeat:initial"><font face="verdana, sans-serif">Integrante do Grupo de Pesquisa Interação
Biosfera Atmosfera da Universidade Federal de Mato Grosso - GPIBA/UFMT.</font></span><span></span></p><p class="MsoNormal"><span style="font-size:8.5pt;color:rgb(102,102,102);background-image:initial;background-position:initial;background-repeat:initial"><font face="verdana, sans-serif"><br></font></span></p><p class="MsoNormal"><font color="#666666" face="verdana, sans-serif"><span style="font-size:11.3333px">CV:</span></font><a title="Endereço para acessar este CV:" href="https://wwws.cnpq.br/cvlattesweb/PKG_MENU.menu?f_cod=7AA7B54D8C2855B4BAA05894276A6FD7#" style="margin:0px;padding:0px;color:rgb(50,110,155);font-family:Tahoma,Geneva,sans-serif;font-size:11px;background-color:rgb(225,234,242)" target="_blank"><b style="margin:0px;padding:0px">http://lattes.cnpq.br/0811571185673375</b></a></p></div></div>