最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

ASTE 數(shù)據(jù)可視化的自我實(shí)現(xiàn)(Python)

2022-12-05 02:44 作者:永不磨滅的希望  | 我要投稿

? ? ? ? ? ? ? ? ? ? ? ? ? ? ??ASTE data ——Sea surface height

In the Arctic Cap, the visualization of Sea?surface height(SSH) like this:

FIG 1.SSH in the Arctic cap



The detailed code:

import numpy as np

import xarray as xr

import matplotlib.pyplot as plt

import cartopy.crs as ccrs

import sys

from xmitgcm import llcreader

sys.path.append('/home/ifenty/ECCOv4-py')

import ecco_v4_py as ecco

import matplotlib.path as mpath

import cartopy.feature as cfeature

import matplotlib.ticker as mticker

from mpl_toolkits.basemap import Basemap

import netCDF4 as nc

## Set top-level file directory for the ECCO NetCDF files

## =================================================================

# base_dir = '/home/username/'

base_dir = '/home/ifenty/ECCOv4-release'


## define a high-level directory for ECCO fields

ECCO_dir = base_dir + '/Release3_alt'


## LOAD NETCDF FILE

## ================


# directory containing the file

data_dir=? 'C:/Users/34740/Desktop/ASTE data/'


# filename

fname = 'ETAN.0012.nc'


# load the file

ds = xr.open_dataset(data_dir + fname).load()

print('time: ')

time=ds.tim

sla=ds.ETAN.isel(i1=115)


sla_new=[]

lon_new=[]

lat_new=[]

i1=115

for i in range(8,10):

? ? file_path = data_dir +'ETAN.000%d.nc'%(i)

? ? file_obj = nc.Dataset(file_path)

? ? sla= file_obj.variables['ETAN'][i1,:]

? ? lats= file_obj.variables['lat'][:]

? ? lons= file_obj.variables['lon'][:]

? ? sla_new.append(sla)

? ? lon_new.append(lons)

? ? lat_new.append(lats)

? ?

for i in range(10,17):

? ? file_path = data_dir +'ETAN.00%d.nc'%(i)

? ? file_obj = nc.Dataset(file_path)

? ? sla= file_obj.variables['ETAN'][i1,:]

? ? lats= file_obj.variables['lat'][:]

? ? lons= file_obj.variables['lon'][:]

? ? sla_new.append(sla)

? ? lon_new.append(lons)

? ? lat_new.append(lats)

sla_new=np.array(sla_new)

sla_new=np.where(sla_new,sla_new,np.nan)

lon_new=np.array(lon_new)

lat_new=np.array(lat_new)


plt.figure(figsize=(10,10),dpi=500)

m=Basemap(projection='npstere',boundinglat=60,lon_0=0,resolution='l')

m.drawcoastlines()

m.fillcontinents()

for i in range(9):

? ? im=m.pcolormesh(lon_new[i],lat_new[i],sla_new[i],shading='nearest',cmap=plt.cm.jet,latlon=True)

m.drawparallels(np.arange(60,82,5),labels=[0,0,0,0])

m.drawmeridians(np.arange(0,361,20),labels=[0,0,1,1])

m.drawmapboundary()

ax=plt.gca()? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cb=m.colorbar(im,"right",size="5%",pad="10%")

cb.set_label('m',loc='bottom',rotation=1)

plt.title('Arctic cap ssh(201108)',pad=20)

plt.savefig("Arctic cap ssh(201108).png",dpi=500)

plt.show()

However, the result is not exactly correct, we need to use the following equation to correct SSH:


FIG 2. SSH Correction?

FIG 3. DATA Classification

FIG 4. SSH Correction


ASTE 數(shù)據(jù)可視化的自我實(shí)現(xiàn)(Python)的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
沧源| 海安县| 卢湾区| 措美县| 瑞丽市| 吴川市| 都江堰市| 绥阳县| 台安县| 晴隆县| 夏河县| 勃利县| 台北县| 临沂市| 双桥区| 康保县| 墨竹工卡县| 甘南县| 乐安县| 隆化县| 甘南县| 名山县| 临武县| 滁州市| 宁津县| 丹江口市| 托克托县| 宁海县| 前郭尔| 上高县| 唐海县| 天水市| 化隆| 宁晋县| 百色市| 平乐县| 长治县| 米易县| 邢台县| 蕉岭县| 滦平县|