Skip to content

Instantly share code, notes, and snippets.

Ting Sun sunt05

  • Reading, UK
Block or report user

Report or block sunt05

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sunt05 /
Last active Aug 10, 2019
Plot stability correction functions used in SUEWS 2019a
import pandas as pd
import numpy as np
# working for SUEWS v2019a: supy_driver >= 2019a2
from supy_driver import atmmoiststab_module as atm
# create z/L range
ser_zl = pd.Series(np.arange(-5, 2, .2))
# base DataFrame with z/L and scheme columns
df_zl_psi = pd.DataFrame({i: ser_zl
Standalone python script for QGIS3 on OSX.
import os
import sys
# Define plugin locations from QGIS3
# Define Qt5 plugin path since Qt5 can't find it
sunt05 /
Created Oct 3, 2018
Quickstart for Windows-targeted development on macOS with `mingw`+`python3`

Quickstart for Windows-targeted development on macOS with mingw+python3

1. install Homebrew

/usr/bin/ruby -e "$(curl -fsSL"

2. install Virtual Box (free):

brew cask install virtualbox
sunt05 / example_explicit.f95
Last active Aug 10, 2017
SUEWS interface improvement
View example_explicit.f95
calPotEvap(& ! compared with the above subroutine, you may find we put all input and output variables explicitly here
TSurf, Qair, SoilMoist, Res, PET)
! below are pseudo-code and comments:
implict none
real, intent(in):: TSurf, Qair, SoilMoist, Res
real, intent(out):: PET
real:: Rho,Lv ! these are constant values: Rho (air density), Lv (latent heat of vaporization)
PET= soilMoist*Rho*Lv/Res*(qsat(Tsurf)-Qair) ! this is the final result we want
sunt05 / gist:1cdc72c2bfe2cabdd33e1528eb82dc1d
Created Jul 30, 2017 — forked from agathe/gist:2956101
VBA Excel - Convert each sheet to CSV - For MAC
View gist:1cdc72c2bfe2cabdd33e1528eb82dc1d
Function SaveAllSheetsAsCSV(outputPath As String)
On Error GoTo Heaven
' each sheet reference
Dim Sheet As Worksheet
' path to output to
'Dim outputPath As String
' name of each csv
Dim OutputFile As String
You can’t perform that action at this time.