如何将旋转的NetCDF转换回普通纬度/经度网格? [英] How to convert a rotated NetCDF back to a normal lat/lon grid?

查看:462
本文介绍了如何将旋转的NetCDF转换回普通纬度/经度网格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有旋转坐标的NetCDF文件.我需要将其转换为正常的纬度/经度坐标(对于lon,-180至180;对于lat,-90至90).

I have a NetCDF file with rotated coordinates. I need to convert it to normal lat/lon coordinates (-180 to 180 for lon and -90 to 90 for lat).

library(ncdf4)
nc_open('dat.nf')

对于尺寸,它显示:

[1] "     5 variables (excluding dimension variables):"
[1] "        double time_bnds[bnds,time]   "
[1] "        double lon[rlon,rlat]   "
[1] "            long_name: longitude"
[1] "            units: degrees_east"
[1] "        double lat[rlon,rlat]   "
[1] "            long_name: latitude"
[1] "            units: degrees_north"
[1] "        char rotated_pole[]   "
[1] "            grid_mapping_name: rotated_latitude_longitude"
[1] "            grid_north_pole_longitude: 83"
[1] "            grid_north_pole_latitude: 42.5"
[1] "        float tasmax[rlon,rlat,time]   "
[1] "            long_name: Daily Maximum Near-Surface Air Temperature"
[1] "            standard_name: air_temperature"
[1] "            units: K"
[1] "            cell_methods: time:maximum within days time:mean over days"
[1] "            coordinates: lon lat"
[1] "            grid_mapping: rotated_pole"
[1] "            _FillValue: 1.00000002004088e+20"

[1] "     4 dimensions:"
[1] "        rlon  Size:310"
[1] "            long_name: longitude in rotated pole grid"
[1] "            units: degrees"
[1] "            axis: X"
[1] "            standard_name: grid_longitude"
[1] "        rlat  Size:260"
[1] "            long_name: latitude in rotated pole grid"
[1] "            units: degrees"
[1] "            axis: Y"
[1] "            standard_name: grid_latitude"
[1] "        bnds  Size:2"

有人可以告诉我如何将旋转坐标转换回普通纬度/经度吗?谢谢.

Could anyone show me how to convert the rotated coordinates back to normal lat/lon? Thanks.

推荐答案

为此,我将使用cdo

I would use cdo for this purpose https://code.zmaw.de/boards/2/topics/102

另一种选择是仅在旋转坐标和地理坐标之间创建映射,并使用原始数据而不进行插值.如果需要,我可以找到这些方程式.

Another option is just create a mapping between rotated and geographic coordinates and use the original data without interpolation. I can find the equations if necessary.

这篇关于如何将旋转的NetCDF转换回普通纬度/经度网格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