id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 731681563,MDU6SXNzdWU3MzE2ODE1NjM=,4548,Alternative way to deal scale_factor and add_offset for opening datasets.,73609114,closed,0,,,8,2020-10-28T18:16:55Z,2020-10-30T14:47:18Z,2020-10-30T13:01:44Z,NONE,,,,"Sorry if this is a basic question. As far as I can tell, if `mask_and_scale=True`, Xarray unpacks stored values from files using the formula: ``` x_unpacked = x_stored*scale_factor+add_offset ``` But some datasets also use another formula(for example [MODIS datafiles](http://hdfeos.org/zoo/Data_Collection/LAADS_MYD.pdf)): ``` x_unpacked = (x_stored-add_offset)*scale_factor ``` Is there any convenient way to force the alternative formula while using `xr.open_dataset`? Right now I am setting the mask and scale as false and then manually doing the scaling and offseting for each relevant data-array. Is there a more elegant solution to this?","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4548/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue