<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>Just thought I would share a small bug in merge_amr.pro (included in tools/fidlr3), and the fix to the bug. Currently, if you try to downsample more than a few levels in a 3d dataset, the exits with an error. The fix is simple, simply copy the lines from the block inclusion routine for the 2d case (lines 402 and 403) to the 3d case within merge_amr.pro. The new block of code should look like this:</div><div><br></div><div><div>400 case params.ndim of                                                                                                                                                                                                                                                                                           </div><div>401   2: plotBlocks = where(((tree[*].nodeType EQ 1 AND $                                                                                                                                                                                                                                                         </div><div>402                           tree[*].lrefine LT lwant) OR $                                                                                                                                                                                                                                                      </div><div>403                          (tree[*].lrefine EQ lwant)) AND $                                                                                                                                                                                                                                                    </div><div>404                         tree[*].bndBox[1,0] GE xrange[0] AND $                                                                                                                                                                                                                                                </div><div>405                         tree[*].bndBox[0,0] LE xrange[1] AND $                                                                                                                                                                                                                                                </div><div>406                         tree[*].bndBox[1,1] GE yrange[0] AND $                                                                                                                                                                                                                                                </div><div>407                         tree[*].bndBox[0,1] LE yrange[1])                                                                                                                                                                                                                                                     </div><div>408                                                                                                                                                                                                                                                                                                               </div><div>409   3: plotBlocks = where(((tree[*].nodeType EQ 1 AND $                                                                                                                                                                                                                                                         </div><div>410                           tree[*].lrefine LT lwant) OR $                                                                                                                                                                                                                                                      </div><div>411                          (tree[*].lrefine EQ lwant)) AND $                                                                                                                                                                                                                                                    </div><div>412                         tree[*].bndBox[1,0] GE xrange[0] AND $                                                                                                                                                                                                                                                </div><div>413                         tree[*].bndBox[0,0] LE xrange[1] AND $                                                                                                                                                                                                                                                </div><div>414                         tree[*].bndBox[1,1] GE yrange[0] AND $                                                                                                                                                                                                                                                </div><div>415                         tree[*].bndBox[0,1] LE yrange[1] AND $                                                                                                                                                                                                                                                </div><div>416                         tree[*].bndBox[1,2] GE zrange[0] AND $                                                                                                                                                                                                                                                </div><div>417                         tree[*].bndBox[0,2] LE zrange[1])</div></div><div><br></div><div>This will include non-leaf blocks if the requested sampling is sufficiently coarse.<br><div>
<div style="font-size: 12px; "><br class="Apple-interchange-newline">-- <br>James Guillochon<br>Department of Astronomy & Astrophysics<br>University of California, Santa Cruz<font class="Apple-style-span" color="#144FAE"><span class="Apple-style-span" style="text-decoration: underline; "><br></span></font></div><div style="font-size: 12px; "><a href="mailto:jfg@ucolick.org">jfg@ucolick.org</a></div>
</div>
<br></div></body></html>