Skip to content

Instantly share code, notes, and snippets.

View MiCurry's full-sized avatar

Miles Curry MiCurry

View GitHub Profile
@MiCurry
MiCurry / Configure
Last active May 2, 2025 20:02
Configure
#!/bin/bash
# Convert string to lowercase
to_lower() {
echo $1 | tr '[:upper:]' '[:lower:]'
}
usage() {
printf "${bold}Usage: $0 with the following options:\
\n${RED}Compiler: ${NC}Choose from supported compilers: ${RED}[ gfortran | ifort ]${NC} \
@MiCurry
MiCurry / argParser.py
Last active April 16, 2024 19:14
ArgParser Example
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Easy way to produce plots of\
3D vector fields in python.')
parser.add_argument('task',
help='task name',
type=str)
parser.add_argument("-f", '--fileNameTag',
help='Appends it to the end of a filename so it can be unique when you plot it',
@MiCurry
MiCurry / download_hycom.py
Created December 31, 2018 18:48
Fancy NetCDF Python Example
# Just an example it wont outside of the application is was built in
# Uses Scipy.io netcdf and 'snetCDF 4 Dataset
from scipy.io import netcdf
from netCDF4 import Dataset
def navy_hycom_download(level='top'):
from pl_plot.plotter import HycomPlotter
print "NAVY HYCOM DOWNLOAD"
@MiCurry
MiCurry / 3001.txt
Last active January 11, 2022 18:17
all work and no play makes Jack a dull boyAll work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and no play makes Jack a dull boy. All work and n
import sys
import argparse
from netCDF4 import Dataset
description = ("Trasnlate the 'ter' variable of an MPAS static file to be in surface geopotential,"\
" and rename the variable to be PHIS.")
gravity = 9.80616
#!/usr/bin/env bash
#PBS -N deposition_run
#PBS -A NMMM0013
#PBS -l walltime=00:40:00
#PBS -q regular
#PBS -j oe
#PBS -l select=1:ncpus=36:mpiprocs=36
if [ $# -ne 3 ]; then
echo "Usage: create_deposition.sh grid_alias ESMF/SCRIP-gridFile date" 1>&2
@MiCurry
MiCurry / mkmapdata.path
Created November 11, 2021 17:45
mkmapdata.patch
diff --git a/tools/mkmapdata/mkmapdata.sh b/tools/mkmapdata/mkmapdata.sh
index 531ca5a6..8f8bedcd 100755
--- a/tools/mkmapdata/mkmapdata.sh
+++ b/tools/mkmapdata/mkmapdata.sh
@@ -44,7 +44,7 @@ case $hostname in
##cheyenne
cheyenne* | r* )
if [ -z "$CSMDATA" ]; then
- CSMDATA=/glade/p/cesm/cseg/inputdata
+ CSMDATA=/glade/p/cesmdata/inputdata
@MiCurry
MiCurry / gist:4a85846617d68b0b342c4505feee34ab
Created October 14, 2021 22:19
cesm.log.969380.chadmin1.ib0.cheyenne.ucar.edu.211011-084752
This file has been truncated, but you can view the full file.
-1:omplace information:
-1: MPI type is HPE MPI, 1 thread, thread model is open64
-1: placement file /tmp/omplace.file.skamaroc.24390:
-1: fork skip=0 exact cpu=0-71:1
-1:omplace information:
-1: MPI type is HPE MPI, 1 thread, thread model is open64
-1: placement file /tmp/omplace.file.skamaroc.42034:
-1: fork skip=0 exact cpu=0-71:1
-1:omplace information:
-1: MPI type is HPE MPI, 1 thread, thread model is open64
@MiCurry
MiCurry / bookmarks-2021-08-15.html
Created August 15, 2021 18:40
Bookmarks 2021-08-15
This file has been truncated, but you can view the full file.
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks Menu</H1>
<DL><p>
<HR> <DT><A HREF="place:type=6&sort=14&maxResults=10" ADD_DATE="1539104004" LAST_MODIFIED="1539104004">Recent Tags</A>
&nhyd_model
config_init_case = 13
config_start_time = '0000-01-01_00:00:00'
config_theta_adv_order = 3
config_coef_3rd_order = 0.25
/
&dimensions
config_nvertlevels = 32
config_nsoillevels = 1
config_nfglevels = 1