Skip to content

Instantly share code, notes, and snippets.

View ChanJeunlam's full-sized avatar
🎯
Focusing

2907 ChanJeunlam

🎯
Focusing
View GitHub Profile
@ChanJeunlam
ChanJeunlam / min-char-rnn.py
Created November 2, 2021 09:37 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ChanJeunlam
ChanJeunlam / roms-notes.md
Created October 22, 2021 09:30 — forked from kevinrosa/roms-notes.md
ROMS notes

ROMS

The model described in this document is the three-dimensional, hydrostatic primitive-equation Regional Ocean Modeling System. It is a free-surface, finite-difference circulation model, formulated in a vertical terrain-following sigma-coordinate. The horizontal discretization is by an orthogonal curvilinear Arakawa-C grid. (taken from He and Wilkin 2006)

On restarts

Perfect restart uses multiple time steps in order to calculate the derivatives (unlike a single time step initialization)

For new solutions, or to use analytical initial conditions, must set NRREC == 0 (in addition to compiling with #define ANA_INITIAL in the cpp header file.

To restart, if you used #define ANA_INITIALthen you need to recompile with #undef ANA_INITIAL.