File:Mean precipitation 240ma 2.png
Original file (1,800 × 800 pixels, file size: 625 KB, MIME type: image/png)
Captions
Summary
[edit]DescriptionMean precipitation 240ma 2.png |
English: Mean precipitation in mm, Trias 240 Ma |
Date | |
Source | Own work |
Author | Merikanto |
This image is based data from exoplasim simulation and Scotese paleodem maps.
https://www.earthbyte.org/paleodem-resource-scotese-and-wright-2018/
PaleoDEM Resource – Scotese and Wright (2018) 11 August, 2018 by Sabin Zahirovic
PALEOMAP Paleodigital Elevation Models (PaleoDEMS) for the Phanerozoic
Scotese, Christopher R, & Wright, Nicky M. (2018). PALEOMAP Paleodigital Elevation Models (PaleoDEMS) for the Phanerozoic [Data set]. Zenodo. https://doi.org/10.5281/zenodo.5460860
Scotese, Christopher R; Wright, Nicky M https://zenodo.org/record/5460860
Params from exoplasim
- triassic middle
a_eccentricity1=0.0167022
a_obliquity1=23.441
a_lonvernaleq1=102.7
a_pCO21=1400.0e-6
Code to obtain data
Basic codes here
https://commons.wikimedia.org/wiki/File:World_200ma_6.webp
Post processing codes:
- process input rasters
- 15.6.2022 v 0000.00025
- input: georeferenced netcdf
- must create with qgis georeferencer from
- you need
- koppenpasta output, scaling factor 1
- default scaling
input1=$1
inputdem1=$2
echo "Inputs"
echo $input1
echo $inputdem1
- exit(-1)
- georef koppenpasta file
gdal_translate -a_srs EPSG:4326 -a_ullr -180 90 180 -90 $input1 ./origo/koppen.tif
- translate to netcdf
gdal_translate -of NetCDF ./origo/koppen.tif ./origo/koppen.nc
rm ../origo/k10.nc
rm ../origo/k1.nc
rm ../origo/k20.nc
rm ../origo/k2.nc
rm ../origo/k30.nc
rm ../origo/k3.nc
ncks -v Band1,lon,lat ./origo/koppen.nc ./origo/k10.nc -O
ncks -v Band2,lon,lat ./origo/koppen.nc ./origo/k20.nc -O
ncks -v Band3,lon,lat ./origo/koppen.nc ./origo/k30.nc -O
ncrename -vBand1,k1 ./origo/k10.nc ./origo/k1.nc -O
ncrename -vBand2,k2 ./origo/k20.nc ./origo/k2.nc -O
ncrename -vBand3,k3 ./origo/k30.nc ./origo/k3.nc -O
- process dem to aspect, distance mask ...
gdal_translate -of GTiff $inputdem1 ./origo/dem0.tif
gdal_calc.py -A ./origo/dem0.tif --outfile=./origo/dem6.tif --calc="A*(A>0)"
gdal_calc.py -A ./origo/dem0.tif --outfile=./origo/sea6.tif --calc="A*(A<0)"
gdal_translate -of NetCDF ./origo/dem6.tif ./origo/dem6.nc
gdal_translate -of NetCDF ./origo/sea6.tif ./origo/sea6.nc
gdaldem aspect ./origo/dem6.tif ./origo/aspect6.tif
gdaldem slope ./origo/dem6.tif ./origo/slope6.tif
gdaldem TPI ./origo/dem6.tif ./origo/tpi60.tif
gdaldem TRI ./origo/dem6.tif ./origo/tri60.tif
gdal_calc.py -A ./origo/tpi60.tif --outfile=./origo/tpi6.tif --calc="nan_to_num(A)"
gdal_calc.py -A ./origo/tri60.tif --outfile=./origo/tri6.tif --calc="nan_to_num(A)"
gdal_translate -of NetCDF ./origo/aspect6.tif ./origo/aspect6.nc
gdal_translate -of NetCDF ./origo/slope6.tif ./origo/slope6.nc
gdal_translate -of NetCDF ./origo/tpi6.tif ./origo/tpi6.nc
gdal_translate -of NetCDF ./origo/tri6.tif ./origo/tri6.nc
gdal_proximity.py ./origo/sea6.tif ./origo/distance6.tif
gdal_translate -of NetCDF ./origo/distance6.tif ./origo/distance6.nc
gdal_calc.py -A ./origo/dem6.tif --outfile=./origo/mask6.tif --calc="256*(A>0)"
gdal_translate -of NetCDF ./origo/mask6.tif ./origo/mask6.nc
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/mask6.tif ./origo/mask1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/dem6.tif ./origo/dem1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/sea6.tif ./origo/sea1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/distance6.tif ./origo/distance1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/aspect6.tif ./origo/aspect1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/slope6.tif ./origo/slope1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/lons6.tif ./origo/lons1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/lats6.tif ./origo/lats1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/tri6.tif ./origo/tri1600.tif
gdalwarp -of GTiff -overwrite -ts 1600 800 ./origo/tpi6.tif ./origo/tpi1600.tif
- gdal_translate -of png -ot Uint16 ./origo/mask1600.tif ./origo/mask1600.png
gdal_translate -of png -ot Uint16 ./origo/dem1600.tif ./origo/dem1600.png
gdal_translate -ot Int16 -of GTiff ./origo/dem1600.tif ./origo/dem16.tif
gdal_translate -of png -ot Uint16 ./origo/mask1600.tif ./origo/mask1600.png
gdal_translate -ot Int16 -of GTiff ./origo/mask1600.tif ./origo/mask16.tif
gdaldem hillshade ./origo/dem16.tif -of GTiff -b 1 -z 1.0 -s 1.0 -az 315.0 -alt 45.0 ./origo/emboss0.tif
gdal_translate -of png ./origo/emboss0.tif ./origo/emboss0.png
convert ./origo/emboss0.png -fill white -colorize 80% ./origo/emboss.png
cp ./origo/emboss.png ./output/emboss.png
convert ./origo/dem16.tif -compose Copy_Opacity -auto-level ./origo/koppendem.tif
convert ./origo/koppendem.tif ./origo/koppendem.png
convert ./origo/mask16.tif -compose Copy_Opacity -auto-level ./origo/koppenmask.tif
convert ./origo/koppenmask.tif ./origo/koppenmask.png
cp ./origo/koppendem.png ./output/koppendem.png
cp ./origo/koppenmask.png ./output/koppenmask.png
cp ./origo/landsea.png ./output/landsea.png
echo "."
Draw precip map
-
- draw precip map
- 19.6.2021 0000.0001
import netCDF4 as nc
import numpy as np
from scipy import interpolate
from scipy.interpolate import griddata
import matplotlib.pyplot as plt
from matplotlib.pylab import *
import matplotlib.mlab as mlab
def ncread(fn1, var1):
ds2 = nc.Dataset(fn1)
varr1=ds2[var1]
return(varr1)
def savenetcdf_single_frommem(outfilename1, outvarname1, xoutvalue1,xoutlats1,xoutlons1):
nlat1=len(xoutlats1)
nlon1=len(xoutlons1)
#indata_set1=indata1
print(outfilename1)
ncout1 = nc.Dataset(outfilename1, 'w', format='NETCDF4')
outlat1 = ncout1.createDimension('lat', nlat1)
outlon1 = ncout1.createDimension('lon', nlon1)
outlats1 = ncout1.createVariable('lat', 'f4', ('lat',))
outlons1 = ncout1.createVariable('lon', 'f4', ('lon',))
outvalue1 = ncout1.createVariable(outvarname1, 'f4', ('lat', 'lon',))
outvalue1.units = 'Unknown'
outlats1[:] = xoutlats1
outlons1[:] = xoutlons1
outvalue1[:, :] =xoutvalue1[:]
ncout1.close()
return 0
def ncsave_T21(oname1, ovar1, ovals1):
newx=64
newy=32
X = np.arange(-180, 180, 360/newx)
Y = np.arange(-90, 90, 180/newy)
savenetcdf_single_frommem(oname1, ovar1,ovals1,Y, X)
from matplotlib.colors import LinearSegmentedColormap
cm_data = [[0.2081, 0.1663, 0.5292], [0.2116238095, 0.1897809524, 0.5776761905],
[0.212252381, 0.2137714286, 0.6269714286], [0.2081, 0.2386, 0.6770857143],
[0.1959047619, 0.2644571429, 0.7279], [0.1707285714, 0.2919380952,
0.779247619], [0.1252714286, 0.3242428571, 0.8302714286],
[0.0591333333, 0.3598333333, 0.8683333333], [0.0116952381, 0.3875095238,
0.8819571429], [0.0059571429, 0.4086142857, 0.8828428571],
[0.0165142857, 0.4266, 0.8786333333], [0.032852381, 0.4430428571,
0.8719571429], [0.0498142857, 0.4585714286, 0.8640571429],
[0.0629333333, 0.4736904762, 0.8554380952], [0.0722666667, 0.4886666667,
0.8467], [0.0779428571, 0.5039857143, 0.8383714286],
[0.079347619, 0.5200238095, 0.8311809524], [0.0749428571, 0.5375428571,
0.8262714286], [0.0640571429, 0.5569857143, 0.8239571429],
[0.0487714286, 0.5772238095, 0.8228285714], [0.0343428571, 0.5965809524,
0.819852381], [0.0265, 0.6137, 0.8135], [0.0238904762, 0.6286619048,
0.8037619048], [0.0230904762, 0.6417857143, 0.7912666667],
[0.0227714286, 0.6534857143, 0.7767571429], [0.0266619048, 0.6641952381,
0.7607190476], [0.0383714286, 0.6742714286, 0.743552381],
[0.0589714286, 0.6837571429, 0.7253857143],
[0.0843, 0.6928333333, 0.7061666667], [0.1132952381, 0.7015, 0.6858571429],
[0.1452714286, 0.7097571429, 0.6646285714], [0.1801333333, 0.7176571429,
0.6424333333], [0.2178285714, 0.7250428571, 0.6192619048],
[0.2586428571, 0.7317142857, 0.5954285714], [0.3021714286, 0.7376047619,
0.5711857143], [0.3481666667, 0.7424333333, 0.5472666667],
[0.3952571429, 0.7459, 0.5244428571], [0.4420095238, 0.7480809524,
0.5033142857], [0.4871238095, 0.7490619048, 0.4839761905],
[0.5300285714, 0.7491142857, 0.4661142857], [0.5708571429, 0.7485190476,
0.4493904762], [0.609852381, 0.7473142857, 0.4336857143],
[0.6473, 0.7456, 0.4188], [0.6834190476, 0.7434761905, 0.4044333333],
[0.7184095238, 0.7411333333, 0.3904761905],
[0.7524857143, 0.7384, 0.3768142857], [0.7858428571, 0.7355666667,
0.3632714286], [0.8185047619, 0.7327333333, 0.3497904762],
[0.8506571429, 0.7299, 0.3360285714], [0.8824333333, 0.7274333333, 0.3217],
[0.9139333333, 0.7257857143, 0.3062761905], [0.9449571429, 0.7261142857,
0.2886428571], [0.9738952381, 0.7313952381, 0.266647619],
[0.9937714286, 0.7454571429, 0.240347619], [0.9990428571, 0.7653142857,
0.2164142857], [0.9955333333, 0.7860571429, 0.196652381],
[0.988, 0.8066, 0.1793666667], [0.9788571429, 0.8271428571, 0.1633142857],
[0.9697, 0.8481380952, 0.147452381], [0.9625857143, 0.8705142857, 0.1309],
[0.9588714286, 0.8949, 0.1132428571], [0.9598238095, 0.9218333333,
0.0948380952], [0.9661, 0.9514428571, 0.0755333333],
[0.9763, 0.9831, 0.0538]]
parulamap = LinearSegmentedColormap.from_list('parula', cm_data)
infilename1="./origo/pravg.nc"
varname1="Band1"
kaption1="Mean precip. mm, 240 Ma"
infilename2="./origo/dem.nc"
savename1="mean_precipitation_240ma_2.png"
varr0=ncread(infilename1, varname1)
varr1=np.flipud(np.asarray(varr0))
mask1=np.flipud(np.asarray(ncread(infilename2, "z")))
- plt.imshow(mask1)
- plt.show()
- quit(-1)
- ncsave_T21("tas_min.nc", "tas", minitable1)
- kmap2 = plt.cm.get_cmap('cividis')
- kmap2 = plt.cm.get_cmap('viridis')
kmap2=parulamap
contourrange1=[0,200,400,800,1000,1500,2000,5000]
contourrange2=[0,1000,2000]
contourrange3=np.arange(0,2000,50)
- range3=np.arange(-50,50,0.1)
range3=np.arange(0,2000,10)
- dravar1=minitable1
dravar1=varr1
meanmean1=np.mean(dravar1)
print("Mean avg.", meanmean1)
plt.rcParams["figure.figsize"] = (18,8)
- plt.rcParams["figure.figsize"] = (8,4)
plt.title(kaption1, fontsize=24)
plt.xlabel("Longitude", fontsize=18)
plt.xticks(fontsize=18)
plt.ylabel("Latitude", fontsize=18)
plt.yticks(fontsize=18)
- plt.imshow( mask1, extent=(-180,180,-90,90) )
cs0 = plt.contourf( mask1,extent=(-180,180,-90,90), levels=[-10000,0], color="Black", extend='both')
cs2 = plt.contourf( dravar1,extent=(-180,180,-90,90), levels=range3, cmap=kmap2.reversed(), extend='both')
cs = plt.contour(dravar1, extent=(-180,180,-90,90), inline=True, color="Blue", levels=contourrange1, alpha=0.65 )
- cs0a = plt.contour(dravar1, extent=(-180,180,-90,90), inline=True, cmap=kmap2.reversed(), linestyles=':', alpha=0.65, linewidths=0.4, levels=contourrange3)
plt.clabel(cs, fontsize=20, inline=1,fmt = '%3.0f')
- cs3 = plt.contour( mask1,extent=(-180,180,-90,90), width=5, levels=[1],cmap=plt.cm.binary,alpha=0.8, extend='both')
cs3 = plt.contour( mask1,extent=(-180,180,-90,90), width=5, levels=[0],color="Black", alpha=0.8, extend='both')
- cs4 = plt.contour( mask1,extent=(-180,180,-90,90), width=5, levels=[0,2000],color="Black", alpha=0.4, extend='both')
plt.savefig(savename1)
plt.show()
Licensing
[edit]- 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/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 12:20, 19 June 2022 | 1,800 × 800 (625 KB) | Merikanto (talk | contribs) | Update | |
11:17, 19 June 2022 | 1,800 × 800 (574 KB) | Merikanto (talk | contribs) | Update | ||
11:11, 19 June 2022 | 1,800 × 800 (581 KB) | Merikanto (talk | contribs) | Uploaded own work 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.
Software used | |
---|---|
Horizontal resolution | 39.37 dpc |
Vertical resolution | 39.37 dpc |