I have been writing an adaptive mesh refinement (amr) code. As a prototype for the code, I have been looking at an adaptive mesh refinement code written by my adviser (written in c). I find looking at their code to be useful, but the also does things like make heavy use of global variables, and I am wondering if there are potentially better ways of implementing Berger and Oliger syle amr.
Could someone point me to some source code for a simple (say one dimensional) amr code for hyperbolic pde? I'd like to compare and contrast with what my adviser wrote (which is not publicly available so I unfortunately cannot link to it here). I have been looking at the websites or other amr codes (e.g. chombo) but I haven't found simple example implementation of the basic Berger and Oliger algorithm. Links to, for example public github repositories would work.
EDIT: while there is now an "accepted" answer (a link to Berger's website which includes documentation on amr code), that code is mostly written in Fortran; I would certainly appreciate links to example amr codes with documentation written in other languages (e.g. c++)!