简体   繁体   English

极坐标投影到规则的纬度/经度网格

[英]Polar stereographic projection to regular lat/lon grid

This is a follow on from my previous question, in that this is much more specific with examples and data.这是我上一个问题的后续,因为示例和数据更加具体。 I have a 304 by 448 array of ice data (in polar stereographic projection), of which the netcdf can be obtained here .我有一个 304 x 448 的冰数据阵列(在极地立体投影中),其中的 netcdf 可以在这里获得。 The corresponding lat/lon points of each grid box can be found in this file .每个网格框对应的纬度/经度点可以在这个文件中找到。 I would like to transform this data onto a regular lat/lon grid (say 180x360) where each grid box is a degree.我想将此数据转换为常规的纬度/经度网格(例如 180x360),其中每个网格框都是一个度数。 Is there any python way of doing this?有没有python的方法来做到这一点? Etc using Basemap, or alternatively using CDO (climate data operators)?使用 Basemap 等,还是使用 CDO(气候数据运营商)?

Many thanks in advance.提前谢谢了。 James詹姆士

If you first add the grid to the data file with, eg,如果您首先将网格添加到数据文件中,例如,

ncks -A -v lat,lon NSIDC_LatLon.nc sample.nc

Then you can use NCO's ncremap to regrid that with, eg,然后你可以使用 NCO 的ncremap来重新网格,例如,

ncremap -i sample.nc -d 1x1.nc -o out.nc

Unfortunately this will require the current snapshot of NCO (rather than a released version) because the input files contained dimensions in an unusual order that I just patched NCO to handle.不幸的是,这将需要 NCO 的当前快照(而不是已发布的版本),因为输入文件包含的维度顺序不同寻常,我刚刚修补了 NCO 以进行处理。 A sample of the regridded output is here .重新网格化输出的示例是here

At the OP's request I regridded his file then uploaded it ( here ).在 OP 的要求下,我重新整理了他的文件,然后上传了它(这里)。 I didn't have a 1x1 dataset sitting around so I first created a 1x1 grid file as shown in the manual, then regridded with that (with ncremap -g option):我没有一个 1x1 数据集,所以我首先创建了一个 1x1 网格文件,如手册中所示,然后用它重新网格化(使用 ncremap -g 选项):

ncremap -i ~/NSIDC.nc -g ${DATA}/grids/180x360_SCRIP.20150901.nc -o ~/NSIDC_1x1.nc

Usually the command to do this in CDO would be通常在 CDO 中执行此操作的命令是

cdo remapcon,r360x180 in.nc out.nc 

instead of con=conservative remapping, you can use bil=bilinear, nn=nearest neighbour, con2=2nd order conservative remapping.代替 con=conservative 重映射,您可以使用 bil=bilinear, nn=nearest neighbor, con2=2nd order 保守重映射。

According to this posting, https://code.mpimet.mpg.de/boards/1/topics/8302?r=8326 the latest versions of cdo should be able to handle polar stereographic projections.根据这篇文章, https ://code.mpimet.mpg.de/boards/1/topics/8302?r = 8326 最新版本的 cdo 应该能够处理极地立体投影。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将极地立体投影中的数据重新映射到经纬度 - Remap data from Polar Stereographic projection to Lat-Lon 将北极立体二进制重投影到 Lon/Lat 网格(python 中的光栅或 gdal) - Reprojection of North Polar Stereographic binary to Lon/Lat grid (rasterio or gdal in python) 极地立体投影中的Python点密度图 - Python Point density plots in polar stereographic projection geopandas 世界地图的极地立体投影 - Polar Stereographic projection of geopandas world map 有没有办法使用北极立体投影到 plot 一系列不包括极点的纬度/经度来获取 matplotlib 的底图? - Is there a way to get matplotlib's Basemap using North Polar Stereographic Projection to plot a range of lat/lons that doesn't include the pole? Geopandas 世界地图在极地立体投影与彩色海洋 - Geopandas world map in Polar Stereographic projection with coloured oceans 为什么底图南极立体地图投影坐标与同一投影中的数据集不一致? - Why are Basemap south polar stereographic map projection coordinates not agreeing with those of data sets in the same projection? 极地立体图 - Polar stereographic plot 在Python中将数据插值到纬度/经度网格 - Interpolate data to lat/lon grid in Python Matplotlib:使用spstere投影专注于特定的lon / lat - Matplotlib: Focus on specific lon/lat using spstere projection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM