File:GDD5 in beringia ccsm4 envirem lgm 25m.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 1,650 × 1,275 pixels, file size: 695 KB)

Captions

Captions

Growing degree days above 5 centigrader in Beringia, Last glacial maximum.

Summary

[edit]
Description
English: Growing degree days (GDD5) in Beringia, during Last Glacial Maximum. Data is from Envirem CCSM4 North America 2.5 min dataset.
Date
Source Own work
Author Merikanto
SVG development
InfoField
 
The SVG code is valid.
 
This map was created with Adobe Illustrator by Merikanto.

Data is from Envirem lgm 2.5min CCSM4 GDD5 dataset.

Visualization with Nasa Panoply.

Script for produce this data drom downloaded and extracted file.

install_libraries=FALSE

if(install_libraries==TRUE) {

install.packages("raster")
install.packages("rgdal")
install.packages("sp")
install.packages("spatialEco")
install.packages("ncdf4")
install.packages("dissever")
install.packages("viridis")
install.packages("dplyr")
install.packages("lattice")
install.packages("RColorBrewer")
install.packages("rgeos")
install.packages("sp")
install.packages("reshape2")
install.packages("data.table")
install.packages("stringr")
install.packages("rlist")
install.packages("pipeR")
install.packages("maptools")
install.packages("gdata", dependencies=TRUE)
install.packages("abind")
install.packages("Cairo")
install.packages("pals")
install.packages("REdaS")
install.packages("easyNCDF")
install.packages("numbers")
install.packages("rasterVis")
install.packages("OceanView")
install.packages("rainfarmr")

}

library(raster) library(rgdal) library(ncdf4) library(lattice) library(maptools) library(rgeos) library(spatialEco) library(dissever) library(rainfarmr)

library(RColorBrewer) library(viridis) library(pals) library(data.table) library(stringr) library(rlist) library(pipeR) library(rasterVis)

  1. library(OceanView)

library(sp) library(reshape2)

library(dplyr) library(REdaS) library(easyNCDF) library(numbers)

  1. library(gdata)

library(abind)

  1. bioname_11="D:/datav3/CHELSA_PMIP_CCSM4_BIO_11.tif" # temperature of coldest 3 month
  2. bioname_19="D:/datav3/CHELSA_PMIP_CCSM4_BIO_19.tif" ## precip of coldest 3 month
  1. bioname_10="D:/datav3/CHELSA_PMIP_CCSM4_BIO_11.tif"

bioname_10="D:/data_processed/beringia_chelsa_bio_lgm/bio10.nc" bioname_5="D:/data_processed/beringia_chelsa_bio_lgm/bio5.nc"

downscale_dissever <- function (coarse_rastera, fine_stack, dismethod, samplerate) {

   print ("Dissever()")		
       names(fine_stack)
       
       
   	

coarse_raster<-coarse_rastera


   p1<-fine_stack$Elevation


  1. plot(p1)
  1. return(0)

coarseoro<- resample(p1, coarse_raster) coarseoro_big<-resample(coarseoro, p1) orodelta<-(p1-coarseoro_big)

baset1 <- resample(coarse_raster, p1)

raster_stack <- fine_stack

min_iter <- 5 # Minimum number of iterations max_iter <- 10 # Maximum number of iterations p_train <- samplerate # Subsampling of the initial data

oma_juttu <- dissever(coarse = coarse_raster, fine = raster_stack, method = dismethod, p = p_train, min_iter = min_iter,max_iter = max_iter, verbose=1) orotemp<-oma_juttu$map

#tempiso<-baset1+oma_juttu$map+biassi

coarseorotemp<- resample(orotemp, coarse_raster) coarseorotemp_big<-resample(coarseorotemp, p1)

orotempdelta<-orotemp-coarseorotemp_big

outtemp<-baset1+orotempdelta

  1. plot(outtemp, col=rev(rainbow(256)) )
  1. outtempr<-rotate(outtemp)

#plot(outtempr)

     return(outtemp)
}

