** Test du krigeage en dimension 2 * Sur la base sur la reference suivante : * Edward H. Isaaks, R. Mohan Srivasta * Applied Geostatistics, Oxford University Press, 1989 - 561 pages * * L'exemple traite ici est situe au chapitre 12, pages 290-296 * Consultable sur : https://www.geokniga.org/bookfiles/geokniga-anintroductiontoappliedgeostatistics.pdf ** Options generales itrac = FAUX ; ************************************************************************ * Donnees communes : points de mesures et points cibles * ************************************************************************ ** Valeurs des points de mesure ** Variogramme (modele gaussien avec pepite, palier et portee) c0 = 0. ; c1 = 10. ; a = 10. ; lg = c0 + (c1 * (1. - (EXP (-3. * lh / a)))) ; SI itrac ; FINSI ; ** Valeurs des points cibles (ou l'on va kriger) xmin = 60. ; xmax = 80. ; ymin = 120. ; ymax = 145. ; dx = 0.25 ; ** Valeurs au point de reference (pour tester le calcul) xref = 65. ; yref = 137. ; fref = 592.7 ; vref = 8.96 ; ************************************************************************ * Cas 1 : krigeage avec mesures LISTREEL et cibles LISTREEL * * et variogramme * ************************************************************************ ** Liste des coordonnes des cibles FIN bx ; FIN by ; ** Krigeage au points cibles (avec le variogramme) t1 . 'MESURES' . 'X' = lxm ; t1 . 'MESURES' . 'Y' = lym ; t1 . 'CIBLES' . 'X' = lxc ; t1 . 'CIBLES' . 'Y' = lyc ; t1 . 'VARIOGRAMME' = gam ; est1 var1 = KRIG t1; MESS ; MESS 'Krigeage sur' ' ' ncib ' points realise en' ' ' tps1 ' ms' ; MESS ; ** Comparaison a la solution de reference MESS ' Valeurs de reference | Valeurs calculees ' ; MESS ' x y | x y ' ; MESS ' ' xref ' ' yref ' |' xcal1 ' ' ycal1 ' ' ; MESS ' Fonction Variance | Fonction Variance ' ; MESS ' ' fref ' ' vref ' |' fcal1 ' ' vcal1 ' ' ; MESS ' | Erreur Erreur ' ; MESS ' |' errf1 ' ' errv1 ' ' ; ************************************************************************ * Cas 2 : krigeage avec mesures LISTREEL et cibles CHPOINT * * et covariogramme * ************************************************************************ ** Covariogramme lc = c1 * (EXP (-3. * lh / a)) ; ** Maillage de points cibles, ou l'on veut interpoler ** Krigeage au points cibles (avec le covariogramme) t2 . 'MESURES' . 'X' = lxm ; t2 . 'MESURES' . 'Y' = lym ; t2 . 'CIBLES' = cib ; t2 . 'COVARIOGRAMME' = cov ; est2 var2 = KRIG t2 ; MESS ; MESS 'Krigeage sur' ' ' ncib ' points realise en' ' ' tps2 ' ms' ; MESS ; ** Comparaison a la solution de reference MESS ' Valeurs de reference | Valeurs calculees ' ; MESS ' x y | x y ' ; MESS ' ' xref ' ' yref ' |' xcal2 ' ' ycal2 ' ' ; MESS ' Fonction Variance | Fonction Variance ' ; MESS ' ' fref ' ' vref ' |' fcal2 ' ' vcal2 ' ' ; MESS ' | Erreur Erreur ' ; MESS ' |' errf2 ' ' errv2 ' ' ; ************************************************************************ * Cas 3 : krigeage avec mesures CHPOINT et cibles LISTREEL * * et variogramme * ************************************************************************ ** Maillage et champs pour visualiser ces points de mesure ** Krigeage au points cibles (avec le variogramme) t3 . 'MESURES' = mes ; t3 . 'CIBLES' . 'X' = lxc ; t3 . 'CIBLES' . 'Y' = lyc ; t3 . 'VARIOGRAMME' = gam ; est3 var3 = KRIG t3 ; MESS ; MESS 'Krigeage sur' ' ' ncib ' points realise en' ' ' tps3 ' ms' ; MESS ; ** Comparaison a la solution de reference xcal3 = xcal1 ; ycal3 = xcal1 ; MESS ' Valeurs de reference | Valeurs calculees ' ; MESS ' x y | x y ' ; MESS ' ' xref ' ' yref ' |' xcal3 ' ' ycal3 ' ' ; MESS ' Fonction Variance | Fonction Variance ' ; MESS ' ' fref ' ' vref ' |' fcal3 ' ' vcal3 ' ' ; MESS ' | Erreur Erreur ' ; MESS ' |' errf3 ' ' errv3 ' ' ; ************************************************************************ * Cas 4 : krigeage avec mesures CHPOINT et cibles CHPOINT * * et covariogramme * ************************************************************************ ** Krigeage au points cibles (avec le covariogramme) t4 . 'MESURES' = mes ; t4 . 'CIBLES' = cib ; t4 . 'COVARIOGRAMME' = cov ; est4 var4 = KRIG t4 ; MESS ; MESS 'Krigeage sur' ' ' ncib ' points realise en' ' ' tps4 ' ms' ; MESS ; ** Comparaison a la solution de reference xcal4 = xcal2 ; ycal4 = ycal2 ; MESS ' Valeurs de reference | Valeurs calculees ' ; MESS ' x y | x y ' ; MESS ' ' xref ' ' yref ' |' xcal4 ' ' ycal4 ' ' ; MESS ' Fonction Variance | Fonction Variance ' ; MESS ' ' fref ' ' vref ' |' fcal4 ' ' vcal4 ' ' ; MESS ' | Erreur Erreur ' ; MESS ' |' errf4 ' ' errv4 ' ' ; ** Trace des champs SI itrac ; FINSI ; ** Sortie en erreur si ecart trop grand errv1 errv2 errv3 errv4 ; SI (errmax > 1.E-10) ; FINSI ; FIN ;
© Cast3M 2003 - Tous droits réservés.
Mentions légales