File:CCSM3 19000BP JulyT 1.svg
Original file (SVG file, nominally 1,650 × 1,275 pixels, file size: 1.12 MB)
Captions
Summary
[edit]DescriptionCCSM3 19000BP JulyT 1.svg |
English: July temperature on Europe, 19000 years ago. |
Date | |
Source | Own work |
Author | Merikanto |
This SVG image contains embedded raster graphics.[1] Such images are liable to produce inferior results when scaled to different sizes (as well as possibly being very inefficient in file size). If appropriate to do so, they should be replaced with images created using vector graphics. Note: This template is only supposed to be used if the SVG file mixes vector and raster graphics. If the SVG file only contains raster graphics {{FakeSVG}} is supposed to be used. See also {{TopoSVG}}. |
This image is based on "Trace21ka CCSM3" simulation data. Data is dowscaled with delta method with "GLAC 1D" and "ETOPO1" datasets. Assumed temperature lapse rate +5 C/1000 m.
Finally it is visualized with NASA Panoply program.
Python source code.
- python 3.7 trace21ka temperature downscaler
- needs trace21ka TS file(s), Glac1D "HDC" file
- end cropped etopo1 for europe lonlat (-15,30) - (40, 70)
import matplotlib.pyplot as plt
import numpy as np
import scipy
import xarray as xr
import skimage
from skimage import data
from skimage import io
from skimage import filters
from skimage import color
from skimage.transform import rescale, resize, downscale_local_mean
- location in Trace21ka CCSM3 TS file
tslok1=7
- location in GLAC 1D file
- defa
orolok1=71
- sea level change *-1 eq 120 means 120 meters below current
sealev=120
- 1 pix accuracy
skale1=1
- temperature lapse rate 5 C/ km
lapserate1=-0.005
- limits of accureta map
lat1=30
lat2=70
lon1=-15
lon2=40
dataDIR = './predata/TOPicemsk.GLACD26kN9894GE90227A6005GGrBgic.nc'
eurodir = './predata/etopo1_europe0.nc'
tsdatadir = './predata2/trace*.nc'
outdir1 = './oroout.nc'
outtempo1='./outtempo1.nc'
DTS = xr.open_mfdataset(tsdatadir)
- print (DTS)
rtemp0=DTS.TS[tslok1]-273.15
rtemp1=np.flipud(rtemp0)
rtemp2=np.roll(rtemp1, 48, axis=1)
- plt.imshow(rtemp2)
- plt.show()
DS = xr.open_dataset(dataDIR)
- print (DS)
roro0=DS.HDC[orolok1]
roro1=np.flipud(roro0)
roro2=np.roll(roro1, 180, axis=1)
- 360x180 grid
indx1=lon1+180
indx2=lon2+180
indy1=180-(lat1*2)
indy2=180-(lat2*2)
roro3=roro2[indy2:indy1,indx1:indx2]
roro3 *= (roro3>1)
print(indx1,indx2)
print (indy1, indy2)
- roro3=roro2[0:90,180:270]
- roro3=roro2[00:90,180:270]
- plt.imshow(roro3)
- plt.show()
DSE = xr.open_dataset(eurodir)
- print (DSE)
euro0=DSE.Elev
- euro1=np.flipud(euro0)
elon=DSE.lon
elat=DSE.lat
euro0=euro0+sealev
euro0 *= (euro0>1)
ork1 = resize(euro0, (roro3.shape[0], roro3.shape[1] ),
anti_aliasing=True, order=1)
ork2 = resize(ork1, (euro0.shape[0], euro0.shape[1] ), anti_aliasing=True, order=1)
ork3 = resize(roro3, (euro0.shape[0], euro0.shape[1] ), anti_aliasing=True, order=1)
- rim22=scipy.ndimage.zoom(rim21,(imgw2, imgh2), order=1)
- omg3=resize(omg2, img2.shape,anti_aliasing=True ,order=1)
dorka=euro0-ork2
outi1=ork3+dorka
- outi2=np.flipud(outi1)
- plt.imshow(ork2)
plt.imshow(outi1)
- plt.imshow(roro3)
eurout = xr.Dataset(
data_vars={'Elev': (('lat', 'lon'), outi1) },
coords={'lat': elat, 'lon': elon})
- plt.imshow(euro0)
- plt.show()
eurout.to_netcdf(outdir1)
- io.imsave("outoro.tif", outi1)
- io.imsave("outtemp.tif", rtemp1)
- img1 = io.imread('./outtemp.tif')
- img200 = io.imread('./outoro.tif')
img1=rtemp1
img200=outi1
img201 = resize(img200, (img200.shape[0]/skale1, img200.shape[1]/skale1 ),
anti_aliasing=True, order=1)
img2 = resize(img201, (img200.shape[0], img200.shape[1] ),
anti_aliasing=True, order=1)
imgw1=img1.shape[1]
imgh1=img1.shape[0]
imgw2=img2.shape[1]
imgh2=img2.shape[0]
print(imgw1, imgh1)
print(imgw2, imgh2)
- ix1=0
- ix2=360
- iy1=-90
- iy2=90
ix1=-180
ix2=180
iy1=90
iy2=-90
dx1=(ix2-ix1)/imgw1
dy1=(iy2-iy1)/imgh1
dy2=(iy2-iy1)/(imgh1*2)
lon1=-15
lon2=40
lat1=70
lat2=30
indx1=int((lon1-ix1)/dx1)
indx2=int((lon2-ix1)/dx1)
indy1=int((lat1-iy1)/dy1)
indy2=int((lat2-iy1)/dy1)
wi1=abs(indx2-indx1)
hi1=abs(indy2-indy1)
- print(indy1)
omg1=np.roll(img1, 45, axis=1)
print(indx1,indx2)
print(indy1,indy2)
omg2=omg1[indy1:indy2,indx1:indx2]
- omg2=omg1[0:48,0:48]
- omg2=omg1[0:24,44:58]
- omg2=omg1[10:32,44:58]
- lat, lon
rim21 = resize(img2, (img1.shape[0], img1.shape[1] ),
anti_aliasing=True, order=1)
rim22 = resize(rim21, (img2.shape[0], img2.shape[1] ),
anti_aliasing=True, order=1)
- rim22=imresize(rim21, img2.shape, interp='bilinear')
- rim22=scipy.ndimage.zoom(rim21,(imgw2, imgh2), order=1)
omg3=resize(omg2, img2.shape,anti_aliasing=True ,order=1)
rim23=(img2-rim22)
outi1=omg3+(rim23*lapserate1)
outi2=np.flipud(outi1)
imgw3=outi2.shape[1]
imgh3=outi2.shape[0]
print(imgw3, imgh3)
levels1 = [-25,-20,-15,-10,-5,0,5,10,15,20,25,30,35]
- levels1 = [-15,-10,-5,0,5,10,15,20,25]
- levels1 = [-10,-5,0,5,10,15,20]
ox1 = np.linspace(0,1, imgw3)
oy1 = np.linspace(0,1, imgh3)
odx1=(lon2-lon1)/imgw3
ody1=(lat2-lat1)/imgh3
olonas1 = np.linspace(lon1,lon2,imgw3)
olatas1 = np.linspace(lat1,lat2, imgh3)
- print ("olatas")
- print (odx1)
- print (len(olatas1))
- print (olatas1)
- image_resized = resize(image, (image.shape[0] / 4, image.shape[1] / 4), anti_aliasing=True)
- mi3 = downscale_local_mean(img1, (4, 4))
- plt.imshow(img1, cmap='viridis')
- plt.imshow(rim23, cmap='rainbow')
- plt.imshow(omg2, cmap='rainbow')
- plt.imshow(outi1,extent=[lon1, lon2, lat1, lat2], cmap='rainbow')
- plt.contour(ox1,oy1,outi2,5, colors='blue');
- plt.contour(outi1,5, levels=levels1,alpha=.5, colors='blue');
- plt.contourf(outi1,5, levels=levels1,alpha=.5, colors='rainbow');
cf = plt.contourf(ox1,oy1, outi2, levels=levels1)
- cn= plt.contour(outi2,5, levels=levels1,alpha=.5, colors='k', linestyle='-');
plt.contour(cf, colors='k')
- plt.show()
- type(img1)
eurout = xr.Dataset(
data_vars={'TT': (('lat', 'lon'), outi1) },
coords={'lat': olatas1, 'lon': olonas1})
eurout.to_netcdf(outtempo1)
Licensing
[edit]
I, the copyright holder of this work, hereby publish it under the following license:
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.
https://creativecommons.org/licenses/by-sa/4.0CC BY-SA 4.0 Creative Commons Attribution-Share Alike 4.0 truetrue
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 18:44, 8 September 2019 | 1,650 × 1,275 (1.12 MB) | Merikanto (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 1650px |
---|---|
Height | 1275px |