Considering a given dataset "data", extracted from a netcdf4 file containing a variable named clcalispo2. I am working with python and f I do:
print(data['clcalipso2'].ncattrs())
I got this output:
clcalipso2 <class 'netCDF4._netCDF4.Variable'>
float32 clcalipso2(levStat, loc)
long_name: CALIPSO Cloud Fraction Undetected by CloudSat
units: %
standard_name: cloud_area_fraction_in_atmosphere_layer
unlimited dimensions:
current shape = (40, 153)
filling on, default _FillValue of 9.969209968386869e+36 used
I can easily extract the field attribute by doing:
print(data['clcalipso2'].ncattrs())
which yields:
['long_name', 'units', 'standard_name']
But me I am actually interested in extracting the variable dimension name, in this example: (levStat, loc). There is a simple way to do it (appart than using the output as a string and doing some string manipulations?)
Thanks in advance for the help