https://github.com/geodynamics/citcoms
Revision c27c7164b00b949f947d5f0129903a294b5ddba7 authored by Michael Gurnis on 29 January 2007, 20:51:24 UTC, committed by Michael Gurnis on 29 January 2007, 20:51:24 UTC
1 parent a60c042
Raw File
Tip revision: c27c7164b00b949f947d5f0129903a294b5ddba7 authored by Michael Gurnis on 29 January 2007, 20:51:24 UTC
The functionality of this routine is now expanded so that for evey time step the element materials are read in. The code for determining the material file names and opening the file name and then reading in the element files is placed in the same code that the age grids and velocity files are processed. Obviously, reading in materials currently only works for Full; fill be working on Regional next.
Tip revision: c27c716
citcoms_datadir
#!/usr/bin/env python

def get_var():
    # get your username on this machine, and make it upper case
    import os
    var = os.environ.get("USER")
    return var.upper()


# invariant prefix of datadir
prefix = "/scratch/"

# invariant suffix of datadir
suffix = ""

# get the machine-dependent part of datadir
var_path = get_var()

# construct the full string for datadir
print "%s%s%s" % ( prefix, var_path, suffix )
back to top