Revision c24e32a8
Added by Adam Wilson about 11 years ago
climate/procedures/MOD35_L2_process.r | ||
---|---|---|
290 | 290 |
system(paste(ncopath,"ncks -A ",tempdir(),"/time.nc ",ncfile,sep="")) |
291 | 291 |
## add other attributes |
292 | 292 |
system(paste(ncopath,"ncrename -v Band1,PClear ",ncfile,sep="")) |
293 |
system(paste(ncopath,"ncatted -a scale_factor,PClear,o,s,1 -a units,PClear,o,c,\"Probability (%)\" -a missing_value,PClear,o,s,255 -a _FillValue,PClear,o,s,255 -a long_name,PClear,o,c,\"Probability of Clear Sky\" ",ncfile,sep="")) |
|
294 |
|
|
295 |
# system(paste(ncopath,"ncatted -a sourcecode,global,o,c,",script," ",ncfile,sep="")) |
|
293 |
system(paste(ncopath,"ncatted ", |
|
294 |
" -a units,PClear,o,c,\"Probability (%)\" ", |
|
295 |
" -a missing_value,PClear,o,b,255 ", |
|
296 |
" -a _FillValue,PClear,o,b,255 ", |
|
297 |
" -a valid_range,PClear,o,b,\"0,100\" ", |
|
298 |
" -a long_name,PClear,o,c,\"Probability of Clear Sky\" ", |
|
299 |
ncfile,sep="")) |
|
300 |
#system(paste(ncopath,"ncatted -a sourcecode,global,o,c,",script," ",ncfile,sep="")) |
|
296 | 301 |
|
297 | 302 |
|
298 | 303 |
### delete the temporary files |
Also available in: Unified diff
Fixed the 'missing stripes' problem in the climatology script. Source of problem was related to the _FillValue attribute being incorrectly set to a short integer when the data was saved as byte. Changing both the attribute and the data to type 'byte' appears to have fixed the problem.