Skip to content

Instantly share code, notes, and snippets.

View pwolfram's full-sized avatar

Phillip J. Wolfram pwolfram

View GitHub Profile
#!/usr/bin/python
"""
Module to test cell properties
Phillip Wolfram
LANL
03/26/2014
"""
# IMPORT PACKAGES ###############
#!/usr/bin/env python
# Copyright: This document has been placed in the public domain.
"""
Taylor diagram (Taylor, 2001) test implementation.
http://www-pcmdi.llnl.gov/about/staff/Taylor/CV/Taylor_diagram_primer.htm
"""
__version__ = "Time-stamp: <2012-02-17 20:59:35 ycopin>"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pwolfram
pwolfram / README.md
Last active August 29, 2015 14:13 — forked from kerryrodden/.block

This is a modified example building off http://bl.ocks.org/kerryrodden/7090426

This example shows how it is possible to use a D3 sunburst visualization (partition layout) with data that describes sequences of events.

I created this example in my work at Google, but it is not part of any Google product. It is covered by the Apache license:

Copyright 2013 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); > > you may not use this file except in compliance with the License.

#!/usr/bin/env bash
# Phillip Wolfram 02/04/2015 from https://gist.github.com/pwolfram/8724b45d788bcdfa20f7
# stored in gist: 76e9bd312c7a3e048f32:
function update_gist { #{{{
echo 'updating the gist'
gist make_singly_periodic_grid.sh -u 76e9bd312c7a3e048f32
echo 'done'
} #}}}
update_gist
#input type: points with data associated with them
#output type: vtkUnstructuredGrid
# example of unstructured programmable filter
# gist -u 85478f5ea04b9d2db6f1 cylindrical_filter.py
#https://gist.github.com/85478f5ea04b9d2db6f1
# place in script box:
from paraview import vtk
import numpy as np
<nml_record name="lagrangian_particle_tracking" in_defaults="true">
<nml_option
name="config_use_lagrangian_particle_tracking" type="logical"
default_value=".false." units="unitless"
description="If true, ocean analysis member lagrangian_particle_tracking is called."
possible_values=".true. or .false."
/>
<nml_option name="config_lagrangian_particle_tracking_compute_interval" type="character" default_value="same_as_dt" units="unitless"
description="Timestamp determining how often analysis member computation should be performed."
possible_values="'DDDD_HH:MM:SS', 'same_as_output', 'same_as_dt'"
# Illustrates the selection of aggregates in AMG based on smoothed aggregation
import numpy
from pyamg import rootnode_solver
from pyamg.gallery import load_example
data = load_example('unit_square')
#data = load_example('recirc_flow')
#data = load_example('airfoil')
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
N=1000
x = np.random.randn(N)
y = np.random.randn(N)
def count(x,y):
return x.shape[0]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.