插入高斯电网常规固定网格使用双线性插值?- 江南体育网页版- - - - -地球科学堆江南电子竞技平台栈交换 最近30从www.hoelymoley.com 2023 - 07 - 07 - t23:44:34z //www.hoelymoley.com/feeds/question/8086 https://creativecommons.org/licenses/by-sa/4.0/rdf //www.hoelymoley.com/q/8086 4 插入高斯电网常规固定网格使用双线性插值? dsbisht //www.hoelymoley.com/users/5330 2016 - 05 - 30 - t10:46:04z 2018 - 09 - 02 - t00:43:34z < p >我想regrid GCM数据可用高斯电网常规电网,说在1度X 1度。如何做到这一点使用CDO <代码> < /代码>或<代码> Python代码< / >或<代码> MATLAB代码> < /。< / p > < p > <强>编辑1:< /强>数据格式是<代码> netcdf > < /代码。< / p > //www.hoelymoley.com/questions/8086/-/8087 # 8087 9 由丹尼尔回答。heydebreck插入高斯电网常规固定网格使用双线性插值? daniel.heydebreck //www.hoelymoley.com/users/5594 2016 - 05 - 30 - t13:40:32z 2016 - 05 - 30 - t15:50:17z <标题>气候数据操作符(CDO) < / h1 > < h2 >定义网格< / h2 > < p >我们定义一个lat-lon目标网格与1°x1°网格单元尺寸30 x30网格细胞从40°N和-10°E (= 10°W): < / p > < pre > <代码> gridtype = lonlat xsize = 30 ysize = 30 xfirst = -10 xinc 40 yinc = 1 = 1 yfirst = < /代码> < / pre > < p >这段文本写入一个文本文件。看到< a href = " https://code.zmaw.de/projects/cdo/embedded/index.html x1-150001.3.2”>部分1.3.2 CDO手册< / >详情和进一步的例子。< / p > < p >如果你已经有一个netCDF文件在你的目标网格数据,您还可以从这个文件中提取网格定义:< / p > < pre > <代码> cdo griddes FILE_WITH_TARGET_GRID。数控祝辞myGridDef < /代码> < / pre > < p > <代码> myGridDef > < /代码是一个文本文件。< / p > < h2 > < / h2 > < p >插入数据,我认为我们做了双线性插值。这是完成了<代码> remapbil通过:< /代码>操作符< / p > < pre > <代码> cdo remapbil, myGridDef INPUT_FILE。数控OUTPUT_FILE。数控代码< / > < / pre > < p >输入数据的网格需要正确输入文件中定义(通常是一个问题)。< / p > < h2 >正确定义的网格替代1 < / h2 > < h3 > < / h3 > < p >数据变量的空间维度下面的例子(SST)需要被命名为<代码>经度< /代码>和<代码> lat > < /代码。此外,<代码>经度坐标变量代码< / >和<代码> lat > < /代码已经存在(时间独立!)。这些需要正确的坐标变量属性(见下面的例子)。< / p > < p >例子:< / p > < pre > <代码>维度:经度= 30; lat = 30 ; time = UNLIMITED ; // (24 currently) variables: double lon(lon) ; lon:standard_name = "longitude" ; lon:long_name = "longitude" ; lon:units = "degrees_east" ; lon:axis = "X" ; double lat(lat) ; lat:standard_name = "latitude" ; lat:long_name = "latitude" ; lat:units = "degrees_north" ; lat:axis = "Y" ; double time(time) ; time:standard_name = "time" ; time:long_name = "time" ; time:units = "seconds since 1900-01-01 00:00:00" ; time:calendar = "standard" ; time:axis = "T" ; float SST(time, lat, lon) ; SST:long_name = "sea_surface_temperature" ; SST:units = "degree celsius" ; SST:_FillValue = NaNf ; SST:missing_value = NaNf ; SST:var_desc = "sea surface temperature" ;

Alternative 2

The spatial dimensions and corresponding variables exist in the source file but are not denoted as lon and lat. Then each data variable (SST, in this example) needs to have an attribute coordinates that holds the names of the coordinate variables.

SST:coordinates = "lon lat" ; 

Example:

dimensions: TSTEP = UNLIMITED ; // (24 currently) COL = 112 ; ROW = 106 ; variables: " ; double lon(ROW, COL) ; lon:standard_name = "longitude" ; lon:long_name = "longitude coordinate" ; lon:units = "degrees_east" ; lon:_CoordinateAxisType = "Lon" ; double lat(ROW, COL) ; lat:standard_name = "latitude" ; lat:long_name = "latitude coordinate" ; lat:units = "degrees_north" ; lat:_CoordinateAxisType = "Lat" ; double time(TSTEP) ; time:standard_name = "time" ; time:long_name = "time" ; time:units = "seconds since 1900-01-01 00:00:00" ; time:calendar = "standard" ; float SST(TSTEP, ROW, COL) ; SST:long_name = "sea_surface_temperature" ; SST:units = "degree celsius" ; SST:coordinates = "lon lat" ; SST:var_desc = "sea surface temperature" ; 

Note:

If the coordinate variables are missing, then they can be created via the setgrid operator. If we want to add a grid definition to the source file then we need the source file's grid definition in the text file (see 'define grid').

cdo setgrid,mySourceGridDef INFILE_NO_COORDS.nc INFILE_WI_COORDS.nc 
//www.hoelymoley.com/questions/8086/-/15004 # 15004 0 答案为插入高斯超立方体网格常规固定网格使用双线性插值? 超立方体 //www.hoelymoley.com/users/13755 2018 - 09 - 02 - t00:43:34z 2018 - 09 - 02 - t00:43:34z < p >使用Python,最好的解决方案我已经能够找到pyresample。看到这个< a href = " http://earthpy.org/interpolation_between_grids_with_pyresample.html " rel = " nofollow noreferrer " >博文< / >。< / p >
Baidu
map