Ich habe eine netCDF-Datei mit den folgenden. ncdump:Konvertieren Sie alle Variablen und Dimensionen von int/float in double in Netcdf-Datei
netcdf nc_data {
dimensions:
lon = 1440 ;
bounds = 2 ;
lat = 720 ;
time = UNLIMITED ; // (6 currently)
variables:
double lon_bounds(lon, bounds) ;
double lat_bounds(lat, bounds) ;
int time(time) ;
time:units = "year as %Y.%f" ;
time:calendar = "proleptic_gregorian" ;
time:long_name = "time" ;
time:standard_name = "time" ;
time:axis = "T" ;
float lat(lat) ;
lat:units = "degrees_north" ;
lat:long_name = "latitude" ;
lat:standard_name = "latitude" ;
lat:axis = "Y" ;
lat:bounds = "lat_bounds" ;
float lon(lon) ;
lon:units = "degrees_east" ;
lon:long_name = "longitude" ;
lon:standard_name = "longitude" ;
lon:axis = "X" ;
lon:bounds = "lon_bounds" ;
float valf(time, lat, lon) ;
valf: standard_name = “area_fraction”
valf:missing_value = -9999.f ;
valf:_fillvalue = -9999.f ;
valf:long_name = "val fraction" ;
valf:units = "fraction of grid cell" ;
}
Gibt es einen nco-Befehl, um alle Variablen und Dimensionen von int/float in double umzuwandeln?
Ich fand dies:
ncap2 -s 'valf=double(valf)' nc_data.nc nc_data.nc
Dies ist jedoch nur eine Variable zu einer Zeit arbeitet, und ich habe ~ 30 Variablen in meiner Datei