downscale_raster <- function (coarse_rastera, fine_rastera, method) { ## methods: 0 delta, 1 spatialeco, 2 dissever, 3 temperature lapse 6.5 C/1 km lm

   print ("Downscaler()")			

coarse_raster<-coarse_rastera fine_raster<-fine_rastera p1<-fine_raster p2<-fine_raster

  1. plot(fine_raster)
  2. plot(coarse_raster, col=viridis(200))

coarseoro<- resample(p1, coarse_raster) coarseoro_big<-resample(coarseoro, p1) orodelta<-(p1-coarseoro_big)

baset1 <- resample(coarse_raster, p1)

raster_stack <- stack(p1,p2)

min_iter <- 5 # Minimum number of iterations max_iter <- 20 # Maximum number of iterations p_train <- 1.0 # Subsampling of the initial data

	 if(method>9999)
	 {

method=2 }

## dissever run

   if(method==2)

{ oma_juttu <- dissever(coarse = coarse_raster, fine = raster_stack, method = "glm", p = p_train, min_iter = min_iter,max_iter = max_iter, verbose=1) orotemp<-oma_juttu$map }

## spatialeco downscale if(method==1) { oma_juttu2 <- raster.downscale(p1, coarse_raster) orotemp<-oma_juttu2$downscale }

    1. delta regression 1,1

if(method==0) {

orotemp<-orodelta

   	}
    1. delta regression by lapse rate

if(method==3) { orotemp<-orodelta*0.0065*-1

   	}

#biassi=4

#tempiso<-baset1+oma_juttu$map+biassi

coarseorotemp<- resample(orotemp, coarse_raster) coarseorotemp_big<-resample(coarseorotemp, p1)

orotempdelta<-orotemp-coarseorotemp_big

outtemp<-baset1+orotempdelta

  1. plot(outtemp, col=rev(rainbow(256)) )
  1. outtempr<-rotate(outtemp)

#plot(outtempr)

     return(outtemp)
}

downscale_dissever <- function (coarse_rastera, fine_stack, dismethod, samplerate) {

   print ("Dissever()")		
       names(fine_stack)
       
       
   	

coarse_raster<-coarse_rastera


   p1<-fine_stack$Elevation


  1. plot(p1)
  1. return(0)

coarseoro<- resample(p1, coarse_raster) coarseoro_big<-resample(coarseoro, p1) orodelta<-(p1-coarseoro_big)

baset1 <- resample(coarse_raster, p1)

raster_stack <- fine_stack

min_iter <- 5 # Minimum number of iterations max_iter <- 10 # Maximum number of iterations p_train <- samplerate # Subsampling of the initial data

oma_juttu <- dissever(coarse = coarse_raster, fine = raster_stack, method = dismethod, p = p_train, min_iter = min_iter,max_iter = max_iter, verbose=1) orotemp<-oma_juttu$map

#tempiso<-baset1+oma_juttu$map+biassi

coarseorotemp<- resample(orotemp, coarse_raster) coarseorotemp_big<-resample(coarseorotemp, p1)

orotempdelta<-orotemp-coarseorotemp_big

outtemp<-baset1+orotempdelta

  1. plot(outtemp, col=rev(rainbow(256)) )
  1. outtempr<-rotate(outtemp)

#plot(outtempr)

     return(outtemp)
}

writeout<-function(oras, outn, varnamex, varunitx, longnamex) {

crs(oras) <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0" writeRaster(oras, filename=outn, overwrite=TRUE, format="CDF", varname=varnamex, varunit=varunitx, longname=longnamex, xname="lon", yname="lat")

}

    1. snow
 shortvarname1="GDD5"
 longvarname1="GDD5"
 varunits1="degC"
 infile1="D:/datav5/lgm_ccsm4_2-5arcmin_growingDegDays5.tif"
 outfile1="beringia_ccsm4_gdd5_25m.nc"
 print ("Loading data.")

 inras1<-raster(infile1)
 ext1<-c(-180,-120,50,80)
 outras0<-crop(inras1,ext1)
 
 outras1=outras0/10
      
 writeout(outras1,outfile1,shortvarname1, varunits1, longvarname1)


Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current14:48, 10 November 2019Thumbnail for version as of 14:48, 10 November 20191,650 × 1,275 (695 KB)Merikanto (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

Metadata