Skip to content

Instantly share code, notes, and snippets.

View mark-petersen's full-sized avatar

Mark Petersen mark-petersen

View GitHub Profile
@mark-petersen
mark-petersen / general.config.ocean_cori
Last active September 23, 2020 19:43
COMPASS ocean config file for NERSC cori
# This file is the ocean core's configuration file. It is specific to the ocean
# core, and a specific machine. Each machine will configure this file
# differently, but it can be used to point on version of the testing
# infrastructure at a different version of the model.
# The namelists section defines paths to template namelists that will be used
# to generate specific namelists. Typically these will point to the forward and
# init namelists in the default_inputs directory after a successful build of
# the ocean model.
@mark-petersen
mark-petersen / general.config.ocean_turq
Last active September 25, 2020 16:47
COMPASS ocean config file for LANL IC
# This file is the ocean core's configuration file. It is specific to the ocean
# core, and a specific machine. Each machine will configure this file
# differently, but it can be used to point on version of the testing
# infrastructure at a different version of the model.
# The namelists section defines paths to template namelists that will be used
# to generate specific namelists. Typically these will point to the forward and
# init namelists in the default_inputs directory after a successful build of
# the ocean model.
# Redi_verification
# test functions for Redi tendancy terms
# Mark Petersen, LANL, Nov 2019
# followed example at:
# https://pythonhosted.org/algopy/symbolic_differentiation.html
import sympy as sp
x,y,z = sp.symbols('x y z')
fkx,fky,fkz = sp.symbols('fkx fky fkz')
function [time,rpe,rpeNorm,DrpeDt,meanDrpeDt,keMeanTime,vertTransportMean,vertTransportMeanZ] ...
= sub_rpe( ...
wd,dir,abc,netcdf_file, ...
dims,time_fields,min_n,max_n,title_txt)
% Compute Resting Potential Energy
% Mark Petersen, LANL, Jan 2013
px = [.53];
py=[.52]; % Midpoint position of plots
% script rpe
% compute resting potential energy, ala Ilicak ea 2012
% Mark Petersen, LANL, Jan 2013
% working directory, where data is kept:
%wd = '/local1/mpetersen/runs/';
wd = '/var/tmp/mpeterse/runs/';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# This file is the ocean core's configuration file. It is specific to the ocean
# core, and a specific machine. Each machine will configure this file
# differently, but it can be used to point on version of the testing
# infrastructure at a different version of the model.
# The namelists section defines paths to template namelists that will be used
# to generate specific namelists. Typically these will point to the forward and
# init namelists in the default_inputs directory after a successful build of
# the ocean model.
@mark-petersen
mark-petersen / SingleRegionAtlanticWTransportTransects.geojson
Created July 31, 2019 16:21
files used to create MOC region and transect
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Currently Loaded Modulefiles:
1) modules/3.2.10.6
2) eswrap/1.3.3-1.020200.1280.0
3) switch/1.0-1.0502.60522.1.61.ari
4) craype-sandybridge
5) craype-network-aries
6) craype/2.5.15
7) cray-mpich/7.7.1
8) udreg/2.3.2-1.0502.10518.2.17.ari
9) ugni/6.0-1.0502.10863.8.29.ari
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
program mpi_hello
! Problem 3.7.1 in Pacheco. Send greeting from one processor to
! another.
! Mark Petersen, 3/8/03
! to compile on mauve:
! ifort mpi_hello.f90 -lmpi
! if you are using mpich:
! use mpi