So I was able to achieve what I was hoping to do with the code below. Wanted to share in case anyone has a similar issue in the future. Thank you for all of your help Charlie. for yyyy in {1991..2018}; do # Loop over years for moy in {1..12}; do # Loop over months mm=$( printf "%02d" ${moy} ) # Change to 2-digit format ncatted -t -a _FillValue,,o,d,9.9692099683868690e+36 -a _FillValue,,o,f,9.9692099683868690e+36 seastate_${yyyy}${mm}.nc Rseastate_${yyyy}${mm}.nc done done
my files are in the form seastate_199108.nc...seastate201812.nc So something like: for yyyy in {1991..2018}; do # Loop over years for moy in {1..12}; do # Loop over months mm=$( printf "%02d" ${moy} ) # Change to 2-digit format # Average specific month yyyy-mm ncra -O -d time,"${yyyy}-${mm}-01","${yyyy}-${mm}-31" \ in.nc in_${yyyy}${mm}.nc done done The above is from the guide. Can I replace the ncra with: ncatted -t -a _FillValue,,o,d,9.9692099683868690e+36 -a _FillValue,,o,f,9.9692099683868690e+36...
Would it be possible to use the following to add the fillvalue to all of my input files? ncatted -t -a FillValue,,o,d,9.9692099683868690e+36 in*.nc Can I use the wildcard to insert the FillValue in all my files?
Would it be possible to use the following to add the fillvalue to all of my input files? ncatted -t -a FillValue,,o,d,9.9692099683868690e+36 in*.nc
Would it be possible to use the following to add the fillvalue to all of my input files? ncatted -t -a FillValue,,o,d,9.9692099683868690e+36 in.nc
That was successful. Thank you very much. Hopefully I can figure out a way to insert fill values more quickly than editing every file one by one. Any suggestions by chance?
ncks -m seastate_201811.nc netcdf seastate_201811 { dimensions: lat = 160 ; lon = 360 ; nv = 2 ; time = UNLIMITED ; // (1 currently) variables: int crs ; crs:semi_major_axis = 6371000. ; crs:grid_mapping_name = "latitude_longitude" ; crs:inverse_flattening = 0. ; double lat(lat) ; lat:long_name = "latitude" ; lat:standard_name = "latitude" ; lat:authority = "CF-1.7" ; lat:units = "degrees_north" ; lat:bounds = "lat_bnds" ; double lat_bnds(lat,nv) ; double lon(lon) ; lon:long_name = "longitude" ;...
I checked to see if my data was packed using ncks -m myfile.nc for both single, concatenated, and averaged files and none of my variables appear to be packed. I used control + f in the terminal and couldn't find scale_factor or add_offset. Is there anything else that would indicate that my data is packed?