I had rewrite one of the python script get_MERRA_albedo_from_nasa_opendap_dailyV1.py as I have PyDAP, change the server link to 'http://goldsmr4.gesdisc.eosdis.nasa.gov' while using setup_session to key in EarthData username and password to read data from OPENDAP url.
I test and ran that get script alone, setting year at 2016, however there's an error related to __array__() for nc.variable['lat'] as there are two occurrence of "lat" from line 56 and line 85. Any suggestions to resolve this error?

Error from terminal

$sudo python get_MERRA_albedo_from_nasa_opendap_dailyV1.py 2016
Traceback (most recent call last):
File "get_MERRA_albedo_from_nasa_opendap_dailyV1.py", line 85, in <module>
nc.variables['lat'][:] = lat
File "netCDF4/_netCDF4.pyx", line 4933, in netCDF4._netCDF4.Variable.__setitem__
TypeError: __array__() takes exactly 1 argument (2 given)