Conduct interpolation using a Vandermonde matrix based on the articles in Apple Developer.
To allow compiliation without GUI, the original source is modified as follows.
solveLinearSystemis declared without static and called without ViewController.
| 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; |
| tab10 <- c('#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf') | |
| tab10.new <- c('#5778a4', '#e49444', '#d1615d', '#85b6b2', '#6a9f58', '#e7ca60', '#a87c9f', '#f1a2a9', '#967662', '#b8b0ac') |
| // C translation of https://www.nag-j.co.jp/fortran/coarray/code/quad1.f90 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| double rectangle_rule(double (*f)(double), double from, double to, int nstep) | |
| { | |
| double integral; | |
| double x1, x2, y, stepval; | |
| int i; |