Я пытаюсь изменить один из глобальных атрибутов в моем файле netcdf:
START_DATE = "2016-05-12_00:00:00"
Я хочу изменить строку даты на другую дату. Как вы делаете это с пакетом nco?
Я видел, что могу использовать
ncatted [-a ...] [-D dbg_lvl] [-h] [-l path] [-O] [-o out.nc] [-p path] [-R] [-r] in.nc [[out.nc]]
Я прочитал документы, но показаны ограниченные примеры.
Вот как я это использовал:
ncatted -O -h -a START_DATE,,m,c,"2016-06-12_00:00:00" wrfchemi_d01.nc wrfnew.nc
После проверки вывода с помощью ncdump, глобальный атрибут не изменился, как показано здесь:
// global attributes:
:TITLE = " OUTPUT FROM * PROGRAM:WRF-Chem V4.1.2 MODEL" ;
:START_DATE = "2016-05-12_00:00:00" ;
:WEST-EAST_GRID_DIMENSION = 70 ;
:SOUTH-NORTH_GRID_DIMENSION = 70 ;
:BOTTOM-TOP_GRID_DIMENSION = 51 ;
:DX = 25000.f ;
:DY = 25000.f ;
:AERCU_OPT = 0 ;
:AERCU_FCT = 1.f ;
:IDEAL_CASE = 0 ;
:DIFF_6TH_SLOPEOPT = 0 ;
:AUTO_LEVELS_OPT = 2 ;
:DIFF_6TH_THRESH = 0.1f ;
:DZBOT = 50.f ;
:DZSTRETCH_S = 1.3f ;
:DZSTRETCH_U = 1.1f ;
:GRIDTYPE = "C" ;
:DIFF_OPT = 1 ;
:KM_OPT = 4 ;
:DAMP_OPT = 3 ;
:DAMPCOEF = 0.2f ;
:KHDIF = 0.f ;
:KVDIF = 0.f ;
:MP_PHYSICS = -1 ;
:RA_LW_PHYSICS = 1 ;
:RA_SW_PHYSICS = 1 ;
:SF_SFCLAY_PHYSICS = 2 ;
:SF_SURFACE_PHYSICS = 2 ;
:BL_PBL_PHYSICS = 2 ;
:CU_PHYSICS = 5 ;
:SF_LAKE_PHYSICS = 0 ;
:SURFACE_INPUT_SOURCE = 1 ;
:SST_UPDATE = 0 ;
:GRID_FDDA = 0 ;
:GFDDA_INTERVAL_M = 0 ;
:GFDDA_END_H = 0 ;
:GRID_SFDDA = 0 ;
:SGFDDA_INTERVAL_M = 0 ;
:SGFDDA_END_H = 0 ;
:HYPSOMETRIC_OPT = 2 ;
:USE_THETA_M = 1 ;
:GWD_OPT = 0 ;
:SF_URBAN_PHYSICS = 0 ;
:SF_SURFACE_MOSAIC = 0 ;
:SF_OCEAN_PHYSICS = 0 ;
:WEST-EAST_PATCH_START_UNSTAG = 1 ;
:WEST-EAST_PATCH_END_UNSTAG = 69 ;
:WEST-EAST_PATCH_START_STAG = 1 ;
:WEST-EAST_PATCH_END_STAG = 70 ;
:SOUTH-NORTH_PATCH_START_UNSTAG = 1 ;
:SOUTH-NORTH_PATCH_END_UNSTAG = 69 ;
:SOUTH-NORTH_PATCH_START_STAG = 1 ;
:SOUTH-NORTH_PATCH_END_STAG = 70 ;
:BOTTOM-TOP_PATCH_START_UNSTAG = 1 ;
:BOTTOM-TOP_PATCH_END_UNSTAG = 50 ;
:BOTTOM-TOP_PATCH_START_STAG = 1 ;
:BOTTOM-TOP_PATCH_END_STAG = 51 ;
:GRID_ID = 1 ;
:PARENT_ID = 1 ;
:I_PARENT_START = 1 ;
:J_PARENT_START = 1 ;
:PARENT_GRID_RATIO = 1 ;
:DT = 150.f ;
:CEN_LAT = 14.60003f ;
:CEN_LON = 120.98f ;
:TRUELAT1 = 14.6f ;
:TRUELAT2 = 14.6f ;
:MOAD_CEN_LAT = 14.60003f ;
:STAND_LON = 120.98f ;
:POLE_LAT = 90.f ;
:POLE_LON = 0.f ;
:GMT = 0.f ;
:JULYR = 2016 ;
:JULDAY = 133 ;
:MAP_PROJ = 1 ;
:MAP_PROJ_CHAR = "Lambert Conformal" ;
:MMINLU = "USGS" ;
:NUM_LAND_CAT = 28 ;
:ISWATER = 16 ;
:ISLAKE = 28 ;
:ISICE = 24 ;
:ISURBAN = 1 ;
:ISOILWATER = 14 ;
:HYBRID_OPT = 2 ;
:ETAC = 0.2f ;
Может кто-нибудь показать мне, как сделано для этого простого изменения?
Спасибо!