ascl_id stringclasses 752
values | repo_url stringclasses 737
values | file_path stringlengths 4 194 | content large_stringlengths 1 1M | language stringclasses 29
values | license_type stringclasses 24
values | size int64 1 1M |
|---|---|---|---|---|---|---|
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/markedpart2prof.f90 | program part2prof
!--------------------------------------------------------------------------
! Ce programme calcule la carte de densite surfacique projetee
! des particules de matiere noire d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!--------------------------------------------------... | Fortran | null | 26,146 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/README.md | # Utils
This folder contains programs to extract information from RAMSES outputs. Visit [the wiki](https://bitbucket.org/rteyssie/ramses/wiki/RAMSES%20utils) for more information.
| Markdown | null | 181 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/defrag.f90 | program defrag
!---------------------------------------------------------------------
! Ce programme lit le header d'un fichier amr.out d'une simulation RAMSES
! Version F90 par R. Teyssier le 28/02/00
! Version parallele par R. Teyssier le 13/06/03
! f90 head_amr.f90 -o ~/bin/header
!----------------------... | Fortran | null | 14,845 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/amr2cell.f90 | program amr2cell
!--------------------------------------------------------------------------
! Ce programme calcule le cube cartesien pour les
! variables hydro d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!--------------------------------------------------------------------------
imp... | Fortran | null | 19,066 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/part2cylprof.f90 | program part2cylprof
!--------------------------------------------------------------------------
! Ce programme calcule la carte de densite surfacique projetee
! des particules de matiere noire d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!-----------------------------------------------... | Fortran | null | 25,717 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/sod.f90 | program sphericaloverdensity
!---------------------------------------------------------------------
! Ce programme calcule la fonction de masse avec
! l'algorithme SPHERICAL OVERDENSITY.
! Ce programme doit lire en input les fichiers suivants:
! - un fichier resultat RAMSES: part_00600.out
! Il ... | Fortran | null | 17,856 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/amr2prof.f90 | program amr2prof
use io_ramses
use random
!--------------------------------------------------------------------------
!--------------------------------------------------------------------------
implicit none
integer::ndim,ncell,n,i,j,k,twotondim,ncoarse,type=0,domax=0
integer::ivar,nvar,ncpu,ncpuh,lmax=1... | Fortran | null | 13,172 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/mpeg.txt | # parameter file template with lots of comments to assist you
#
# you can use this as a template, copying it to a separate file then modifying
# the copy
#
#
# any line beginning with '#' is a comment
#
# no line should be longer than 255 characters
#
#
# general format of each line is:
#
#
# lines can generally be in ... | Text | null | 3,150 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/markedpart2cylprof.f90 | program markedpart2cylprof
!--------------------------------------------------------------------------
! Ce programme calcule la carte de densite surfacique projetee
! des particules de matiere noire d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!-----------------------------------------... | Fortran | null | 24,889 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/utils.f90 | module utils
use iso_fortran_env
implicit none
#ifdef longint
integer, parameter :: i8b = 8
#else
integer, parameter :: i8b = 4
#endif
interface hilbert3d
subroutine hilbert3d_single(x,y,z,order,bit_length,npoint)
integer, intent(in) :: bit_length, npoint
integer, intent(in)::x,y,z
... | Fortran | null | 19,961 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/amr2tipsy.f90 | program amr2tipsy
use io_ramses
!--------------------------------------------------------------------------
!--------------------------------------------------------------------------
implicit none
integer::ndim,ncell,n,i,j,k,twotondim,ncoarse,type=0,domax=0
integer::ivar,nvar,ncpu,ncpuh,lmax=0,nboundary,n... | Fortran | null | 6,844 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/part2sfr.f90 | program part2sfr
use utils
!--------------------------------------------------------------------------
! This program calculates SFR rate of star particls in a given number of
! bins from an output of RAMSES simulation
! Version F90 par R. Teyssier le 01/04/01.
!--------------------------------------------... | Fortran | null | 12,820 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/part2prof_v2.f90 | program part2prof
use io_ramses
!--------------------------------------------------------------------------
! Ce programme calcule la carte de densite surfacique projetee
! des particules de matiere noire d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!---------------------------------... | Fortran | null | 37,468 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/histo.f90 | program histo_main
!--------------------------------------------------------------------------
! Ce programme calcule un histogramme 2D dans le plan rho-T
! d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!--------------------------------------------------------------------------
implici... | Fortran | null | 23,644 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/part2list.f90 | program part2list
!--------------------------------------------------------------------------
! This software extracts particle from a region.
! Version F90 by R. Teyssier le 01/04/01.
! Update for new tracers by C. Cadiou, M. Trebitsch, H. Choi, O. Snaith and R. Bieri
!---------------------------------------... | Fortran | null | 14,613 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/icupgrade.f90 | program icupgrade
implicit none
integer::i1,i2,i3,i,j,k,narg,iargc,i_file
integer(kind=4)::np1,np2,np3
integer(kind=4)::np1o2,np2o2,np3o2
real::dx,dx2,x1o,x2o,x3o,astart,omegam,omegav,h0
real,dimension(:,:,:),allocatable::f,f2
character*80::input,output
character*80,dimension(2)::filename
logical::ok... | Fortran | null | 3,970 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/extract_grafic.f90 | program extract_grafic
!---------------------------------------------------------------------
! Ce programme extrait un sous-cube des fichiers ic_... generes
! par GRAFIC.
! Ce programme doit lire en input les fichiers suivants:
! - un fichier deltab: input/ic_deltab
! - un fichier velbx:... | Fortran | null | 5,075 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/quick.sh | #! /bin/bash
#bin='/project/s201/martdav/ramses/utils/f90/zoom_ic/'
cd /scratch/rosa/martdav/ref_box/dmo/
a=$1
count='0000'$a
if [ $a -ge 10 ]; then
count='000'$a
fi
if [ $a -ge 100 ]; then
count='00'$a
fi
echo output_$count
aexp=`grep aexp output_$count/info_* | cut -d = -f 2`
echo 'aexp='$aexp
redshift=`ec... | Shell | null | 4,048 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/degrade_grafic.f90 | program degrade_grafic
implicit none
!========================================================
! Ce programme degrade des fichiers de conditions initiales
! generes par GRAFIC par un facteur 2.
!
! Ce programme doit lire en input les fichiers suivants:
! - un fichier deltab: input/ic_deltab
! ... | Fortran | null | 4,959 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/geticmask.f90 | program icmask
use utils
!--------------------------------------------------------------------------
! Ce programme calcule la carte de densite surfacique projetee
! des particules de matiere noire d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!-----------------------------------------... | Fortran | null | 24,188 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/icinject.f90 | program icdegrade
implicit none
integer::i1,i2,i3,i,j,k,narg,iargc,i_file,ii,jj,kk,xstart,ystart,zstart
integer(kind=4)::np1,np2,np3
integer(kind=4)::hnp1,hnp2,hnp3
real::dx,x1o,x2o,x3o,astart,omegam,omegav,h0
real::hdx,hx1o,hx2o,hx3o
real,dimension(:,:,:),allocatable::f,f2
character*80::input,output
... | Fortran | null | 4,657 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/center_grafic.f90 | program center_grafic
!---------------------------------------------------------------------
! Ce programme recentre autour d'un pixel donne les fichiers ic_...
! generes par GRAFIC.
! Ce programme doit lire en input les fichiers suivants:
! - un fichier deltab: input/ic_deltab
! - un fich... | Fortran | null | 6,503 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/icdegrade.f90 | program icdegrade
implicit none
integer::i1,i2,i3,i,j,k,narg,iargc,i_file
integer(kind=4)::np1,np2,np3
integer(kind=4)::np1o2,np2o2,np3o2
real::dx,dx2,x1o,x2o,x3o,astart,omegam,omegav,h0
real,dimension(:,:,:),allocatable::f,f2
character*80::input,output
character*80,dimension(2)::filename
logical::ok... | Fortran | null | 4,186 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/geticref.f90 | program icrefine
!--------------------------------------------------------------------------
! Ce programme calcule la carte de densite surfacique projetee
! des particules de matiere noire d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!---------------------------------------------------... | Fortran | null | 18,263 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/icextract.f90 | program icextract
!---------------------------------------------------------------------
! Ce programme extrait un sous-cube des fichiers ic_... generes
! par GRAFIC.
! - un fichier mask : input/ic_refmap
! - un fichier matals: input/ic_pvar_00001
! Il genere en output les fichiers sui... | Fortran | null | 3,729 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/center_whitenoise.f90 | program center_whitenoise
!---------------------------------------------------------------------
! Ce programme recentre autour d'un pixel donne les fichiers ic_...
! generes par GRAFIC.
! Ce programme doit lire en input les fichiers suivants:
! - un fichier white noise
! Il genere en output les fi... | Fortran | null | 3,739 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/zoom_ic/get_music_refmask.f90 | program get_music_refmask
!--------------------------------------------------------------------------
! Extract a mask to use in combination with MUSIC.
! Version F90 by R. Teyssier on 01/04/01.
! Modifier by C. Cadiou on 27/11/17.
!--------------------------------------------------------------------------
... | Fortran | null | 15,655 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/slice.c | /* SLICE.C, Daniel Eisenstein, 1997 */
/* Based on a paper by Daniel Eisenstein & Piet Hut,
"HOP: A New Group-Finding Algorithm for N-body Simulations."
See the included documentation or view it at
http://www.sns.ias.edu/~eisenste/hop/hop_doc.html */
/* Version 1.0 (12/15/97) -- Original Release */
/* Version 1.1 (0... | C | null | 12,360 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/halo_evolution_2.f90 | program halo_evolution
implicit none
integer::ncpu,ndim,npart,i,j,n,n_2,icpu,ipos,nstar,ngroup,halo_nr,k,cou,ida,test_1,test_2,ngroup_2,group_ida_2
integer::ncpu2,npart2,ndim2,id_group,h,npart3,npart4,npart5,npart6,n_list,npart7,outf
integer,dimension(:),allocatable::group_id,n_group,group_id_2,group_id_3,list... | Fortran | null | 19,396 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/halo_evolution.f90 | program halo_evolution
implicit none
integer::ncpu,ndim,npart,i,j,n,n_2,icpu,ipos,nstar,ngroup,halo_nr,k,cou,ida,test_1,test_2,ngroup_2,group_ida_2
integer::ncpu2,npart2,ndim2,id_group,h,npart3,npart4,npart5,npart6,n_list,npart7,outf
integer,dimension(:),allocatable::group_id,n_group,group_id_2,group_id_3,list... | Fortran | null | 19,331 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/hop.c | /* HOP.C -- Daniel Eisenstein, 1997
Based on a paper by Daniel Eisenstein & Piet Hut,
"HOP: A New Group-Finding Algorithm for N-body Simulations."
See the included documentation or view it at
http://www.sns.ias.edu/~eisenste/hop/hop_doc.html */
/* main() was customized from that of SMOOTH v2.0.1, by Joachim Stadel
... | C | null | 32,884 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/hop_input.c | /* HOP_INPUT.C, Daniel Eisenstein, 1997 */
/* Based on a paper by Daniel Eisenstein & Piet Hut,
"HOP: A New Group-Finding Algorithm for N-body Simulations."
See the included documentation or view it at
http://www.sns.ias.edu/~eisenste/hop/hop_doc.html */
/* Version 1.0 (12/15/97) -- Original Release */
/* The routi... | C | null | 21,977 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/test_input.c |
void main
{
return;
}
int ReadRamses(KD kd,FILE *fp)
{
int dummy,npart,i,j,ncpu,ndim;
float *temp;
fread(&dummy, sizeof(dummy), 1, fp);
fread(&ncpu, sizeof(ncpu), 1, fp);
fread(&dummy, sizeof(dummy), 1, fp);
fread(&dummy, sizeof(dummy), 1, fp);
fread(&ndim, sizeof(ndim), 1, fp);
fread(&dummy, ... | C | null | 1,554 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/slice.h | /* SLICE.H, Daniel Eisenstein, 1997 */
/* Based on a paper by Daniel Eisenstein & Piet Hut,
"HOP: A New Group-Finding Algorithm for N-body Simulations."
See the included documentation or view it at
http://www.sns.ias.edu/~eisenste/hop/hop_doc.html */
/* Version 1.0 (12/15/97) -- Original Release */
/* Version 1.1 (0... | C/C++ Header | null | 3,593 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/smooth.c | /* SMOOTH.C */
/* This was written by Joachim Stadel and the NASA HPCC ESS at
the University of Washington Department of Astronomy as part of
the SMOOTH program, v2.0.1.
URL: http://www-hpcc.astro.washington.edu/tools/SMOOTH */
/* DJE--I have removed unneeded subroutines, notably those having
to do with velocity field... | C | null | 10,566 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/kd.c | /* KD.C */
/* This was written by Joachim Stadel and the NASA HPCC ESS at
the University of Washington Department of Astronomy as part of
the SMOOTH program, v2.0.1.
URL: http://www-hpcc.astro.washington.edu/tools/SMOOTH */
/* DJE--I have removed all the subroutines not used by HOP, notably
the input and output routin... | C | null | 4,249 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/hop_doc.txt | HOP
What is HOP and what does it do?
HOP is an algorithm for finding groups of particles based on their
instantaneous densities. Roughly speaking, it works by connecting particles
to nearby particles in the direction of increasing density. We have
described the method in our paper... | Text | null | 27,674 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/smooth.h | /* SMOOTH.H */
/* This was written by Joachim Stadel and the NASA HPCC ESS at
the University of Washington Department of Astronomy as part of
the SMOOTH program, v2.0.1.
URL: http://www-hpcc.astro.washington.edu/tools/SMOOTH */
/* DJE--I have made a few additions to the SMX structure
in order to store information nece... | C/C++ Header | null | 3,687 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/kd.h | /* KD.H */
/* This was written by Joachim Stadel and the NASA HPCC ESS at
the University of Washington Department of Astronomy as part of
the SMOOTH program, v2.0.1.
URL: http://www-hpcc.astro.washington.edu/tools/SMOOTH */
/* DJE--I have made a few alterations to the PARTICLE structure
in order to reduce memory consu... | C/C++ Header | null | 3,348 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/poshalo.f90 | program poshalo
implicit none
integer::ncpu,ndim,npart,i,j,icpu,ipos,nstar,ngroup
integer::idummy
integer::ncpu2,npart2,ndim2,id_group
integer,dimension(:),allocatable::group_id,n_group
real(kind=8),dimension(:),allocatable::xref_group,yref_group,zref_group
logical,dimension(:),allocatable::flag_group
r... | Fortran | null | 9,115 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/f90/hop_ramses/regroup.c | /* REGROUP.C, Daniel Eisenstein, 1997 */
/* Based on a paper by Daniel Eisenstein & Piet Hut,
"HOP: A New Group-Finding Algorithm for N-body Simulations."
See the included documentation or view it at
http://www.sns.ias.edu/~eisenste/hop/hop_doc.html */
/* Version 1.0 (12/15/97) -- Original Release */
/* Version 1.1 ... | C | null | 31,443 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/sink_plot_mass_evo.py | from matplotlib import pyplot as plt
from numpy import loadtxt
from argparse import ArgumentParser
def main():
# parsing arguments
parser = ArgumentParser(description = "Analyze mass evolution of sink")
parser.add_argument('--dir', dest='dir', type=str, \
default=None, help='Directory')
args = parser.parse_a... | Python | null | 1,302 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/sed_utils.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Utilities for converting spectral energy distribution (SED) tables to
RAMSES-RT readable format, from the formats of Bruzual & Charlot (2003)
and Starburst99. Routines are also included to plot the RAMSES-readable
SEDs and the derived radiation group properties.
The ... | Python | null | 23,570 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/map2mp4.py | #!/usr/bin/env python
import sys
import numpy
import os
import warnings
import fortranfile
from argparse import ArgumentParser
import subprocess
import matplotlib
# try to use agg backend as it allows to render movies without X11 connection
try:
matplotlib.use('agg')
except:
pass
from matplotlib i... | Python | null | 20,993 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/frame2img.py | #!/usr/bin/env python
import sys
import numpy
import pylab
import Image
import fortranfile
from optparse import OptionParser
def main():
# Parse command line arguments
parser = OptionParser()
parser.usage = "%prog [options] map_file"
parser.add_option('-l','--logscale',dest='logscale', action='store_true', \
... | Python | null | 3,519 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/map2img.py | #!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
from scipy.io import FortranFile
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("file", help="enter filename dens.map")
parser.add_argument("--log", help="plot log variable",action="store_true")
parser.add_argument("--out"... | Python | null | 1,011 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/fortranfile.py | # Copyright 2008-2010 Neil Martinsen-Burrell
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | Python | null | 8,483 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/widgets.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# progressbar - Text progress bar library for Python.
# Copyright (c) 2005 Nilton Volpato
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; ei... | Python | null | 11,170 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/mergertreeplot.py | #!/usr/bin/env python3
#===============================================================================
shorthelp="""
Create a plot for the merger tree of a given clump/halo as the root of the tree
of the ramses merger tree data output.
Usage: mergertreeplot.py [-options] <halo-ID>
<halo-ID>: clump ID of halo i... | Python | null | 98,743 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/ramses_io.py | import numpy as np
import matplotlib
from matplotlib import pyplot as plt
from scipy.io import FortranFile
from tqdm import tqdm
from astropy.io import ascii
import os
import time
class Cool:
"""
This is the class for RAMSES cooling table.
"""
def __init__(self,n1,n2):
"""
This functio... | Python | null | 39,464 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/progressbar.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# progressbar - Text progress bar library for Python.
# Copyright (c) 2005 Nilton Volpato
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; ei... | Python | null | 9,432 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/get_spline_coeffs.py | #!/usr/bin/env python
"""Finds most massive halo in RAMSES cosmological zoom simulation,
fits its position through cosmic times and returns namelist values
for MOVIE_PARAMS for centres"""
import os
import sys
import glob
import warnings
import numpy as np
from matplotlib import pyplot as plt
from numpy.polynomial.poly... | Python | null | 4,047 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/draw_multigrid.py | #!/usr/bin/python
# Draw multigrid levels as dumped by dump_mg_levels
import sys
from pyx import *
infile = sys.argv[1]
f = file(infile,'r')
scl = 20.0
ndim = int(f.readline())
myid = int(f.readline())
ncpu = int(f.readline())
ilevel = int(f.readline())
if (ndim != 2):
raise "Only works for ndim=2!"
prin... | Python | null | 1,280 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/compat.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# progressbar - Text progress bar library for Python.
# Copyright (c) 2005 Nilton Volpato
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; ei... | Python | null | 1,460 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/old_map2img.py | """Script to create image out of amr2map/part2map outputs"""
import os
import sys
from argparse import ArgumentParser
import numpy
import fortranfile
from matplotlib import pyplot as plt
def main():
# Parse command line
parser = ArgumentParser(description='Script to create image out of amr2map/part2map outpu... | Python | null | 3,635 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/mergertree-extract.py | #!/usr/bin/env python3
import numpy as np
import os
from sys import argv
import copy
errmsg = """
------------------------------------
mergertree-extract.py
------------------------------------
---------------
Usage
---------------
This script extracts the masses of clumps and haloes written by the merger... | Python | null | 36,252 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/amr2py/plots.py | import numpy as np
from pylab import *
def snapshots(data,zcut):
""" Plot 2d cut"""
#Plot data
figure()
xlabel('x') #assumes dir = z
ylabel('y')
title('Plot of rho')
imshow(np.transpose(data.cube[:,:,zcut]),\
extent=[data.xmin,data.xmax,data.ymin,data.ymax])
colorbar()
| Python | null | 320 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/amr2py/rd_ramses.py | from f90 import rd_data
class RamsesData:
def __init__(self,idir=1,type=1,xmin=0,xmax=1,ymin=0,ymax=1,zmin=0,zmax=1,lmax=5):
""" Read RAMSES data and return a cube """
#Read data in file
dirname='output_'+str_suffix(idir)
#Cube size parameter
n=2**lmax
nx=int((xma... | Python | null | 795 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/amr2py/f90/amr2cube.f90 | subroutine amr2cube(repository,type,xmin,xmax,ymin,ymax,zmin,zmax,lmax,&
& toto,t,n1,n2,n3)
!--------------------------------------------------------------------------
! Ce programme calcule le cube cartesien pour les
! variables hydro d'une simulation RAMSES.
! Version F90 par R. Teyssier le 01/04/01.
!... | Fortran | null | 21,220 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/amr2py/f90/amr2map.f90 | program amr2map
!! Convert Ramses output on AMR/hydro into a fits
!! Can also convert hydro data to an ascii file and/or compute the pdf
!! Based on Romain Teyssier's amr2map
!! Florent Renaud - 5 Aug 2011
implicit none
integer::i, j, k, n, impi, icpu, ilevel, iidim, ivar, ind, ipdf
character(len=5)::nchar,nch... | Fortran | null | 30,071 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/py/lib/fortranfile.py | import numpy
class FortranFile(file):
"""
Class for reading Fortran unformatted files.
"""
def __init__(self, fname, mode='rb', buf=0):
file.__init__(self, fname, mode, buf)
def read_fortran_record(self, dtype, endian="="):
""" Read a FORTRAN record of given numpy dtype """
mytype = numpy.dtype(dtype).new... | Python | null | 704 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/script_map.sh | #! /bin/bash
bin=$HOME'/bin'
a=$1
count='0000'$a
if [ $a -ge 10 ]; then
count='000'$a
fi
if [ $a -ge 100 ]; then
count='00'$a
fi
if [ $a -ge 1000 ]; then
count='0'$a
fi
echo output_$count
aexp=`grep aexp output_$count/info_* | cut -d = -f 2`
echo 'aexp='$aexp
redshift=`echo $aexp|awk '{OFMT="%.2f"; print ... | Shell | null | 2,554 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/mkdistrib.sh | #! /bin/tcsh
echo $WORKDIR
cd $WORKDIR
mkdir tmp_distrib
cd tmp_distrib
echo $ROOT
cp -r $ROOT ramses
cd ramses
rm -rf svn-commit*
rm -rf .svn
rm -rf */.svn
rm -rf */*/.svn
rm -rf */*/*/.svn
rm -rf */*/*/*/.svn
rm -rf *~
rm -rf */*~
rm -rf */*/*~
rm -rf */*/*/*~
rm -rf */*/*/*~/*~
rm -rf diffusion
rm -rf multimat
rm... | Shell | null | 1,742 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/profile.sh | #! /bin/bash
bin=$HOME'/bin'
a=$1
count='0000'$a
if [ $a -ge 10 ]; then
count='000'$a
fi
if [ $a -ge 100 ]; then
count='00'$a
fi
echo output_$count
aexp=`grep aexp output_$count/info_* | cut -d = -f 2`
lbox=`grep unit_l output_$count/info_* | cut -d = -f 2`
h0=`grep H0 output_$count/info_* | cut -d = -f 2`
ec... | Shell | null | 2,530 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/cr_write_patch.sh | #! /bin/bash
#######################################
# cr_write_patch.sh [patch dir]
# creates a .f90 file with code to
# write the patch dir content to disk
#######################################
if [ $# == 0 ]
then
echo "no patches" > .tmp_output.txt
echo " " >> .tmp_output.txt
else
PATCHDIRS=$... | Shell | null | 1,155 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/mk_cube.sh | for ((n=1; n<124; n++ ))
do
char=`sed -n ${n}p time_list.txt | cut -c 1-12`
echo ${n}' '${char}
$HOME/dom/ramses/utils/f90/amr2cube -inp ${char} -out cubes/dens_${char}.grafic -typ 1 -fil grafic -lma 10
done
| Shell | null | 217 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/map2mp4.sh | #!/bin/bash
# This script takes all snapshots made with movie scheme of RAMSES,
# produces png files with python/pyplot and converts them to
# a movie with ffmpeg
#
# Author: P. Biernacki
# biernack@physik.uzh.ch
# defining command-line arguments
dir=$1
kind=$2
step=$3
proj=$4
max=$5
# path to where your directories ... | Shell | null | 1,265 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/build_diffs.sh | # This is a little script to build the diffs for all files in a given patch directory. The
# diffs should be put under version control rather than the actual source code files. This
# makes the maintainance of RAMSES patches easier when the corresponding source code files
# change. However, it keeps alive the RAMSES p... | Shell | null | 911 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/camera.sh | for i in `\ls -d output*`; do cat ${i}/halo_0*.txt0* | sort -r -nk 2 | head -n 1; done
| Shell | null | 88 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/select_aexp.sh | #!/bin/bash
find $1 -name 'info*txt' -exec grep -H aexp '{}' + > dummy
sort dummy -o dummy_sorted
rm dummy
step=`echo $2 | awk '{print 1./$1}'`
asel_old=0.0
for ((n=1; n<=$2; n+=1)); do
asel=`echo $asel_old $step | awk '{print $1+$2}'`
mindiff=1000.
mindir='xxx'
while read line; do
tmp=`echo $li... | Shell | null | 1,011 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/list_aexp.sh | #! /bin/bash
find $1 -name 'info*txt' -exec grep -H aexp '{}' + > dummy
sort dummy
rm dummy
| Shell | null | 92 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/copy_selected.sh | #!/bin/bash
mkdir -p $2
while read line; do
cp -r $line $2
done < $1
| Shell | null | 74 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/map2qmp4.sh | #!/bin/bash
# This script takes all snapshots made with movie scheme of RAMSES,
# produces png files with python/pyplot and converts them to
# a movie with ffmpeg
#
# Author: P. Biernacki
# biernack@physik.uzh.ch
# defining command-line arguments
dir=$1
kind1=$2
kind2=$3
step=$4
proj1=$5
proj2=$6
max=$7
# path to whe... | Shell | null | 2,146 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/loop.sh |
bin=$HOME'/bin'
for ((a=10; a <= 347 ; a=a+1))
do
./script_map.sh $a
done
| Shell | null | 80 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/mk_star.sh | for ((n=1; n<124; n++ ))
do
char=`sed -n ${n}p time_list.txt | cut -c 1-12`
echo ${n}' '${char}
$HOME/dom/ramses/utils/f90/amr2cube -inp ${char} -out cubes/dens_${char}.grafic -typ 1 -fil grafic -lma 10
done
| Shell | null | 217 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/script_hop.sh | #for ((a=10; a <= 99 ; a=a+1))
#do
# echo output_000$a
# hop -in output_000$a/part_000$a.out -p 1. -o hop000$a
# regroup -root hop000$a -douter 80. -dsaddle 200. -dpeak 240. -f77 -o grp000$a
# poshalo -inp output_000$a -pre grp000$a -xmi 0.375 -xma 0.625 -ymi 0.375 -yma 0.625 -zmi 0.375 -zma 0.625
#done
for ((a=14... | Shell | null | 608 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/mkmov.sh | #! /bin/csh -f
set target = $argv[1]
echo $target
mkdir $target
set wordlist = output_*
foreach i ( $wordlist )
echo $i
amr2map -inp $i -out $target/map_$i.dat -typ 1
end
| Shell | null | 192 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/center.sh | #! /bin/bash
bin=$HOME'/bin'
a=$1
count='0000'$a
if [ $a -ge 10 ]; then
count='000'$a
fi
if [ $a -ge 100 ]; then
count='00'$a
fi
echo output_$count
aexp=`grep aexp output_$count/info_* | cut -d = -f 2`
echo 'aexp='$aexp
redshift=`echo $aexp|awk '{OFMT="%.2f"; print 1/$1-1}'`
echo 'z='$redshift
source params_... | Shell | null | 2,091 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/script_halo.sh | a=$1
if [ $a -ge 10 ]; then
count='000'$a
fi
if [ $a -ge 100 ]; then
count='00'$a
fi
if [ $a -ge 1000 ]; then
count='0'$a
fi
echo output_$count
echo "'./output_$count/' Ra3 1 $a" > inputfiles_HaloMaker.dat
source params_$count.sh
if [ $2 -eq 1 ]; then
~/HaloMaker_stars/HaloMaker ./
mv ... | Shell | null | 516 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/cr_write_makefile.sh | #! /bin/bash
#######################################
# cr_write_makefile.sh [makefile name]
# creates a .f90 file with code to
# write the Makefile content to disk
#######################################
if [ $# == 0 ]
then
exit
fi
MAKEFILE=$1
sed "s/\"/\"\"/g;s/^/ write(ilun,format)\"/;s/$/\"/" ${MAKEFILE} > ... | Shell | null | 825 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/apply_diffs.sh | # This is a little script to apply the diffs in a patch directory to the corresponding file
# in your local working tree. The idea is to keep only the diffs in the patch directories under
# version control and then apply this script to the diffs to create the actual source code files
# which are then compiled the usu... | Shell | null | 1,206 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | utils/scripts/quick_map.sh | #! /bin/bash
bin=$HOME'/bin'
a=$1
count='0000'$a
if [ $a -ge 10 ]; then
count='000'$a
fi
if [ $a -ge 100 ]; then
count='00'$a
fi
echo output_$count
aexp=`grep aexp output_$count/info_* | cut -d = -f 2`
echo 'aexp='$aexp
redshift=`echo $aexp|awk '{OFMT="%.2f"; print 1/$1-1}'`
echo 'z='$redshift
dir='y'
xc=0.4... | Shell | null | 2,319 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/godunov_utils.f90 | !###########################################################
!###########################################################
!###########################################################
!###########################################################
subroutine cmpdt(uu,gg,dx,dt,ncell)
use amr_parameters
use hydro_paramet... | Fortran | null | 32,593 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/uplmde.f90 | !###########################################################
!###########################################################
!###########################################################
!###########################################################
subroutine tracex(q,dq,c,qm,qp,dx,dt,ngrid)
use amr_parameters
use hydro... | Fortran | null | 31,225 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/cooling_fine.f90 | subroutine cooling_fine(ilevel)
use amr_commons
use hydro_commons
use cooling_module
#ifdef grackle
use grackle_parameters
#endif
use mpi_mod
implicit none
integer::ilevel
!-------------------------------------------------------------------
! Compute cooling for fine levels
!------------------------... | Fortran | null | 23,837 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/init_flow_fine.f90 | !################################################################
!################################################################
!################################################################
!################################################################
subroutine init_flow
use amr_commons
use hydro_commo... | Fortran | null | 20,611 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/courant_fine.f90 | subroutine courant_fine(ilevel)
use amr_commons
use hydro_commons
use poisson_commons
use mpi_mod
#if USE_TURB==1
use turb_commons
#endif
implicit none
#ifndef WITHOUTMPI
integer::info
real(kind=8),dimension(3)::comm_buffin,comm_buffout
#endif
integer::ilevel
!---------------------------------------... | Fortran | null | 7,129 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/grackle_parameters.F | module grackle_parameters
USE ISO_C_BINDING
implicit None
#include "grackle.def"
TYPE (grackle_units) :: my_grackle_units
TYPE (grackle_field_data) :: my_grackle_fields
TYPE (grackle_chemistry_data) :: my_grackle_data
R_PREC, TARGET :: gr_density(NVECTOR), gr_energy(NVECTOR)... | Fortran | null | 3,468 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/synchro_hydro_fine.f90 | !################################################################
!################################################################
!################################################################
!################################################################
subroutine synchro_hydro_fine(ilevel,dteff,which_force)
... | Fortran | null | 4,107 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/cooling_module_ism.f90 | !! Cooling from frig version (Audit & Hennebelle 2005)
!! solve_cooling_ism is used if there is no RT
!! Authors: Patrick Hennebelle, Benjamin Godard
!=======================================================================
subroutine solve_cooling_ism(nH,T2,dt,deltaT2,ncell)
!===========================================... | Fortran | null | 8,645 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/read_hydro_params.f90 | subroutine read_hydro_params(nml_ok)
use amr_commons
use hydro_commons
use mpi_mod
implicit none
logical::nml_ok
!--------------------------------------------------
! Local variables
!--------------------------------------------------
integer::i,idim,ifixed,nboundary_true=0
integer ,dimension(1:MAXB... | Fortran | null | 17,878 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/write_screen.f90 | subroutine write_screen
use amr_commons
use hydro_commons
use pm_commons
use poisson_commons
use mpi_mod
implicit none
#ifndef WITHOUTMPI
integer::info
#endif
integer::igrid,jgrid,ind,icpu
integer::i,icell,ncell,ilevel,ncache
integer::icellmin,nx_loc
real(dp)::dx,scale,smallp,ddd,ppp
integer ... | Fortran | null | 7,985 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/hydro_commons.f90 | module hydro_commons
use amr_parameters
use hydro_parameters
real(dp),allocatable,dimension(:,:)::uold,unew ! State vector and its update
real(dp),allocatable,dimension(:,:)::fluxes ! Mass flux on the faces of the cells
real(dp),allocatable,dimension(:)::pstarold,pstarnew ! Stellar momentum and its update
r... | Fortran | null | 930 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/eos.f90 | subroutine barotropic_eos_temperature(density, temperature)
use amr_parameters
!--------------------------------------------------------------
! This routine selects the chosen EOS and calculates the
! temperature T[in Kelvin]/mu from the density[in H/cc]
!------------------------------------------------... | Fortran | null | 1,315 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/output_hydro.f90 | subroutine backup_hydro(filename, filename_desc)
use amr_commons
use hydro_commons
use dump_utils, only : dump_header_info, generic_dump, dim_keys
use mpi_mod
implicit none
#ifndef WITHOUTMPI
integer :: dummy_io, info2
#endif
character(len=80), intent(in) :: filename, filename_desc
integer :: i, ivar,... | Fortran | null | 6,218 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/hydro_parameters.f90 | module hydro_parameters
#ifdef grackle
use grackle_parameters
#endif
use amr_parameters
! Number of independant variables
#ifndef NENER
integer,parameter::nener=0
#else
integer,parameter::nener=NENER
#endif
#ifndef NVAR
integer,parameter::nvar=ndim+2+nener
#else
integer,parameter::nvar=NVAR
#endif
! S... | Fortran | null | 2,938 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/interpol_hydro.f90 | !###########################################################
!###########################################################
!###########################################################
!###########################################################
subroutine upload_fine(ilevel)
use amr_commons
use hydro_commons
impli... | Fortran | null | 17,744 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/cooling_module.f90 | !=============================================================================
! SUPERMEGAGIGAMODULECOOLINGQUIDEPOTE
!=============================================================================
! Les subroutines et fonctions d'interet general sont :
!
! ROUTINES A APPELER PAR LE CODE HYDRO
!
! su... | Fortran | null | 67,158 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/init_hydro.f90 | subroutine init_hydro
use amr_commons
use hydro_commons
#ifdef RT
use rt_parameters,only: convert_birth_times
#endif
use mpi_mod
implicit none
#ifndef WITHOUTMPI
integer::info,info2,dummy_io
#endif
integer::ncell,ncache,iskip,igrid,i,ilevel,ind,ivar
integer::nvar2,ilevel2,numbl2,ilun,ibound,istart
int... | Fortran | null | 8,904 |
[ascl:1011.007] | https://bitbucket.org/rteyssie/ramses | hydro/condinit.f90 | !================================================================
!================================================================
!================================================================
!================================================================
subroutine condinit(x,u,dx,nn)
use amr_parameters
us... | Fortran | null | 2,560 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.