Skip to content

Instantly share code, notes, and snippets.

View paultgriffiths's full-sized avatar
👋

Paul Griffiths paultgriffiths

👋
View GitHub Profile
#!/usr/bin/bash
# modified from the version at https://github.com/oceandiff/netcdf_ifort_install
# mpicalls removed
#==============================================================================
#title : install_netcdf_ifort.sh
#author : Alessandro Mercatini - ISPRA-CSA
#mail : alessandro.mercatini@isprambiente.it
#date : 20062022
@paultgriffiths
paultgriffiths / JASMIN_CMIP6_notes
Last active October 23, 2024 02:55
JASMIN / CMIP6 workflow notes
# origin of the data
## ESGF
if on ESGF then download via an ESGF-provided shell script to the AerChemMIP GWS on JASMIN - you can use the shopping cart function at https://aims2.llnl.gov/search to select files from a given model etc and then download all files using a provided BASH script
## BADC mirror on JASMIN
if on BADC (/badc/cmip6/data/CMIP6) then leave it there
## MASS storage
if on MASS then extract using script e.g.
# implemented from https://www.industrialecology.uni-freiburg.de/Content/IEooc_Background2_Exercise2_GWP_Sample_Solution.pdf
tau_CH4 = 9.43
TH=100. # time horizon
aCH4 = 1.27991E-13 # Wm-2kg-1
aCO2 = 1.75435E-15 # Wm-2kg-1
CFCH4 = 1.65 # Correction factor ci for each gas to consider secondary production of other GHG

Culled from here

Joel Dudley, co-founder of MacResearch and a student in the Stanford Biomedical Informatics program, gave a quick seminar today on how to program effectively for bioinformatics. The main point is that to be a good bioinformatician, you need to build up your toolbox, be aware of what’s out there, and use and integrate existing tools to do more powerful work. To do this, he gives the following suggestions:

  1. Learn UNIX. It’s quick, it’s powerful, it’s easy to learn. What often takes several lines to code in a scripting language can usually be reduced to a single line on the command line.
  2. Be jack of all trades, but master of ONE. That is, be familiar with most programming languages, but be really good at one of them. In the hierarchy of languages, VB and C are more “primitive” while Ruby and Python are most “advanced” – he recommends starting with one of the more a

Get all refs as a BibTeX file

  • get google scholar output and download all refs as bib file
  • save as refs.bib

start a new blank Overleaf doc and upload refs.bib

download the required style file

  • download the reverse bibliography style from -
#!/usr/bin/env python2.7
# ==========================================================================
# Written 18.11.19 by Matthew Shin
#
# This script calculates annual atmospheric burden based off pressure levels
#
# Required inputs: molar mixing ratio (4D field)
# pressure at tropopause (3D field)
# model cell area (2D field)
# ==========================================================================

Connecting from outside the chemistry network

Should also mention bastion host (details via https://www.ch.cam.ac.uk/computing/remote-access)

citadel.ch.cam.ac.uk

From which you can ssh into other boxes on the network.

You can also tunnel through citadel to other machines e.g.

@paultgriffiths
paultgriffiths / using_mass.md
Last active August 7, 2019 09:58
How to use MASS on JASMIN

why do we have to use an ungooglable set of software - try googling JASMIN MOOSE!!

create a file that will house the stash items and the years to be extracted, perhaps stash_req

should look like

begin
 # species to extract
 stash=(2,3,4,10,12,39,49,408,16004,30201,30202,30203,30451,30452,30453,34363)
for zzStashItem in 34001,34002; do # check that this is how you do a list in BASH
echo ${zzStashItem} # write to screen
for zzYear in for i in {1979..2015} ;do
echo ${zzYear} # check
cp inpfile_orig inpfile.dat # copy dummy from safe location to working copy
# create def file by substitution of strings
sed "s/STASHJJYEAR/${zzYear}/g" inpfile.dat > outfile.dat
# moo select outfile.dat moose:crum/u-az166/apk.pp/ ./
done
done

Keybase proof

I hereby claim:

  • I am paultgriffiths on github.
  • I am ptg21 (https://keybase.io/ptg21) on keybase.
  • I have a public key ASDYEi6HhzHatHj1EuqBel7RPpp8kYoEeZVJ5VDtXvKxMQo

To claim this, I am signing this object: