小编zoe*_*oek的帖子

从4d NetCDF文件中仅提取底部温度

我有一个用于海洋温度的NetCDF文件。它具有1个变量(“温度”)和4个维度(时间,经度,纬度和深度)。我只想提取每个时间,经度和纬度的最大深度的温度,以获得底海温度栅格砖。我愿意使用R或在终端中使用Climate Data Operators。

NetCDF文件的属性

nc_open('data.pre1980.nc')
File data.pre1980.nc (NC_FORMAT_CLASSIC):

     1 variables (excluding dimension variables):
        float temp[lon,lat,depth,time]   
            standard_name: sea_water_temperature
            long_name: TEMPERATURE
            units: Celsius_scale
            _FillValue: -9.98999971057742e+33
            missing_value: -9.98999971057742e+33
            pointwidth: 1

     4 dimensions:
        time  Size:324   *** is unlimited ***
            standard_name: time
            units: months since 1960-01-01
            calendar: 360_day
            axis: T
        lon  Size:440
            standard_name: longitude
            long_name: longitude
            units: degree_east
            axis: X
        lat  Size:179
            standard_name: latitude
            long_name: latitude
            units: degree_north
            axis: Y
        depth  Size:40
            units: meters
            axis: Z
            gridtype: 0

    4 global attributes:
        CDI: Climate Data Interface …
Run Code Online (Sandbox Code Playgroud)

r raster netcdf nco cdo-climate

5
推荐指数
1
解决办法
97
查看次数

使用 nco 将 NetCDF 中的经度从 0:360 转换为 -180:180

我有两个 NetCDF 文件,每个文件都用于不同的年份,我想将它们连接起来。它们似乎具有相同的结构,以时间为无限维度,只是其中一个经度的比例为 0:360,而另一个的比例为 -180:180。

这个问题解决了如何使用 R 中的 raster 包处理这个问题,但我想使用 nco。

我找到了用于转换 -180:180-->0:360 的说明(在下面提供),但对语法不够熟悉,无法让我在另一个方向反转说明。

有关我的 NetCDF 文件的详细信息:

netcdf soda3.3.1_1980_2015_sst {
dimensions:
    depth = 1 ;
    latitude = 330 ;
    longitude = 720 ;
    time = UNLIMITED ; // (432 currently)
variables:
    float depth(depth) ;
        depth:long_name = "depth" ;
        depth:units = "m" ;
        depth:axis = "Z" ;
    float latitude(latitude) ;
        latitude:long_name = "latitude" ;
        latitude:units = "degrees_north" ;
        latitude:axis = "Y" ;
    float longitude(longitude) ;
        longitude:long_name = "longitude" ;
        longitude:units …
Run Code Online (Sandbox Code Playgroud)

bash netcdf nco cdo-climate

2
推荐指数
1
解决办法
2014
查看次数

标签 统计

cdo-climate ×2

nco ×2

netcdf ×2

bash ×1

r ×1

raster ×1