NetCDF连接w / ncrcat,具有不同lon范围的文件

时间:2016-06-14 18:47:48

标签: netcdf nco

我正在尝试沿时间(记录)轴连接两个NetCDF文件。

lon维度在两个文件中具有相同数量的值,但第一个文件的lon坐标值范围为0.5到359.5,第二个文件的lon坐标值范围为-179.5到179.5。因此,当我查看在Panoply中绘制的连接文件的最后时间步时,我看到空间看起来很好但位于地图上错误位置的值。我已经尝试通过在执行连接之前向第二个文件中的所有lon值添加180来解决此问题,但它会产生类似的结果。

我正在使用的命令:

$ ncrcat precip.mon.total.1x1.v7.nc first_guess_monthly_2014_01.nc combined.nc

下面是我正在连接的两个文件的ncdump -h输出:

netcdf precip.mon.total.1x1.v7 {
dimensions:
        lat = 180 ;
        lon = 360 ;
        time = UNLIMITED ; // (1356 currently)
variables:
        float lat(lat) ;
                lat:units = "degrees_north" ;
                lat:actual_range = -89.5f, 89.5f ;
                lat:long_name = "Latitude" ;
                lat:standard_name = "latitude" ;
                lat:axis = "Y" ;
                lat:coordinate_defines = "point" ;
        float lon(lon) ;
                lon:long_name = "Longitude" ;
                lon:units = "degrees_east" ;
                lon:standard_name = "longitude" ;
                lon:actual_range = 0.5f, 359.5f ;
                lon:axis = "X" ;
                lon:coordinate_defines = "point" ;
        double time(time) ;
                time:long_name = "Time" ;
                time:units = "days since 1800-1-1 00:00:00" ;
                time:delta_t = "0000-01-00 00:00:00" ;
                time:avg_period = "0000-01-00 00:00:00" ;
                time:standard_name = "time" ;
                time:axis = "T" ;
                time:coordinate_defines = "start" ;
                time:actual_range = 36889., 78131. ;
        float p(time, lat, lon) ;
                p:long_name = "GPCC Monthly total of precipitation" ;
                p:missing_value = -9.96921e+36f ;
                p:statistic = "Total" ;
                p:valid_range = 0.f, 8000.f ;
                p:parent_stat = "Observations" ;
                p:var_desc = "Precipitation" ;
                p:actual_range = 0.f, 3153.04f ;
                p:dataset = "GPCC Precipitation 1.0degree V7 Full Reanalysis" ;
                p:units = "mm" ;
                p:level = "Surface" ;

// global attributes:
                :Original_Source = "http://www.dwd.de/en/FundE/Klima/KLIS/int/GPCC/GPCC.htm\n is the webpage and the data is at ftp://ftp.dwd.de/pub/data/gpcc/download.html" ;
                :Reference = "Users of the data sets are kindly requested to give feed back and to refer to GPCC publications on this webpage: http://www.dwd.de/bvbw/appmanager/bvbw/dwdwwwDesktop/?_nfpb=true&_pageLabel=_dwdwww_klima_umwelt_datenzentren_wzn&T12404518261141645246564gsbDocumentPath=Content%2FOeffentlichkeit%2FKU%2FKU4%2FKU42%2Fteaser__product__access.html&_state=maximized&_windowLabel=T12404518261141645246564&lastPageLabel=_dwdwww_klima_umwelt_datenzentren_wzn" ;
                :original_source = "ftp://ftp-anon.dwd.de/pub/data/gpcc/html/download_gate.html" ;
                :References = "http://www.esrl.noaa.gov/psd/data/gridded/data.gpcc.html" ;
                :Conventions = "CF 1.0" ;
                :title = "GPCC Full Data Reanalysis Version 7 1.0x1.0 Monthly Totals" ;
                :dataset_title = "Global Precipitation Climatology Centre (GPCC)" ;
                :history = "Tue Jun 14 10:59:21 2016: ncrename -v precip,p precip.mon.total.1x1.v7.nc\nCreated 01/2016 based on V7 data obtained via ftp" ;



netcdf first_guess_monthly_2014_01 {
dimensions:
        lon = 360 ;
        lat = 180 ;
        time = UNLIMITED ; // (1 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_south" ;
                lat:axis = "Y" ;
        double time(time) ;
                time:standard_name = "time" ;
                time:units = "months since 2014-01-01 00:00:00" ;
                time:calendar = "proleptic_gregorian" ;
        float p(time, lat, lon) ;
                p:long_name = "first guess monthly product, precipitation per grid" ;
                p:units = "mm/month" ;
                p:code = 20 ;
                p:_FillValue = -99999.99f ;
        float s(time, lat, lon) ;
                s:long_name = "first guess monthly product, number of gauges per grid" ;
                s:units = "gauges per gridcell" ;
                s:code = 21 ;
                s:_FillValue = -99999.99f ;

// global attributes:
                :CDI = "Climate Data Interface version 1.5.9 (http://code.zmaw.de/projects/cdi)" ;
                :Conventions = "CF-1.4" ;
                :history = "Mon Apr 07 10:41:42 2014: cdo -setgatts,gattfile gpcc10.nc first_guess_monthly_2014_01.nc\n",
                        "Mon Apr 07 10:41:41 2014: cdo -merge first_guess_monthly_precip_2014_01.nc first_guess_monthly_numgauge_2014_01.nc gpcc10.nc\n",
                        "Mon Apr 07 10:41:41 2014: cdo cat gpcc10.nc first_guess_monthly_numgauge_2014_01.nc\n",
                        "Mon Apr 07 10:41:41 2014: cdo -b F32 -r -f nc -setgrid,firstguess10desc.asc -settunits,month -setmissval,-99999.99 -setpartab,codetable.txt -setcode,21 -setdate,2014-01 -input,r360x180 gpcc10.nc" ;
                :DOI = "10.5676/DWD_GPCC/FG_M_100" ;
                :title = "GPCC First Guess Product at 1.0°: Near Real-Time First Guess Monthly Land-Surface Precipitation from Rain-Gauges based on SYNOP Data" ;
                :summary = "This is the GPCC First Guess Product of monthly global land-surface precipitation based on the station database (SYNOP) available via the Global Telecommunication System (GTS) of the World Meteorological Organization (WMO) at the time of analysis (3 - 5 days after end of the analysis month). This product contains the monthly totals on a regular latitude/longitude grid with a spatial resolution of 1.0° x 1.0° latitude by longitude. Interpolation is made on the anomalies from the GPCC Climatology V2011 in the corresponding resolution (DOI: 10.5676/DWD_GPCC/Clim_M_V2011_100). The temporal coverage of the dataset ranges from January 2005 until the most recent month for which GTS based SYNOP data is available, i.e. the previous month, 3-5 days after its completion." ;
                :usage = "This GPCC product is recommended to be used when the timeliness of the precipitation information is of highest importance, e.g. for drought monitoring or watch purposes." ;
                :keywords = "precipitation climatology,gpcc,global,gpcp,daily" ;
                :id = "first_guess_monthly_precipitation_10" ;
                :creator_url = "http://gpcc.dwd.de" ;
                :creator_name = "GPCC/DWD" ;
                :creator_email = "gpcc@dwd.de" ;
                :institution = "Deutscher Wetterdienst" ;
                :date_created = "Mo 7. Apr 10:41:41 UTC 2014" ;
                :time_coverage_start = "2014-01" ;
                :time_coverage_end = "2014-01" ;
                :time_coverage_resolution = "month" ;
                :geospatial_lat_min = "-90." ;
                :geospatial_lat_max = "90." ;
                :geospatial_lon_min = "-180." ;
                :geospatial_lon_max = "180." ;
                :CDO = "Climate Data Operators version 1.5.9 (http://code.zmaw.de/projects/cdo)" ;
}

任何人都可以看到我可能做错了吗?提前感谢任何建议。

1 个答案:

答案 0 :(得分:0)

我知道这已经太迟了4年,但是您尝试使用CDO吗?

cdo mergetime file1.nc file2.nc merged_file.nc 

我认为在这种情况下,它可以自动处理经度偏移问题。