<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.yiv7845785605msonormal, li.yiv7845785605msonormal, div.yiv7845785605msonormal
{mso-style-name:yiv7845785605msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.yiv7845785605msochpdefault, li.yiv7845785605msochpdefault, div.yiv7845785605msochpdefault
{mso-style-name:yiv7845785605msochpdefault;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.yiv7845785605msohyperlink
{mso-style-name:yiv7845785605msohyperlink;}
span.yiv7845785605msohyperlinkfollowed
{mso-style-name:yiv7845785605msohyperlinkfollowed;}
span.yiv7845785605estilodeemail17
{mso-style-name:yiv7845785605estilodeemail17;}
p.yiv7845785605msonormal1, li.yiv7845785605msonormal1, div.yiv7845785605msonormal1
{mso-style-name:yiv7845785605msonormal1;
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.yiv7845785605msohyperlink1
{mso-style-name:yiv7845785605msohyperlink1;
color:#0563C1;
text-decoration:underline;}
span.yiv7845785605msohyperlinkfollowed1
{mso-style-name:yiv7845785605msohyperlinkfollowed1;
color:#954F72;
text-decoration:underline;}
span.yiv7845785605estilodeemail171
{mso-style-name:yiv7845785605estilodeemail171;
font-family:"Calibri",sans-serif;
color:windowtext;}
p.yiv7845785605msochpdefault1, li.yiv7845785605msochpdefault1, div.yiv7845785605msochpdefault1
{mso-style-name:yiv7845785605msochpdefault1;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
span.EstiloDeEmail27
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 85.05pt 70.85pt 85.05pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=PT-BR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Muito obrigado Thiago !!!!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Vou rodar aqui e reorganizar o script!!!!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>De:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> R-br [mailto:r-br-bounces@listas.c3sl.ufpr.br] <b>Em nome de </b>Thiago V. dos Santos<br><b>Enviada em:</b> Friday, December 05, 2014 2:31 AM<br><b>Para:</b> r-br@listas.c3sl.ufpr.br<br><b>Assunto:</b> Re: [R-br] extracao da Longitude correta para dados de SST<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div id="yui_3_16_0_1_1417745344934_59630"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>Humberto,<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59630"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59630"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>Obrigado pelo exemplo completamente reprodutível.<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59631"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59632"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>O pacote ncdf não é mais atualizado pelo David Pierce e muito em breve o seu codigo pode nao mais funcionar. Use o ncdf4, que é mantido e regularmente atualizado. Ao fazer isso você terá de reformular o código, por exemplo 'open.ncdf' vira 'nc_open', mas dessa forma você garante que o seu codigo continue funcionando pelos próximos anos.<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59632"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>A solucao ideal para o seu problema seria usar a funcao 'rotate' do pacote raster mas isso não é possível porque a grade do seu arquivo não é regular. Dessa forma a minha sugestão para reprojetar a longitude 'na marra' é:<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59632"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59632"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>new_lon = ((lon + 180) %% 360) - 180<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60380"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>A diferença de 0.5 grau entre o que eu recomendo e o que você espera se deve à implementação de cada software: em alguns a coordenada é do canto da grade, enquanto em outros a coordenada é do centro da grade. Ajuste o resultado conforme a sua necessidade (i.e. new_lon <- new_lon + 0.5).<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>Por último, note também que o seu vetor de datas está incorreto porque está sendo criado de uma origem diferente da origem embebida no netcdf (ano 1900 ao invés de 1800). Uma solucao que resgata os valores de data diretamente do arquivo é a seguinte (note que as funções já são do ncdf4):<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'># get time dimension<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>t <- ncvar_get(nc,"time")<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>tunits <- ncatt_get(nc,"time","units")<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'># show "real" times<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>tustr <- strsplit(tunits$value, " ") <o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>tdstr <- strsplit(unlist(tustr)[3], "-")<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>tmonth <- as.integer(unlist(tdstr)[2])<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>tday <- as.integer(unlist(tdstr)[3])<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>tyear <- as.integer(unlist(tdstr)[1])<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_60379"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>ndate <- as.Date(chron(t, out.format='year-month-day', origin=c(tmonth, tday, tyear)))<o:p></o:p></span></p></div></div><div id="yui_3_16_0_1_1417745344934_59896"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59896"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>O vetor ndate serve para visualização das datas em um formato "humano", mas se você vai recriar o arquivo, provavelmente você montará a dimensao de tempo usando o vetor "t".<o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59896"><p class=MsoNormal style='background:white'><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><div id="yui_3_16_0_1_1417745344934_59898"><div id="yui_3_16_0_1_1417745344934_59897"><p class=MsoNormal style='background:white'><span lang=EN-US style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'>Saudações,<br>--<br>Thiago V. dos Santos<br>PhD student<br>Land and Atmospheric Science<br>University of Minnesota<br></span><span style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><a href="http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm"><span lang=EN-US>http://www.laas.umn.edu/CurrentStudents/MeettheStudents/ThiagodosSantos/index.htm</span></a></span><span lang=EN-US style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><br>Phone: (612) 323 9898<o:p></o:p></span></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt;background:white'><span lang=EN-US style='font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p></div><div><div><div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'>On Thursday, December 4, 2014 8:56 PM, Humberto <</span><span style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'><a href="mailto:hghazin@hotmail.com"><span lang=EN-US>hghazin@hotmail.com</span></a></span><span lang=EN-US style='font-size:10.0pt;font-family:"Arial",sans-serif;color:black'>> wrote:</span><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><p class=MsoNormal style='margin-bottom:12.0pt;background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'><o:p> </o:p></span></p><div><div id=yiv7845785605><div><div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>Boa noite pessoal,<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>Estou extraindo de um arquivo ncdf os valores de latitude (lat) longitude( lon) e temperatura da superfície da agua do mar( SST), entretanto a longitude (lon) ela está na projeção 0 a 360 graus. Minha pergunta é como faço para converter ela para -180 a 180 graus? Segue o script que estou utilizando juntamente com o link dos dados.<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>Desde já agradeço a ajuda <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>Humberto <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=450 style='width:337.5pt;border-collapse:collapse'><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><div><p class=MsoNormal><span style='color:black'> lon</span><o:p></o:p></p></div></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><div><p class=MsoNormal><span style='color:black'> lat</span><o:p></o:p></p></div></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><div><p class=MsoNormal><span style='color:black'> data</span><o:p></o:p></p></div></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><div><p class=MsoNormal><span style='color:black'> sst</span><o:p></o:p></p></div></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><div><p class=MsoNormal><span style='font-size:10.0pt'> Lon como deveria ser</span><o:p></o:p></p></div></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>299.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>27.85</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-60.000</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>300.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>27.96</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-59.500</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>301.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>28.02</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-58.500</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>302.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>28.02</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-57.500</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>303.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>27.97</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-56.500</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>304.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>27.84</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-55.500</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>305.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>27.81</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-54.500</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>306.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>27.78</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-53.500</span><o:p></o:p></p></td></tr><tr style='height:15.0pt'><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>307.5</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>10.5</span><o:p></o:p></p></td><td width=77 nowrap valign=bottom style='width:58.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>11/30/1981</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>27.75</span><o:p></o:p></p></td><td width=64 nowrap valign=bottom style='width:48.0pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'> </span><o:p></o:p></p></td><td width=117 nowrap valign=bottom style='width:87.5pt;padding:0in 3.5pt 0in 3.5pt;height:15.0pt'><p class=MsoNormal align=right style='text-align:right'><span style='color:black'>-52.500</span><o:p></o:p></p></td></tr></table><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>Link para acesso dos dados <a href="https://www.dropbox.com/s/xnab2g365mduykx/SST_81_14.nc?dl=0" target="_blank">https://www.dropbox.com/s/xnab2g365mduykx/SST_81_14.nc?dl=0</a><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>Script:<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>require(ncdf) #'ncdf' versao 1.6.6</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>require(reshape)</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>require(chron)</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'> </span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>###sst</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>nc <- open.ncdf("SST_81_14.nc")</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>nc</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'> </span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>lat <- get.var.ncdf(nc, "lat")</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>lon <- get.var.ncdf(nc, "lon")</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>tunits <- att.get.ncdf(nc,"time","units")</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'> </span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'># print tunits</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>tunits$value</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'> </span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'># criar tempo "real" Times</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>time<- get.var.ncdf(nc,"time")</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>Time<-chron(time,origin=c(month=1, day=1, year=1900))</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'> </span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>## array da variavel sst<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>wm <- get.var.ncdf(nc, "sst")<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>str(wm)<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>## atribuindo dimnames conforme lon, lat e tempo<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>dimnames(wm)[[1]] <- as.character(lon)</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>dimnames(wm)[[2]] <- as.character(lat)</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span lang=EN-US style='font-family:"Helvetica",sans-serif;color:black'>dimnames(wm)[[3]] <- as.character(Time)</span><span style='font-family:"Helvetica",sans-serif;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>str(wm)<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'> <o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>## melt para reestruturação dos dados<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>mwm <- melt(wm)<o:p></o:p></span></p></div><div><p class=MsoNormal style='background:white'><span style='font-family:"Helvetica",sans-serif;color:black'>head(mwm)<o:p></o:p></span></p></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt;background:white'><span style='font-family:"Helvetica",sans-serif;color:black'><br>_______________________________________________<br>R-br mailing list<br><a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br><a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<o:p></o:p></span></p></div></div></div></div></div></div></body></html>