It is the projection algorithm from WRF/WPS and I rewrite it in Python (just proj_LC, lambert projection). The grid ID starts at 0.