<div dir="ltr"><span style="font-variant-ligatures:no-common-ligatures"></span><div><br></div><div><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:menlo"><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">Variable: svd_slp_season</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span style="white-space:pre-wrap" class="gmail-m_-7048412118403529033gmail-m_5559791671599231534Apple-tab-span">        </span>[season | 4] x [nsvd | 2] x [lat | 19] x [lon | 144]</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures"> lat: [-90..-45]</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures"> lon: [ 0..357.5]</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo;min-height:21px"><font size="2"><span style="font-variant-ligatures:no-common-ligatures"></span><br></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">Variable: svd_sst_season</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 4</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span style="white-space:pre-wrap" class="gmail-m_-7048412118403529033gmail-m_5559791671599231534Apple-tab-span">        </span>[season | 4] x [nsvd | 2] x [lat | 35] x [lon | 360]</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures"> lat: [-45.5..-79.5]</span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures"> lon: [0.5..359.5]<br><br></span></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"><span style="font-variant-ligatures:no-common-ligatures">The 1st variable<br><br></span>ncdf->svd_slp_season = svd_slp_season<br><br></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2">wrote the lat and lon as size 19 and 144<br></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"> lat(lat) ; lat(19)<br></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2"> lon(lon) ; lon(144)<br></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2">-----<br></font></div><div style="margin:0px;line-height:normal;font-family:menlo"><font size="2">The 2nd write tried to write lat and lon as sizes 35 and 360<br><br></font></div><font size="2"><span style="font-variant-ligatures:no-common-ligatures"></span>ncdf->svd_sst_season = svd_sst_season<br></font></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:menlo"><font size="2"> lat(lat) ; lat(35)<br></font></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:menlo"><font size="2"> lon(lon) ; lon(360)<br><br></font></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:menlo"><font size="2">You can not have it both ways.<br><br></font></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:menlo"><font size="2">Maybe rename the 2nd set as:<br><br></font></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:menlo"><font size="2"> LAT(LAT) <br></font></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:menlo"><font size="2"> LON(LON)<br></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 6:06 PM, 林祥 <span dir="ltr"><<a href="mailto:xianglin72@icloud.com" target="_blank">xianglin72@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi, all</div><div><br></div><div> I want to output the result of SVD for SLP and SIC, but met some puzzling error as below :</div><div><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">fatal:Dimension sizes of left hand side do not match right hand side</span></div><div><span style="font-family:Menlo;font-size:18px">fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 214 in file svd_sic_slp_season.ncl</span> </div><div><br></div><div><br></div><div>and here below is some part of my scripts</div><div><br></div><div> system("rm -f " + output_filename + ".nc") ; remove any pre-existing file</div><div> ncdf = addfile(output_filename+".nc",<wbr>"c") ; open output netCDF file</div><div><br></div><div> ;=============================<wbr>==============================<wbr>========</div><div> ; create global attributes of the file (optional)</div><div> ;=============================<wbr>==============================<wbr>========</div><div> fAtt = True ; assign file attributes</div><div> ; fAtt@title = "NSIDC Bootstrap sea ice concentration"</div><div> ;fAtt@source_file = "<a href="http://original-file.nc" target="_blank">original-file.nc</a>"</div><div> ;fAtt@Conventions = "None"</div><div> fAtt@creation_date = systemfunc ("date")</div><div> fileattdef( ncdf, fAtt ) ; copy file attributes</div><div> ;=============================<wbr>==============================<wbr>========</div><div> ; make time an UNLIMITED dimension; recommended for most applications</div><div> ;=============================<wbr>==============================<wbr>========</div><div> filedimdef(ncdf,"time",-1,<wbr>True) </div><div> ;=============================<wbr>==============================<wbr>========</div><div> ; output variables directly; NCL will call appropriate functions</div><div> ; to write the meta data associated with each variable</div><div> ;=============================<wbr>==============================<wbr>========</div><div> ncdf->svd_slp_season = svd_slp_season</div><div>212 printVarSummary(svd_slp_<wbr>season)</div><div>213 printVarSummary(svd_sst_<wbr>season)</div><div>214 ncdf->svd_sst_season = svd_sst_season ; error occurred at or near this line</div><div> ncdf->ts_slp_season = ts_slp_season</div><div> ncdf->ts_sst_season = ts_sst_season</div><div><br></div><div><br></div><div>and here below is the information from printVarSummary in line 213 and 212 </div><div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Variable: svd_slp_season</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Type: float</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Total Size: 87552 bytes</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> 21888 values</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 4</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="m_-1025508811302701187Apple-tab-span" style="white-space:pre-wrap">        </span>[season | 4] x [nsvd | 2] x [lat | 19] x [lon | 144]</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> lat: [-90..-45]</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> lon: [ 0..357.5]</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 1</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> _FillValue :<span class="m_-1025508811302701187Apple-tab-span" style="white-space:pre-wrap">        </span>9.96921e+36</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo;min-height:21px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Variable: svd_sst_season</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Type: float</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Total Size: 403200 bytes</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> 100800 values</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number of Dimensions: 4</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Dimensions and sizes:<span class="m_-1025508811302701187Apple-tab-span" style="white-space:pre-wrap">        </span>[season | 4] x [nsvd | 2] x [lat | 35] x [lon | 360]</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Coordinates: </span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> lat: [-45.5..-79.5]</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> lon: [0.5..359.5]</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Number Of Attributes: 1</span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"> _FillValue :<span class="m_-1025508811302701187Apple-tab-span" style="white-space:pre-wrap">        </span>-1e+30</span></div></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">I am puzzled why the error occurred in writing “svd_sst_season”.</div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">The whole script was also attached and SLP data is from NCEP monthly reanalysis.derived and SIC is </div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">from HadISST2.2 (<a href="http://www.metoffice.gov.uk/hadobs/hadisst2/data/download.html" target="_blank">http://www.metoffice.gov.uk/<wbr>hadobs/hadisst2/data/download.<wbr>html</a>)</div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">Thank</div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo">Lin</div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><br></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"></div></div><br><div style="word-wrap:break-word"><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"></div><div style="margin:0px;font-size:18px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>