Markdown examples

~1 min read

Git work flow E3SM

Run E3SM

1) Fork a branch to my own repo on Github

2) Clone a branch from my own repository with submodules

$ git --recursive -b branch/name/here

3) Make changes to the code, add them,and commit

$ git add --all
$ git commit –a -m "comments to this commit"

4) Push changes to my repo

$git push origin name/of/the/branch:name/of/the/branch

5) Send pull request on Github

2 min read

Compile FORTRAN in Eclipse with netcdf

I like interpreted languages such as Matlab or Python, mostly because I’m more like a software user, not developer. These languages usually come with an Integrated Development Environment (IDE) for easy code editing and debugging. However, for compiled languages such as Fortran, there isn’t many choices for IDEs but Eclipse has some potential to be a good alternative.

1 min read

Reading numbers from a string in MATLAB

I always have needs to find numbers from a formatted string using Matlab. For example, find the lats and longs for all the grid cells of a river basin based on a bunch of input files, something like forcings_35.25_-100.75. Then in Matlab you have two ways to read these numbers out.

~1 min read

ArcGIS shape file plot in Matlab

ArcGIS shapes such as points and polygon, or even raster files can be plotted in Matlab. Here is an example of reading and plotting HUC4 polygons in Matlab.

1 min read