NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
I'm trying to use ncwa to get an area average with latitude weighting (weights are cos(lat)), but I keep getting infinite value as the result. Here is the ncwa command I used: ncwa -h -O -w weights -a lat,lon in2.nc out.nc And here is my in2.nc dump (sorry for the long text): netcdf in2 { dimensions: lat = 11 ; lon = 11 ; variables: double weights(lat) ; weights:grads_dim = "y" ; weights:grads_mapping = "linear" ; weights:grads_size = "180" ; weights:long_name = "latitude" ; weights:maximum = 90.f ; weights:minimum = -90.f ; weights:resolution = 1.f ; weights:units = "degrees_north" ; float lon(lon) ; lon:grads_dim = "x" ; lon:grads_mapping = "linear" ; lon:grads_size = "360" ; lon:units = "degrees_east" ; lon:long_name = "longitude" ; lon:minimum = -180.f ; lon:maximum = 180.f ; lon:resolution = 1.f ; float lat(lat) ; lat:grads_dim = "y" ; lat:grads_mapping = "linear" ; lat:grads_size = "180" ; lat:units = "degrees_north" ; lat:long_name = "latitude" ; lat:minimum = -90.f ; lat:maximum = 90.f ; lat:resolution = 1.f ; float h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388(lat, lon) ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388._FillValue = -1.267651e+30f ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388.units = "NoUnits" ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388.title = "Final Aerosol Absorption Optical Depth at 388 nm" ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388.UniqueFieldDefinition = "OMI-Specific" ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388.scale_factor = 1. ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388.add_offset = 0. ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388.missing_value = -1.267651e+30f ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:h5__FillValue = -1.267651e+30f ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:units = "NoUnits" ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:title = "Final Aerosol Absorption Optical Depth at 388 nm" ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:UniqueFieldDefinition = "OMI-Specific" ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:scale_factor = 1. ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:add_offset = 0. ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:missing_value = -1.267651e+30f ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388:fonc_original_name = "_HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388" ; // global attributes: :NC_GLOBAL.title = "NASA HDFEOS5 Grid" ; :NC_GLOBAL.Conventions = "CF-1.4" ; :NC_GLOBAL.dataType = "Grid" ; data: weights = 0.995396469710366, 0.996917515468375, 0.998134908405148, 0.999048277712875, 0.999657345186828, 0.999961925310096, 0.999961925310096, 0.999657345186828, 0.999048277712875, 0.998134908405148, 0.996917515468375 ; lon = -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5 ; lat = -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5 ; h5__HDFEOS_GRIDS_Aerosol_NearUV_Grid_Data_Fields_FinalAerosolAbsOpticalDepth388 = -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, 0.0684, -1.267651e+30, -1.267651e+30, 0.1196, 0.0661, 0.0648, 0.072, 0.0896, 0.085, -1.267651e+30, 0.0672, 0.0772, 0.0745, 0.0676, 0.0717, 0.0701, 0.0757, 0.0879, 0.1147, -1.267651e+30, -1.267651e+30, 0.0905, 0.0833, 0.0734, 0.0749, 0.0857, 0.0838, 0.0874, 0.0716, 0.0848, 0.1245, -1.267651e+30, 0.0771, 0.0859, 0.0727, 0.0672, 0.0836, -1.267651e+30, 0.0696, 0.0708, 0.0885, -1.267651e+30, -1.267651e+30, 0.073, 0.0859, 0.0801, 0.0686, 0.0676, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, 0.1016, 0.1106, 0.0852, 0.0678, -1.267651e+30, -1.267651e+30, -1.267651e+30, -1.267651e+30, 0.0898, -1.267651e+30, -1.267651e+30, 0.0693, 0.0755, 0.0971, 0.0733, 0.0845, -1.267651e+30, 0.146, 0.1097, 0.1307, -1.267651e+30, -1.267651e+30, 0.0817, 0.1014, 0.0964, 0.0961, 0.1, 0.0859, 0.1092, 0.1306, -1.267651e+30, -1.267651e+30, -1.267651e+30, 0.1381, 0.1455, -1.267651e+30, 0.0711, 0.0705, 0.1011, 0.1402, 0.1481, -1.267651e+30, -1.267651e+30, 0.1522 ; } Can anyone help? Thanks. Jianfu
netcdfgroup
archives: