| 175 | ! Physical bounds of boxes |
| 176 | box_0=64000*reshape((/-1,-1,-1,1,1,1/),(/3,2/)) |
| 177 | box_4=4000*reshape((/-1,-1,-1,1,1,1/),(/3,2/)) |
| 178 | box_7=750*reshape((/-1,-1,-1,1,1,1/),(/3,2/)) |
| 179 | |
| 180 | ! index of boxes in each level's index space |
| 181 | ibox_0=nint(box_0-spread(GxBounds(:,1),2,2))/levels(0)%dx + spread((/1,0/),1,3) |
| 182 | if (maxlevel >= 4) then |
| 183 | ibox_4=nint(box_4-spread(GxBounds(:,1),2,2))/levels(4)%dx + spread((/1,0/),1,3) |
| 184 | if (maxlevel >= 7) then |
| 185 | ibox_7=nint(box_7-spread(GxBounds(:,1),2,2))/levels(7)%dx + spread((/1,0/),1,3) |
| 186 | end if |
| 187 | end if |
| 188 | |
| 189 | |
| 190 | CASE(0) |
| 191 | open(unit=195,file='NewLargeGrid_density_g_cm3_grid.dat',status='old',form='formatted',action='read') |
| 192 | open(unit=196,file='NewLargeGrid_v_x_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 193 | open(unit=197,file='NewLargeGrid_v_y_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 194 | open(unit=198,file='NewLargeGrid_v_z_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 195 | open(unit=199,file='NewLargeGrid_u_erg_g_grid.dat',status='old',form='formatted',action='read') |
| 196 | ibox=ibox_0 |
| 197 | CASE(4) |
| 198 | open(unit=195,file='NewMedGrid_density_g_cm3_grid.dat',status='old',form='formatted',action='read') |
| 199 | open(unit=196,file='NewMedGrid_v_x_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 200 | open(unit=197,file='NewMedGrid_v_y_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 201 | open(unit=198,file='NewMedGrid_v_z_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 202 | open(unit=199,file='NewMedGrid_u_erg_g_grid.dat',status='old',form='formatted',action='read') |
| 203 | ibox=ibox_4 |
| 204 | CASE(7) |
| 205 | open(unit=195,file='NewSmallGrid_density_g_cm3_grid.dat',status='old',form='formatted',action='read') |
| 206 | open(unit=196,file='NewSmallGrid_v_x_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 207 | open(unit=197,file='NewSmallGrid_v_y_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 208 | open(unit=198,file='NewSmallGrid_v_z_cm_s_grid.dat',status='old',form='formatted',action='read') |
| 209 | open(unit=199,file='NewSmallGrid_u_erg_g_grid.dat',status='old',form='formatted',action='read') |
| 210 | ibox=ibox_7 |