Skip to content
Extraits de code Groupes Projets
Valider 63767df7 rédigé par Michel Crucifix's avatar Michel Crucifix
Parcourir les fichiers

add vcv18 example

parent 7247d71b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
%% Cell type:code id:08c256f1-3d5a-49ea-b1f1-822c705c32e7 tags:
``` R
require(gtseries)
```
%% Output
Loading required package: gtseries
%% Cell type:code id:88879a77-d891-4b2d-9785-7d9e8c0d95f4 tags:
``` R
require(iceages)
data(models)
model <- models$vcv18
init <- c(12,0.,0.4)
times <- seq(-4e4, 0., 0.1) # time unit in this packages is 1000 years = 10 ka
```
%% Output
Loading required package: iceages
%% Cell type:code id:c477ad5b-df31-49ec-96f2-7483da36acea tags:
``` R
# standard solution in ice ages, with 6 obliquity and 6 precession terms
Astro <- read_astro(6,6)
trajectory <- propagate_d(model, times=times, init=init, par=model$spar, Astro)
```
%% Cell type:code id:c47b678c-930a-44ef-b2d0-bcc5ecdd592c tags:
``` R
trajectory <- ts(trajectory, start = times[1]*10, deltat = 1)
```
%% Cell type:code id:199f572e-38fe-47ac-9f20-872269abf31d tags:
``` R
plot(trajectory[,1], xlim=c(-1e3,0))
```
%% Output
%% Cell type:raw id:e83c9689-79a0-4b28-84f9-040f3c33598e tags:
require(gtseries)
%% Cell type:code id:eddee22d-bfb4-40bb-a009-2f59a1152172 tags:
``` R
M <- mfft_real(trajectory[,1], nfreq=10)
```
%% Cell type:code id:795d94ae-46c9-42a4-96d8-9058ff209056 tags:
``` R
astroFreqs <- c(Astro$omepre, Astro$omeobl)/10.
astroFreqnames <- c(sprintf("p%s", seq(along=Astro$omepre)),sprintf("o%s", seq(along=Astro$omeobl)))
names(astroFreqs) <- astroFreqnames
tones <- attributeTones(M$Freq, astroFreqs)
```
%% Cell type:code id:14b06778-5775-4bfc-9f08-a16c9c508c3b tags:
``` R
plot(M, labels=tones)
```
%% Cell type:code id:612ded56-53be-400c-971a-0fa9b1b762bf tags:
``` R
Astro$omepre
```
%% Cell type:code id:00b4c33b-caf2-443c-b1de-cccd7f6773da tags:
``` R
astroFreqnames
```
%% Cell type:code id:bf2945fc-cbe0-48c4-85a2-a11cd8403003 tags:
``` R
tones
```
%% Cell type:code id:509faec7-a7b0-44dc-9ca0-ddd2aba207d3 tags:
``` R
print(M$Freq,5)
print(2*pi/M$Freq, 4)
```
%% Cell type:code id:69c4cf20-605e-402c-8d63-c2fab9f01679 tags:
``` R
print(astroFreqs, 5)
```
%% Cell type:code id:2ebf1fb3-9797-4c16-891a-7ffc692623b5 tags:
``` R
.33111-0.26493
```
%% Cell type:code id:b3eb30b7-f52e-43f9-80f7-8308e87bbe71 tags:
``` R
```
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter