def create_nc_dimension(nc_file, shape):
    """
    Cria as dimensoes do arquivo (x, y, z, w)
        time = UNLIMITED ;
        level = UNLIMITED ;
        latitude = shape[0] ;
        longitude = shape[1] ;

    Parameters
    ----------
    nc_file : netCDF4.Dataset
        Dataset file to create the dimensions.
    shape : tuple
        Shape of the grid, shape=(latitude.size, longitude.size).

    Returns
    -------
    : bool
        Returns True if the dimensions are created correctly, else returns
        False.
        
    """
    try:
        nc_file.createDimension("latitude", shape[0])
        nc_file.createDimension("longitude", shape[1])
        nc_file.createDimension("level")
        nc_file.createDimension("time")
        return True
    except:
        return False