Draw a general circulation model and a regional model in wireframes.
The following R packages are required.
- rgl
- maps
- webshot2
| tau <- 2 * pi | |
| deg2rad <- pi / 180 | |
| rad2deg <- 180 / pi | |
| lonlat2xyz <- function(lon, lat) { | |
| x <- cos(lon) * cos(lat) | |
| y <- sin(lon) * cos(lat) | |
| z <- sin(lat) | |
| list(x = x, y = y, z = z) | |
| } |
| # Unable to let Gemini 3.1 Pro to identify the vertices, angles and radii | |
| xv <- c(18, 203, 372, 360, 216, 150) | |
| xv <- c(xv, 0, -rev(xv)) | |
| yv <- c(-406, -244, -13, 137, 171, 302) | |
| yv <- c(yv, 400, rev(yv)) | |
| angles <- c(93, 170, 110, 219, 155, 252, 192, 293, 227, 259, 210, 297) | |
| angles <- c(angles, (180 - rev(angles) + 360) %% 360) | |
| radii <- c(19, rep(13, 10), 10) | |
| # modified the code generated with Gemini 3.1 Pro |
| title: 日本語タイトル | |
| author: 榎本剛 | |
| date: 9 April 2024 | |
| format: | |
| pdf: default | |
| html: | |
| grid: | |
| margin-width: 350px | |
| reference-location: margin | |
| citation-location: margin |
| CPPFLAGS+= -DTBB_INTERFACE_NEW=true | |
| LDFLAGS+= -ltbb -ltbbmalloc |
| eps <- 0.622 | |
| calc.es <- function(T) { | |
| # WMO, JMA | |
| exp(19.482-4303.4/(T-29.65))*100 | |
| } | |
| pref <- 1e5 | |
| Rv <- 461 # J/K/kg | |
| gm <- 7/5 | |
| t <- 288 |
| .SUFFIXES: | |
| .SUFFIXES: .o .f90 | |
| FC = gfortran12 | |
| LDLIBS = -lfftw3 | |
| LDFLAGS = -L/usr/local/lib | |
| FFLAGS = -O2 -I/usr/local/include | |
| SRCS = $(TARGET).f90 | |
| OBJS = $(SRCS:.f90=.o) | |
| TARGET = fftw_test |
| eps <- 0.622 | |
| e2q <- function (e, p) { | |
| eps*e/(p-(1.0-eps)*e) | |
| } | |
| q2e <- function(q, p) { | |
| p*q/(eps+(1.-eps)*q) | |
| } |
| import os | |
| import sys | |
| def decode_meta(rep): | |
| dd = rep[2][:2] | |
| hh = rep[2][2:4] | |
| lat = int(rep[6][2:]) * 0.1 | |
| lon = int(rep[7][1:]) * 0.1 | |
| meta = {"dd":dd, "hh":hh, "vessel":rep[4], "lon":lon, "lat":lat} |
| #include <cstdlib> | |
| #include <cstdio> | |
| #include <random> | |
| #include <chrono> | |
| int enzyme_dup; | |
| int enzyme_dupnoneed; | |
| int enzyme_out; | |
| int enzyme_const; |