目的:运行ww3_prnc | tee ww3_prnc.out.ecmwf的时候,出现如下的错误:
[hxz@hxz ecmwf]$ ww3_prnc | tee ww3_prnc.out.ecmwf
*** WAVEWATCH III Input pre-processing ***
===============================================Comment character is '$'
Grid name : Indian_ocean_0.5deg
Description of inputs
--------------------------------------------------
Input type : winds
Format type : long.-lat. grid
Field conserves velocity.
File name : ecmwf201205-09.nc*** WAVEWATCH III WARNING IN W3PRNC :
CALENDAR ATTRIBUTE NOT FOUND
IT MUST RESPECT JULIAN OR GREGORIAN CALENDAR*** WAVEWATCH III ERROR IN W3PRNC :
LATITUDE VALUES MUST BE REVERSED
EXAMPLE: ncpdq -h -O -a -lat file.nc
解决办法:
错误的意思是说,nc文件中纬度的值排列不正确,要反过来才可以。因此,使用下面的命令进行翻转。
ncpdq -h -O -a -latitude(nc文件中的纬度变量) ecmwf201205-09.nc ecmwf201205-09-1.nc
其中,ncpdq是nco(The netCDF Operators)的一个命令,ecmwf201205-09-1.nc是翻转纬度后的文件。
在某种情况下,nco来处理nc工具真的是方便快捷!